From 3d9b7d6a89c5072b0b8d3758de3c6c1cadd06569 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Sun, 3 Aug 2025 05:08:10 +0000 Subject: [PATCH 1/2] update openapi gen commit --- settings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings b/settings index 2f38b8ee97..1b73d0021a 100644 --- a/settings +++ b/settings @@ -30,4 +30,4 @@ export CLIENT_VERSION="0.8-SNAPSHOT" # Name of the release package export PACKAGE_NAME="@kubernetes/node-client" -export OPENAPI_GENERATOR_COMMIT=fc00a663e1688c99d6e8917b6fb222cf83141d4c +export OPENAPI_GENERATOR_COMMIT=81be9cd409bf7e08d506fd43f281aaddab852b8e From 0110f87ebb2a03ed16cb5e296501268eec542773 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Sun, 3 Aug 2025 05:10:24 +0000 Subject: [PATCH 2/2] regenerate client --- src/gen/.openapi-generator/COMMIT | 4 +- src/gen/.openapi-generator/VERSION | 2 +- src/gen/apis/exception.ts | 4 +- src/gen/auth/auth.ts | 1 - src/gen/configuration.ts | 83 +- src/gen/http/http.ts | 11 + src/gen/http/isomorphic-fetch.ts | 1 + src/gen/middleware.ts | 6 +- src/gen/types/ObservableAPI.ts | 31358 +++------------------------ src/gen/types/PromiseAPI.ts | 22648 ++----------------- 10 files changed, 5312 insertions(+), 48806 deletions(-) diff --git a/src/gen/.openapi-generator/COMMIT b/src/gen/.openapi-generator/COMMIT index 8e14816441..f0d0577103 100644 --- a/src/gen/.openapi-generator/COMMIT +++ b/src/gen/.openapi-generator/COMMIT @@ -1,2 +1,2 @@ -Requested Commit/Tag : fc00a663e1688c99d6e8917b6fb222cf83141d4c -Actual Commit : fc00a663e1688c99d6e8917b6fb222cf83141d4c +Requested Commit/Tag : 81be9cd409bf7e08d506fd43f281aaddab852b8e +Actual Commit : 81be9cd409bf7e08d506fd43f281aaddab852b8e diff --git a/src/gen/.openapi-generator/VERSION b/src/gen/.openapi-generator/VERSION index de37f5c4cf..fc74d6ceba 100644 --- a/src/gen/.openapi-generator/VERSION +++ b/src/gen/.openapi-generator/VERSION @@ -1 +1 @@ -7.12.0-SNAPSHOT +7.15.0-SNAPSHOT diff --git a/src/gen/apis/exception.ts b/src/gen/apis/exception.ts index 9365d33a8f..00f294ce45 100644 --- a/src/gen/apis/exception.ts +++ b/src/gen/apis/exception.ts @@ -10,6 +10,6 @@ export class ApiException extends Error { public constructor(public code: number, message: string, public body: T, public headers: { [key: string]: string; }) { super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body) + "\nHeaders: " + - JSON.stringify(headers)) + JSON.stringify(headers)); } -} +} \ No newline at end of file diff --git a/src/gen/auth/auth.ts b/src/gen/auth/auth.ts index 712183b0d5..306fe8c2ee 100644 --- a/src/gen/auth/auth.ts +++ b/src/gen/auth/auth.ts @@ -41,7 +41,6 @@ export class BearerTokenAuthentication implements SecurityAuthentication { } } - export type AuthMethods = { "default"?: SecurityAuthentication, "BearerToken"?: SecurityAuthentication diff --git a/src/gen/configuration.ts b/src/gen/configuration.ts index 6380422be3..61db7ffa47 100644 --- a/src/gen/configuration.ts +++ b/src/gen/configuration.ts @@ -5,16 +5,16 @@ import { BaseServerConfiguration, server1 } from "./servers.js"; import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth.js"; export interface Configuration { - readonly baseServer: BaseServerConfiguration; - readonly httpApi: HttpLibrary; - readonly middleware: M[]; - readonly authMethods: AuthMethods; + readonly baseServer: BaseServerConfiguration; + readonly httpApi: HttpLibrary; + readonly middleware: M[]; + readonly authMethods: AuthMethods; } // Additional option specific to middleware merge strategy export interface MiddlewareMergeOptions { - // default is `'replace'` for backwards compatibility - middlewareMergeStrategy?: 'replace' | 'append' | 'prepend'; + // default is `"replace"` for backwards compatibility + middlewareMergeStrategy?: "replace" | "append" | "prepend"; } // Unify configuration options using Partial plus extra merge strategy @@ -29,36 +29,36 @@ export type PromiseConfigurationOptions = ConfigurationOptions new PromiseMiddlewareWrapper(m) + ), + middlewareMergeStrategy: options.middlewareMergeStrategy, + authMethods: options.authMethods, + }; + } + return; +} diff --git a/src/gen/http/http.ts b/src/gen/http/http.ts index 04e5e57257..525eee647c 100644 --- a/src/gen/http/http.ts +++ b/src/gen/http/http.ts @@ -3,6 +3,7 @@ import FormData from "form-data"; import { URL, URLSearchParams } from 'url'; import * as http from 'http'; import * as https from 'https'; +import { AbortSignal } from "node-fetch/externals"; import { Observable, from } from '../rxjsStub.js'; export * from './isomorphic-fetch.js'; @@ -57,6 +58,7 @@ export class RequestContext { private headers: Headers = {}; private body: RequestBody = undefined; private url: URL; + private signal: AbortSignal | undefined = undefined; private agent: http.Agent | https.Agent | undefined = undefined; /** @@ -135,6 +137,15 @@ export class RequestContext { this.headers[key] = value; } + public setSignal(signal: AbortSignal): void { + this.signal = signal; + } + + public getSignal(): AbortSignal | undefined { + return this.signal; + } + + public setAgent(agent: http.Agent | https.Agent) { this.agent = agent; } diff --git a/src/gen/http/isomorphic-fetch.ts b/src/gen/http/isomorphic-fetch.ts index d05dc7f9ef..2d3d6179aa 100644 --- a/src/gen/http/isomorphic-fetch.ts +++ b/src/gen/http/isomorphic-fetch.ts @@ -12,6 +12,7 @@ export class IsomorphicFetchHttpLibrary implements HttpLibrary { method: method, body: body as any, headers: request.getHeaders(), + signal: request.getSignal(), agent: request.getAgent(), }).then((resp: any) => { const headers: { [name: string]: string } = {}; diff --git a/src/gen/middleware.ts b/src/gen/middleware.ts index 7dcc60bedc..a123ecf210 100644 --- a/src/gen/middleware.ts +++ b/src/gen/middleware.ts @@ -26,10 +26,7 @@ export interface Middleware { } export class PromiseMiddlewareWrapper implements Middleware { - - public constructor(private middleware: PromiseMiddleware) { - - } + public constructor(private middleware: PromiseMiddleware) {} pre(context: RequestContext): Observable { return from(this.middleware.pre(context)); @@ -38,7 +35,6 @@ export class PromiseMiddlewareWrapper implements Middleware { post(context: ResponseContext): Observable { return from(this.middleware.post(context)); } - } /** diff --git a/src/gen/types/ObservableAPI.ts b/src/gen/types/ObservableAPI.ts index 6abf82333a..14ba0e55f5 100644 --- a/src/gen/types/ObservableAPI.ts +++ b/src/gen/types/ObservableAPI.ts @@ -1,5 +1,5 @@ import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http.js'; -import { Configuration, ConfigurationOptions } from '../configuration.js' +import { Configuration, ConfigurationOptions, mergeConfiguration } from '../configuration.js' import type { Middleware } from '../middleware.js'; import { Observable, of, from } from '../rxjsStub.js'; import {mergeMap, map} from '../rxjsStub.js'; @@ -718,47 +718,19 @@ export class ObservableAdmissionregistrationApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -799,47 +771,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createMutatingWebhookConfigurationWithHttpInfo(body: V1MutatingWebhookConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createMutatingWebhookConfiguration(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createMutatingWebhookConfigurationWithHttpInfo(rsp))); @@ -867,47 +811,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createValidatingAdmissionPolicyWithHttpInfo(body: V1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createValidatingAdmissionPolicy(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createValidatingAdmissionPolicyWithHttpInfo(rsp))); @@ -935,47 +851,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createValidatingAdmissionPolicyBindingWithHttpInfo(body: V1ValidatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createValidatingAdmissionPolicyBinding(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createValidatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -1003,47 +891,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createValidatingWebhookConfigurationWithHttpInfo(body: V1ValidatingWebhookConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createValidatingWebhookConfiguration(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createValidatingWebhookConfigurationWithHttpInfo(rsp))); @@ -1081,47 +941,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [body] */ public deleteCollectionMutatingWebhookConfigurationWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionMutatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionMutatingWebhookConfigurationWithHttpInfo(rsp))); @@ -1169,47 +1001,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [body] */ public deleteCollectionValidatingAdmissionPolicyWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionValidatingAdmissionPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionValidatingAdmissionPolicyWithHttpInfo(rsp))); @@ -1257,47 +1061,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [body] */ public deleteCollectionValidatingAdmissionPolicyBindingWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionValidatingAdmissionPolicyBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionValidatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -1345,47 +1121,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [body] */ public deleteCollectionValidatingWebhookConfigurationWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionValidatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionValidatingWebhookConfigurationWithHttpInfo(rsp))); @@ -1426,47 +1174,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [body] */ public deleteMutatingWebhookConfigurationWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteMutatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteMutatingWebhookConfigurationWithHttpInfo(rsp))); @@ -1500,47 +1220,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [body] */ public deleteValidatingAdmissionPolicyWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteValidatingAdmissionPolicy(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteValidatingAdmissionPolicyWithHttpInfo(rsp))); @@ -1574,47 +1266,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [body] */ public deleteValidatingAdmissionPolicyBindingWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteValidatingAdmissionPolicyBinding(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteValidatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -1648,47 +1312,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [body] */ public deleteValidatingWebhookConfigurationWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteValidatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteValidatingWebhookConfigurationWithHttpInfo(rsp))); @@ -1714,47 +1350,19 @@ export class ObservableAdmissionregistrationV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -1783,47 +1391,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listMutatingWebhookConfigurationWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listMutatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listMutatingWebhookConfigurationWithHttpInfo(rsp))); @@ -1863,47 +1443,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listValidatingAdmissionPolicyWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listValidatingAdmissionPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listValidatingAdmissionPolicyWithHttpInfo(rsp))); @@ -1943,47 +1495,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listValidatingAdmissionPolicyBindingWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listValidatingAdmissionPolicyBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listValidatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -2023,47 +1547,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listValidatingWebhookConfigurationWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listValidatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listValidatingWebhookConfigurationWithHttpInfo(rsp))); @@ -2099,47 +1595,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchMutatingWebhookConfigurationWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchMutatingWebhookConfigurationWithHttpInfo(rsp))); @@ -2171,47 +1639,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchValidatingAdmissionPolicyWithHttpInfo(rsp))); @@ -2243,47 +1683,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyBindingWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchValidatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -2315,47 +1727,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchValidatingAdmissionPolicyStatusWithHttpInfo(rsp))); @@ -2387,47 +1771,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingWebhookConfigurationWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchValidatingWebhookConfigurationWithHttpInfo(rsp))); @@ -2454,47 +1810,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readMutatingWebhookConfigurationWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readMutatingWebhookConfiguration(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readMutatingWebhookConfigurationWithHttpInfo(rsp))); @@ -2516,47 +1844,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readValidatingAdmissionPolicy(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readValidatingAdmissionPolicyWithHttpInfo(rsp))); @@ -2578,47 +1878,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyBindingWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readValidatingAdmissionPolicyBinding(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readValidatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -2640,47 +1912,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readValidatingAdmissionPolicyStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readValidatingAdmissionPolicyStatusWithHttpInfo(rsp))); @@ -2702,47 +1946,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingWebhookConfigurationWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readValidatingWebhookConfiguration(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readValidatingWebhookConfigurationWithHttpInfo(rsp))); @@ -2768,47 +1984,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceMutatingWebhookConfigurationWithHttpInfo(name: string, body: V1MutatingWebhookConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceMutatingWebhookConfigurationWithHttpInfo(rsp))); @@ -2838,47 +2026,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyWithHttpInfo(name: string, body: V1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceValidatingAdmissionPolicyWithHttpInfo(rsp))); @@ -2908,47 +2068,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyBindingWithHttpInfo(name: string, body: V1ValidatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceValidatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -2978,47 +2110,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyStatusWithHttpInfo(name: string, body: V1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceValidatingAdmissionPolicyStatusWithHttpInfo(rsp))); @@ -3048,47 +2152,19 @@ export class ObservableAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingWebhookConfigurationWithHttpInfo(name: string, body: V1ValidatingWebhookConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceValidatingWebhookConfigurationWithHttpInfo(rsp))); @@ -3135,47 +2211,19 @@ export class ObservableAdmissionregistrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createMutatingAdmissionPolicyWithHttpInfo(body: V1alpha1MutatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createMutatingAdmissionPolicy(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createMutatingAdmissionPolicyWithHttpInfo(rsp))); @@ -3203,47 +2251,19 @@ export class ObservableAdmissionregistrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createMutatingAdmissionPolicyBindingWithHttpInfo(body: V1alpha1MutatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createMutatingAdmissionPolicyBinding(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createMutatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -3281,47 +2301,19 @@ export class ObservableAdmissionregistrationV1alpha1Api { * @param [body] */ public deleteCollectionMutatingAdmissionPolicyWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionMutatingAdmissionPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionMutatingAdmissionPolicyWithHttpInfo(rsp))); @@ -3369,47 +2361,19 @@ export class ObservableAdmissionregistrationV1alpha1Api { * @param [body] */ public deleteCollectionMutatingAdmissionPolicyBindingWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionMutatingAdmissionPolicyBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionMutatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -3450,47 +2414,19 @@ export class ObservableAdmissionregistrationV1alpha1Api { * @param [body] */ public deleteMutatingAdmissionPolicyWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteMutatingAdmissionPolicy(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteMutatingAdmissionPolicyWithHttpInfo(rsp))); @@ -3524,47 +2460,19 @@ export class ObservableAdmissionregistrationV1alpha1Api { * @param [body] */ public deleteMutatingAdmissionPolicyBindingWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteMutatingAdmissionPolicyBinding(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteMutatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -3590,47 +2498,19 @@ export class ObservableAdmissionregistrationV1alpha1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -3659,47 +2539,19 @@ export class ObservableAdmissionregistrationV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listMutatingAdmissionPolicyWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listMutatingAdmissionPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listMutatingAdmissionPolicyWithHttpInfo(rsp))); @@ -3739,47 +2591,19 @@ export class ObservableAdmissionregistrationV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listMutatingAdmissionPolicyBindingWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listMutatingAdmissionPolicyBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listMutatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -3815,47 +2639,19 @@ export class ObservableAdmissionregistrationV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchMutatingAdmissionPolicyWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchMutatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchMutatingAdmissionPolicyWithHttpInfo(rsp))); @@ -3887,47 +2683,19 @@ export class ObservableAdmissionregistrationV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchMutatingAdmissionPolicyBindingWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchMutatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchMutatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -3954,47 +2722,19 @@ export class ObservableAdmissionregistrationV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readMutatingAdmissionPolicyWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readMutatingAdmissionPolicy(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readMutatingAdmissionPolicyWithHttpInfo(rsp))); @@ -4016,47 +2756,19 @@ export class ObservableAdmissionregistrationV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readMutatingAdmissionPolicyBindingWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readMutatingAdmissionPolicyBinding(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readMutatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -4082,47 +2794,19 @@ export class ObservableAdmissionregistrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceMutatingAdmissionPolicyWithHttpInfo(name: string, body: V1alpha1MutatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceMutatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceMutatingAdmissionPolicyWithHttpInfo(rsp))); @@ -4152,47 +2836,19 @@ export class ObservableAdmissionregistrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceMutatingAdmissionPolicyBindingWithHttpInfo(name: string, body: V1alpha1MutatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceMutatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceMutatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -4239,47 +2895,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createValidatingAdmissionPolicyWithHttpInfo(body: V1beta1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createValidatingAdmissionPolicy(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createValidatingAdmissionPolicyWithHttpInfo(rsp))); @@ -4307,47 +2935,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createValidatingAdmissionPolicyBindingWithHttpInfo(body: V1beta1ValidatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createValidatingAdmissionPolicyBinding(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createValidatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -4385,47 +2985,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [body] */ public deleteCollectionValidatingAdmissionPolicyWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionValidatingAdmissionPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionValidatingAdmissionPolicyWithHttpInfo(rsp))); @@ -4473,47 +3045,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [body] */ public deleteCollectionValidatingAdmissionPolicyBindingWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionValidatingAdmissionPolicyBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionValidatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -4554,47 +3098,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [body] */ public deleteValidatingAdmissionPolicyWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteValidatingAdmissionPolicy(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteValidatingAdmissionPolicyWithHttpInfo(rsp))); @@ -4628,47 +3144,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [body] */ public deleteValidatingAdmissionPolicyBindingWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteValidatingAdmissionPolicyBinding(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteValidatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -4694,47 +3182,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -4763,47 +3223,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listValidatingAdmissionPolicyWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listValidatingAdmissionPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listValidatingAdmissionPolicyWithHttpInfo(rsp))); @@ -4843,47 +3275,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listValidatingAdmissionPolicyBindingWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listValidatingAdmissionPolicyBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listValidatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -4919,47 +3323,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchValidatingAdmissionPolicyWithHttpInfo(rsp))); @@ -4991,47 +3367,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyBindingWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchValidatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -5063,47 +3411,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchValidatingAdmissionPolicyStatusWithHttpInfo(rsp))); @@ -5130,47 +3450,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readValidatingAdmissionPolicy(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readValidatingAdmissionPolicyWithHttpInfo(rsp))); @@ -5192,47 +3484,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyBindingWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readValidatingAdmissionPolicyBinding(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readValidatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -5254,47 +3518,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readValidatingAdmissionPolicyStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readValidatingAdmissionPolicyStatusWithHttpInfo(rsp))); @@ -5320,47 +3556,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyWithHttpInfo(name: string, body: V1beta1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceValidatingAdmissionPolicyWithHttpInfo(rsp))); @@ -5390,47 +3598,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyBindingWithHttpInfo(name: string, body: V1beta1ValidatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceValidatingAdmissionPolicyBindingWithHttpInfo(rsp))); @@ -5460,47 +3640,19 @@ export class ObservableAdmissionregistrationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyStatusWithHttpInfo(name: string, body: V1beta1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceValidatingAdmissionPolicyStatusWithHttpInfo(rsp))); @@ -5542,47 +3694,19 @@ export class ObservableApiextensionsApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -5623,47 +3747,19 @@ export class ObservableApiextensionsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createCustomResourceDefinitionWithHttpInfo(body: V1CustomResourceDefinition, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createCustomResourceDefinition(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createCustomResourceDefinitionWithHttpInfo(rsp))); @@ -5701,47 +3797,19 @@ export class ObservableApiextensionsV1Api { * @param [body] */ public deleteCollectionCustomResourceDefinitionWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionCustomResourceDefinition(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionCustomResourceDefinitionWithHttpInfo(rsp))); @@ -5782,47 +3850,19 @@ export class ObservableApiextensionsV1Api { * @param [body] */ public deleteCustomResourceDefinitionWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCustomResourceDefinition(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCustomResourceDefinitionWithHttpInfo(rsp))); @@ -5848,47 +3888,19 @@ export class ObservableApiextensionsV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -5917,47 +3929,19 @@ export class ObservableApiextensionsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCustomResourceDefinitionWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listCustomResourceDefinition(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listCustomResourceDefinitionWithHttpInfo(rsp))); @@ -5993,47 +3977,19 @@ export class ObservableApiextensionsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCustomResourceDefinitionWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchCustomResourceDefinitionWithHttpInfo(rsp))); @@ -6065,47 +4021,19 @@ export class ObservableApiextensionsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCustomResourceDefinitionStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchCustomResourceDefinitionStatusWithHttpInfo(rsp))); @@ -6132,47 +4060,19 @@ export class ObservableApiextensionsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCustomResourceDefinitionWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readCustomResourceDefinition(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readCustomResourceDefinitionWithHttpInfo(rsp))); @@ -6194,47 +4094,19 @@ export class ObservableApiextensionsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCustomResourceDefinitionStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readCustomResourceDefinitionStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readCustomResourceDefinitionStatusWithHttpInfo(rsp))); @@ -6260,47 +4132,19 @@ export class ObservableApiextensionsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCustomResourceDefinitionWithHttpInfo(name: string, body: V1CustomResourceDefinition, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceCustomResourceDefinitionWithHttpInfo(rsp))); @@ -6330,47 +4174,19 @@ export class ObservableApiextensionsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCustomResourceDefinitionStatusWithHttpInfo(name: string, body: V1CustomResourceDefinition, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceCustomResourceDefinitionStatusWithHttpInfo(rsp))); @@ -6412,47 +4228,19 @@ export class ObservableApiregistrationApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -6493,47 +4281,19 @@ export class ObservableApiregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createAPIServiceWithHttpInfo(body: V1APIService, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createAPIService(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createAPIServiceWithHttpInfo(rsp))); @@ -6564,47 +4324,19 @@ export class ObservableApiregistrationV1Api { * @param [body] */ public deleteAPIServiceWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteAPIService(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteAPIServiceWithHttpInfo(rsp))); @@ -6645,47 +4377,19 @@ export class ObservableApiregistrationV1Api { * @param [body] */ public deleteCollectionAPIServiceWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionAPIService(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionAPIServiceWithHttpInfo(rsp))); @@ -6718,47 +4422,19 @@ export class ObservableApiregistrationV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -6787,47 +4463,19 @@ export class ObservableApiregistrationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listAPIServiceWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listAPIService(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listAPIServiceWithHttpInfo(rsp))); @@ -6863,47 +4511,19 @@ export class ObservableApiregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchAPIServiceWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchAPIService(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchAPIServiceWithHttpInfo(rsp))); @@ -6935,47 +4555,19 @@ export class ObservableApiregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchAPIServiceStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchAPIServiceStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchAPIServiceStatusWithHttpInfo(rsp))); @@ -7002,47 +4594,19 @@ export class ObservableApiregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readAPIServiceWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readAPIService(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readAPIServiceWithHttpInfo(rsp))); @@ -7064,47 +4628,19 @@ export class ObservableApiregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readAPIServiceStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readAPIServiceStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readAPIServiceStatusWithHttpInfo(rsp))); @@ -7130,47 +4666,19 @@ export class ObservableApiregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceAPIServiceWithHttpInfo(name: string, body: V1APIService, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceAPIService(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceAPIServiceWithHttpInfo(rsp))); @@ -7200,47 +4708,19 @@ export class ObservableApiregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceAPIServiceStatusWithHttpInfo(name: string, body: V1APIService, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceAPIServiceStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceAPIServiceStatusWithHttpInfo(rsp))); @@ -7282,47 +4762,19 @@ export class ObservableApisApi { * get available API versions */ public getAPIVersionsWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIVersions(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIVersionsWithHttpInfo(rsp))); @@ -7358,47 +4810,19 @@ export class ObservableAppsApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -7440,47 +4864,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedControllerRevisionWithHttpInfo(namespace: string, body: V1ControllerRevision, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedControllerRevision(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedControllerRevisionWithHttpInfo(rsp))); @@ -7510,47 +4906,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedDaemonSetWithHttpInfo(namespace: string, body: V1DaemonSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedDaemonSet(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedDaemonSetWithHttpInfo(rsp))); @@ -7580,47 +4948,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedDeploymentWithHttpInfo(namespace: string, body: V1Deployment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedDeployment(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedDeploymentWithHttpInfo(rsp))); @@ -7650,47 +4990,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedReplicaSetWithHttpInfo(namespace: string, body: V1ReplicaSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedReplicaSet(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedReplicaSetWithHttpInfo(rsp))); @@ -7720,47 +5032,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedStatefulSetWithHttpInfo(namespace: string, body: V1StatefulSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedStatefulSet(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedStatefulSetWithHttpInfo(rsp))); @@ -7800,47 +5084,19 @@ export class ObservableAppsV1Api { * @param [body] */ public deleteCollectionNamespacedControllerRevisionWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedControllerRevision(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedControllerRevisionWithHttpInfo(rsp))); @@ -7890,47 +5146,19 @@ export class ObservableAppsV1Api { * @param [body] */ public deleteCollectionNamespacedDaemonSetWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedDaemonSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedDaemonSetWithHttpInfo(rsp))); @@ -7980,47 +5208,19 @@ export class ObservableAppsV1Api { * @param [body] */ public deleteCollectionNamespacedDeploymentWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedDeployment(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedDeploymentWithHttpInfo(rsp))); @@ -8070,47 +5270,19 @@ export class ObservableAppsV1Api { * @param [body] */ public deleteCollectionNamespacedReplicaSetWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedReplicaSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedReplicaSetWithHttpInfo(rsp))); @@ -8160,47 +5332,19 @@ export class ObservableAppsV1Api { * @param [body] */ public deleteCollectionNamespacedStatefulSetWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedStatefulSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedStatefulSetWithHttpInfo(rsp))); @@ -8243,47 +5387,19 @@ export class ObservableAppsV1Api { * @param [body] */ public deleteNamespacedControllerRevisionWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedControllerRevision(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedControllerRevisionWithHttpInfo(rsp))); @@ -8319,47 +5435,19 @@ export class ObservableAppsV1Api { * @param [body] */ public deleteNamespacedDaemonSetWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedDaemonSet(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedDaemonSetWithHttpInfo(rsp))); @@ -8395,47 +5483,19 @@ export class ObservableAppsV1Api { * @param [body] */ public deleteNamespacedDeploymentWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedDeployment(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedDeploymentWithHttpInfo(rsp))); @@ -8471,47 +5531,19 @@ export class ObservableAppsV1Api { * @param [body] */ public deleteNamespacedReplicaSetWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedReplicaSet(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedReplicaSetWithHttpInfo(rsp))); @@ -8547,47 +5579,19 @@ export class ObservableAppsV1Api { * @param [body] */ public deleteNamespacedStatefulSetWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedStatefulSet(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedStatefulSetWithHttpInfo(rsp))); @@ -8614,47 +5618,19 @@ export class ObservableAppsV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -8683,47 +5659,19 @@ export class ObservableAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listControllerRevisionForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listControllerRevisionForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listControllerRevisionForAllNamespacesWithHttpInfo(rsp))); @@ -8763,47 +5711,19 @@ export class ObservableAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDaemonSetForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listDaemonSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listDaemonSetForAllNamespacesWithHttpInfo(rsp))); @@ -8843,47 +5763,19 @@ export class ObservableAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDeploymentForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listDeploymentForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listDeploymentForAllNamespacesWithHttpInfo(rsp))); @@ -8924,47 +5816,19 @@ export class ObservableAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedControllerRevisionWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedControllerRevision(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedControllerRevisionWithHttpInfo(rsp))); @@ -9006,47 +5870,19 @@ export class ObservableAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedDaemonSetWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedDaemonSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedDaemonSetWithHttpInfo(rsp))); @@ -9088,47 +5924,19 @@ export class ObservableAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedDeploymentWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedDeployment(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedDeploymentWithHttpInfo(rsp))); @@ -9170,47 +5978,19 @@ export class ObservableAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedReplicaSetWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedReplicaSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedReplicaSetWithHttpInfo(rsp))); @@ -9252,47 +6032,19 @@ export class ObservableAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedStatefulSetWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedStatefulSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedStatefulSetWithHttpInfo(rsp))); @@ -9333,47 +6085,19 @@ export class ObservableAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listReplicaSetForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listReplicaSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listReplicaSetForAllNamespacesWithHttpInfo(rsp))); @@ -9413,47 +6137,19 @@ export class ObservableAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listStatefulSetForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listStatefulSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listStatefulSetForAllNamespacesWithHttpInfo(rsp))); @@ -9490,47 +6186,19 @@ export class ObservableAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedControllerRevisionWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedControllerRevisionWithHttpInfo(rsp))); @@ -9564,47 +6232,19 @@ export class ObservableAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedDaemonSetWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedDaemonSetWithHttpInfo(rsp))); @@ -9638,47 +6278,19 @@ export class ObservableAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedDaemonSetStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedDaemonSetStatusWithHttpInfo(rsp))); @@ -9712,47 +6324,19 @@ export class ObservableAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedDeploymentWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedDeploymentWithHttpInfo(rsp))); @@ -9786,47 +6370,19 @@ export class ObservableAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedDeploymentScaleWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedDeploymentScaleWithHttpInfo(rsp))); @@ -9860,47 +6416,19 @@ export class ObservableAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedDeploymentStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedDeploymentStatusWithHttpInfo(rsp))); @@ -9934,47 +6462,19 @@ export class ObservableAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicaSetWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedReplicaSetWithHttpInfo(rsp))); @@ -10008,47 +6508,19 @@ export class ObservableAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicaSetScaleWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedReplicaSetScaleWithHttpInfo(rsp))); @@ -10082,47 +6554,19 @@ export class ObservableAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicaSetStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedReplicaSetStatusWithHttpInfo(rsp))); @@ -10156,47 +6600,19 @@ export class ObservableAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedStatefulSetWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedStatefulSetWithHttpInfo(rsp))); @@ -10230,47 +6646,19 @@ export class ObservableAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedStatefulSetScaleWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedStatefulSetScaleWithHttpInfo(rsp))); @@ -10304,47 +6692,19 @@ export class ObservableAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedStatefulSetStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedStatefulSetStatusWithHttpInfo(rsp))); @@ -10373,47 +6733,19 @@ export class ObservableAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedControllerRevisionWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedControllerRevision(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedControllerRevisionWithHttpInfo(rsp))); @@ -10437,47 +6769,19 @@ export class ObservableAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedDaemonSetWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedDaemonSet(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedDaemonSetWithHttpInfo(rsp))); @@ -10501,47 +6805,19 @@ export class ObservableAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedDaemonSetStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedDaemonSetStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedDaemonSetStatusWithHttpInfo(rsp))); @@ -10565,47 +6841,19 @@ export class ObservableAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedDeploymentWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedDeployment(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedDeploymentWithHttpInfo(rsp))); @@ -10629,47 +6877,19 @@ export class ObservableAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedDeploymentScaleWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedDeploymentScale(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedDeploymentScaleWithHttpInfo(rsp))); @@ -10693,47 +6913,19 @@ export class ObservableAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedDeploymentStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedDeploymentStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedDeploymentStatusWithHttpInfo(rsp))); @@ -10757,47 +6949,19 @@ export class ObservableAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicaSetWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedReplicaSet(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedReplicaSetWithHttpInfo(rsp))); @@ -10821,47 +6985,19 @@ export class ObservableAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicaSetScaleWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedReplicaSetScale(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedReplicaSetScaleWithHttpInfo(rsp))); @@ -10885,47 +7021,19 @@ export class ObservableAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicaSetStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedReplicaSetStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedReplicaSetStatusWithHttpInfo(rsp))); @@ -10949,47 +7057,19 @@ export class ObservableAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedStatefulSetWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedStatefulSet(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedStatefulSetWithHttpInfo(rsp))); @@ -11013,47 +7093,19 @@ export class ObservableAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedStatefulSetScaleWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedStatefulSetScale(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedStatefulSetScaleWithHttpInfo(rsp))); @@ -11077,47 +7129,19 @@ export class ObservableAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedStatefulSetStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedStatefulSetStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedStatefulSetStatusWithHttpInfo(rsp))); @@ -11145,47 +7169,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedControllerRevisionWithHttpInfo(name: string, namespace: string, body: V1ControllerRevision, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedControllerRevisionWithHttpInfo(rsp))); @@ -11217,47 +7213,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedDaemonSetWithHttpInfo(name: string, namespace: string, body: V1DaemonSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedDaemonSetWithHttpInfo(rsp))); @@ -11289,47 +7257,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedDaemonSetStatusWithHttpInfo(name: string, namespace: string, body: V1DaemonSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedDaemonSetStatusWithHttpInfo(rsp))); @@ -11361,47 +7301,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedDeploymentWithHttpInfo(name: string, namespace: string, body: V1Deployment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedDeploymentWithHttpInfo(rsp))); @@ -11433,47 +7345,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedDeploymentScaleWithHttpInfo(name: string, namespace: string, body: V1Scale, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedDeploymentScaleWithHttpInfo(rsp))); @@ -11505,47 +7389,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedDeploymentStatusWithHttpInfo(name: string, namespace: string, body: V1Deployment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedDeploymentStatusWithHttpInfo(rsp))); @@ -11577,47 +7433,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicaSetWithHttpInfo(name: string, namespace: string, body: V1ReplicaSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedReplicaSetWithHttpInfo(rsp))); @@ -11649,47 +7477,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicaSetScaleWithHttpInfo(name: string, namespace: string, body: V1Scale, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedReplicaSetScaleWithHttpInfo(rsp))); @@ -11721,47 +7521,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicaSetStatusWithHttpInfo(name: string, namespace: string, body: V1ReplicaSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedReplicaSetStatusWithHttpInfo(rsp))); @@ -11793,47 +7565,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedStatefulSetWithHttpInfo(name: string, namespace: string, body: V1StatefulSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedStatefulSetWithHttpInfo(rsp))); @@ -11865,47 +7609,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedStatefulSetScaleWithHttpInfo(name: string, namespace: string, body: V1Scale, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedStatefulSetScaleWithHttpInfo(rsp))); @@ -11937,47 +7653,19 @@ export class ObservableAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedStatefulSetStatusWithHttpInfo(name: string, namespace: string, body: V1StatefulSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedStatefulSetStatusWithHttpInfo(rsp))); @@ -12020,47 +7708,19 @@ export class ObservableAuthenticationApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -12101,47 +7761,19 @@ export class ObservableAuthenticationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createSelfSubjectReviewWithHttpInfo(body: V1SelfSubjectReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createSelfSubjectReview(body, dryRun, fieldManager, fieldValidation, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createSelfSubjectReviewWithHttpInfo(rsp))); @@ -12169,47 +7801,19 @@ export class ObservableAuthenticationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createTokenReviewWithHttpInfo(body: V1TokenReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createTokenReview(body, dryRun, fieldManager, fieldValidation, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createTokenReviewWithHttpInfo(rsp))); @@ -12232,47 +7836,19 @@ export class ObservableAuthenticationV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -12308,47 +7884,19 @@ export class ObservableAuthorizationApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -12390,47 +7938,19 @@ export class ObservableAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createNamespacedLocalSubjectAccessReviewWithHttpInfo(namespace: string, body: V1LocalSubjectAccessReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, fieldManager, fieldValidation, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedLocalSubjectAccessReviewWithHttpInfo(rsp))); @@ -12459,47 +7979,19 @@ export class ObservableAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createSelfSubjectAccessReviewWithHttpInfo(body: V1SelfSubjectAccessReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createSelfSubjectAccessReview(body, dryRun, fieldManager, fieldValidation, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createSelfSubjectAccessReviewWithHttpInfo(rsp))); @@ -12527,47 +8019,19 @@ export class ObservableAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createSelfSubjectRulesReviewWithHttpInfo(body: V1SelfSubjectRulesReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createSelfSubjectRulesReview(body, dryRun, fieldManager, fieldValidation, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createSelfSubjectRulesReviewWithHttpInfo(rsp))); @@ -12595,47 +8059,19 @@ export class ObservableAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createSubjectAccessReviewWithHttpInfo(body: V1SubjectAccessReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createSubjectAccessReview(body, dryRun, fieldManager, fieldValidation, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createSubjectAccessReviewWithHttpInfo(rsp))); @@ -12658,47 +8094,19 @@ export class ObservableAuthorizationV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -12734,47 +8142,19 @@ export class ObservableAutoscalingApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -12816,47 +8196,19 @@ export class ObservableAutoscalingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace: string, body: V1HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedHorizontalPodAutoscalerWithHttpInfo(rsp))); @@ -12896,47 +8248,19 @@ export class ObservableAutoscalingV1Api { * @param [body] */ public deleteCollectionNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedHorizontalPodAutoscalerWithHttpInfo(rsp))); @@ -12979,47 +8303,19 @@ export class ObservableAutoscalingV1Api { * @param [body] */ public deleteNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedHorizontalPodAutoscalerWithHttpInfo(rsp))); @@ -13046,47 +8342,19 @@ export class ObservableAutoscalingV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -13115,47 +8383,19 @@ export class ObservableAutoscalingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listHorizontalPodAutoscalerForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listHorizontalPodAutoscalerForAllNamespacesWithHttpInfo(rsp))); @@ -13196,47 +8436,19 @@ export class ObservableAutoscalingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedHorizontalPodAutoscalerWithHttpInfo(rsp))); @@ -13274,47 +8486,19 @@ export class ObservableAutoscalingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedHorizontalPodAutoscalerWithHttpInfo(rsp))); @@ -13348,47 +8532,19 @@ export class ObservableAutoscalingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(rsp))); @@ -13417,47 +8573,19 @@ export class ObservableAutoscalingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedHorizontalPodAutoscalerWithHttpInfo(rsp))); @@ -13481,47 +8609,19 @@ export class ObservableAutoscalingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(rsp))); @@ -13549,47 +8649,19 @@ export class ObservableAutoscalingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, body: V1HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedHorizontalPodAutoscalerWithHttpInfo(rsp))); @@ -13621,47 +8693,19 @@ export class ObservableAutoscalingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name: string, namespace: string, body: V1HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(rsp))); @@ -13710,47 +8754,19 @@ export class ObservableAutoscalingV2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace: string, body: V2HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedHorizontalPodAutoscalerWithHttpInfo(rsp))); @@ -13790,47 +8806,19 @@ export class ObservableAutoscalingV2Api { * @param [body] */ public deleteCollectionNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedHorizontalPodAutoscalerWithHttpInfo(rsp))); @@ -13873,47 +8861,19 @@ export class ObservableAutoscalingV2Api { * @param [body] */ public deleteNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedHorizontalPodAutoscalerWithHttpInfo(rsp))); @@ -13940,47 +8900,19 @@ export class ObservableAutoscalingV2Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -14009,47 +8941,19 @@ export class ObservableAutoscalingV2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listHorizontalPodAutoscalerForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listHorizontalPodAutoscalerForAllNamespacesWithHttpInfo(rsp))); @@ -14090,47 +8994,19 @@ export class ObservableAutoscalingV2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedHorizontalPodAutoscalerWithHttpInfo(rsp))); @@ -14168,47 +9044,19 @@ export class ObservableAutoscalingV2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedHorizontalPodAutoscalerWithHttpInfo(rsp))); @@ -14242,47 +9090,19 @@ export class ObservableAutoscalingV2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(rsp))); @@ -14311,47 +9131,19 @@ export class ObservableAutoscalingV2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedHorizontalPodAutoscalerWithHttpInfo(rsp))); @@ -14375,47 +9167,19 @@ export class ObservableAutoscalingV2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(rsp))); @@ -14443,47 +9207,19 @@ export class ObservableAutoscalingV2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, body: V2HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedHorizontalPodAutoscalerWithHttpInfo(rsp))); @@ -14515,47 +9251,19 @@ export class ObservableAutoscalingV2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name: string, namespace: string, body: V2HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(rsp))); @@ -14598,47 +9306,19 @@ export class ObservableBatchApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -14680,47 +9360,19 @@ export class ObservableBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedCronJobWithHttpInfo(namespace: string, body: V1CronJob, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedCronJob(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedCronJobWithHttpInfo(rsp))); @@ -14750,47 +9402,19 @@ export class ObservableBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedJobWithHttpInfo(namespace: string, body: V1Job, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedJob(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedJobWithHttpInfo(rsp))); @@ -14830,47 +9454,19 @@ export class ObservableBatchV1Api { * @param [body] */ public deleteCollectionNamespacedCronJobWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedCronJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedCronJobWithHttpInfo(rsp))); @@ -14920,47 +9516,19 @@ export class ObservableBatchV1Api { * @param [body] */ public deleteCollectionNamespacedJobWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedJobWithHttpInfo(rsp))); @@ -15003,47 +9571,19 @@ export class ObservableBatchV1Api { * @param [body] */ public deleteNamespacedCronJobWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedCronJob(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedCronJobWithHttpInfo(rsp))); @@ -15079,47 +9619,19 @@ export class ObservableBatchV1Api { * @param [body] */ public deleteNamespacedJobWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedJob(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedJobWithHttpInfo(rsp))); @@ -15146,47 +9658,19 @@ export class ObservableBatchV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -15215,47 +9699,19 @@ export class ObservableBatchV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCronJobForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listCronJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listCronJobForAllNamespacesWithHttpInfo(rsp))); @@ -15295,47 +9751,19 @@ export class ObservableBatchV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listJobForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listJobForAllNamespacesWithHttpInfo(rsp))); @@ -15376,47 +9804,19 @@ export class ObservableBatchV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedCronJobWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedCronJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedCronJobWithHttpInfo(rsp))); @@ -15458,47 +9858,19 @@ export class ObservableBatchV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedJobWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedJobWithHttpInfo(rsp))); @@ -15536,47 +9908,19 @@ export class ObservableBatchV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCronJobWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedCronJobWithHttpInfo(rsp))); @@ -15610,47 +9954,19 @@ export class ObservableBatchV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCronJobStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedCronJobStatusWithHttpInfo(rsp))); @@ -15684,47 +10000,19 @@ export class ObservableBatchV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedJobWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedJobWithHttpInfo(rsp))); @@ -15758,47 +10046,19 @@ export class ObservableBatchV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedJobStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedJobStatusWithHttpInfo(rsp))); @@ -15827,47 +10087,19 @@ export class ObservableBatchV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedCronJobWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedCronJob(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedCronJobWithHttpInfo(rsp))); @@ -15891,47 +10123,19 @@ export class ObservableBatchV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedCronJobStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedCronJobStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedCronJobStatusWithHttpInfo(rsp))); @@ -15955,47 +10159,19 @@ export class ObservableBatchV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedJobWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedJob(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedJobWithHttpInfo(rsp))); @@ -16019,47 +10195,19 @@ export class ObservableBatchV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedJobStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedJobStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedJobStatusWithHttpInfo(rsp))); @@ -16087,47 +10235,19 @@ export class ObservableBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedCronJobWithHttpInfo(name: string, namespace: string, body: V1CronJob, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedCronJobWithHttpInfo(rsp))); @@ -16159,47 +10279,19 @@ export class ObservableBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedCronJobStatusWithHttpInfo(name: string, namespace: string, body: V1CronJob, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedCronJobStatusWithHttpInfo(rsp))); @@ -16231,47 +10323,19 @@ export class ObservableBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedJobWithHttpInfo(name: string, namespace: string, body: V1Job, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedJobWithHttpInfo(rsp))); @@ -16303,47 +10367,19 @@ export class ObservableBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedJobStatusWithHttpInfo(name: string, namespace: string, body: V1Job, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedJobStatusWithHttpInfo(rsp))); @@ -16386,47 +10422,19 @@ export class ObservableCertificatesApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -16467,47 +10475,19 @@ export class ObservableCertificatesV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createCertificateSigningRequestWithHttpInfo(body: V1CertificateSigningRequest, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createCertificateSigningRequest(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createCertificateSigningRequestWithHttpInfo(rsp))); @@ -16538,47 +10518,19 @@ export class ObservableCertificatesV1Api { * @param [body] */ public deleteCertificateSigningRequestWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCertificateSigningRequest(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCertificateSigningRequestWithHttpInfo(rsp))); @@ -16619,47 +10571,19 @@ export class ObservableCertificatesV1Api { * @param [body] */ public deleteCollectionCertificateSigningRequestWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionCertificateSigningRequest(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionCertificateSigningRequestWithHttpInfo(rsp))); @@ -16692,47 +10616,19 @@ export class ObservableCertificatesV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -16761,47 +10657,19 @@ export class ObservableCertificatesV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCertificateSigningRequestWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listCertificateSigningRequest(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listCertificateSigningRequestWithHttpInfo(rsp))); @@ -16837,47 +10705,19 @@ export class ObservableCertificatesV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCertificateSigningRequestWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchCertificateSigningRequestWithHttpInfo(rsp))); @@ -16909,47 +10749,19 @@ export class ObservableCertificatesV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCertificateSigningRequestApprovalWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchCertificateSigningRequestApprovalWithHttpInfo(rsp))); @@ -16981,47 +10793,19 @@ export class ObservableCertificatesV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCertificateSigningRequestStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchCertificateSigningRequestStatusWithHttpInfo(rsp))); @@ -17048,47 +10832,19 @@ export class ObservableCertificatesV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCertificateSigningRequestWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readCertificateSigningRequest(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readCertificateSigningRequestWithHttpInfo(rsp))); @@ -17110,47 +10866,19 @@ export class ObservableCertificatesV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCertificateSigningRequestApprovalWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readCertificateSigningRequestApproval(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readCertificateSigningRequestApprovalWithHttpInfo(rsp))); @@ -17172,47 +10900,19 @@ export class ObservableCertificatesV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCertificateSigningRequestStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readCertificateSigningRequestStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readCertificateSigningRequestStatusWithHttpInfo(rsp))); @@ -17238,47 +10938,19 @@ export class ObservableCertificatesV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCertificateSigningRequestWithHttpInfo(name: string, body: V1CertificateSigningRequest, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceCertificateSigningRequestWithHttpInfo(rsp))); @@ -17308,47 +10980,19 @@ export class ObservableCertificatesV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCertificateSigningRequestApprovalWithHttpInfo(name: string, body: V1CertificateSigningRequest, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceCertificateSigningRequestApprovalWithHttpInfo(rsp))); @@ -17378,47 +11022,19 @@ export class ObservableCertificatesV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCertificateSigningRequestStatusWithHttpInfo(name: string, body: V1CertificateSigningRequest, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceCertificateSigningRequestStatusWithHttpInfo(rsp))); @@ -17465,47 +11081,19 @@ export class ObservableCertificatesV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createClusterTrustBundleWithHttpInfo(body: V1alpha1ClusterTrustBundle, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createClusterTrustBundle(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createClusterTrustBundleWithHttpInfo(rsp))); @@ -17536,47 +11124,19 @@ export class ObservableCertificatesV1alpha1Api { * @param [body] */ public deleteClusterTrustBundleWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteClusterTrustBundle(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteClusterTrustBundleWithHttpInfo(rsp))); @@ -17617,47 +11177,19 @@ export class ObservableCertificatesV1alpha1Api { * @param [body] */ public deleteCollectionClusterTrustBundleWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionClusterTrustBundle(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionClusterTrustBundleWithHttpInfo(rsp))); @@ -17690,47 +11222,19 @@ export class ObservableCertificatesV1alpha1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -17759,47 +11263,19 @@ export class ObservableCertificatesV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listClusterTrustBundleWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listClusterTrustBundle(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listClusterTrustBundleWithHttpInfo(rsp))); @@ -17835,47 +11311,19 @@ export class ObservableCertificatesV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterTrustBundleWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchClusterTrustBundle(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchClusterTrustBundleWithHttpInfo(rsp))); @@ -17902,47 +11350,19 @@ export class ObservableCertificatesV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readClusterTrustBundleWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readClusterTrustBundle(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readClusterTrustBundleWithHttpInfo(rsp))); @@ -17968,47 +11388,19 @@ export class ObservableCertificatesV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceClusterTrustBundleWithHttpInfo(name: string, body: V1alpha1ClusterTrustBundle, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceClusterTrustBundle(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceClusterTrustBundleWithHttpInfo(rsp))); @@ -18055,47 +11447,19 @@ export class ObservableCertificatesV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createClusterTrustBundleWithHttpInfo(body: V1beta1ClusterTrustBundle, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createClusterTrustBundle(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createClusterTrustBundleWithHttpInfo(rsp))); @@ -18126,47 +11490,19 @@ export class ObservableCertificatesV1beta1Api { * @param [body] */ public deleteClusterTrustBundleWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteClusterTrustBundle(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteClusterTrustBundleWithHttpInfo(rsp))); @@ -18207,47 +11543,19 @@ export class ObservableCertificatesV1beta1Api { * @param [body] */ public deleteCollectionClusterTrustBundleWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionClusterTrustBundle(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionClusterTrustBundleWithHttpInfo(rsp))); @@ -18280,47 +11588,19 @@ export class ObservableCertificatesV1beta1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -18349,47 +11629,19 @@ export class ObservableCertificatesV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listClusterTrustBundleWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listClusterTrustBundle(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listClusterTrustBundleWithHttpInfo(rsp))); @@ -18425,47 +11677,19 @@ export class ObservableCertificatesV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterTrustBundleWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchClusterTrustBundle(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchClusterTrustBundleWithHttpInfo(rsp))); @@ -18492,47 +11716,19 @@ export class ObservableCertificatesV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readClusterTrustBundleWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readClusterTrustBundle(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readClusterTrustBundleWithHttpInfo(rsp))); @@ -18558,47 +11754,19 @@ export class ObservableCertificatesV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceClusterTrustBundleWithHttpInfo(name: string, body: V1beta1ClusterTrustBundle, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceClusterTrustBundle(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceClusterTrustBundleWithHttpInfo(rsp))); @@ -18640,47 +11808,19 @@ export class ObservableCoordinationApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -18722,47 +11862,19 @@ export class ObservableCoordinationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedLeaseWithHttpInfo(namespace: string, body: V1Lease, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedLease(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedLeaseWithHttpInfo(rsp))); @@ -18802,47 +11914,19 @@ export class ObservableCoordinationV1Api { * @param [body] */ public deleteCollectionNamespacedLeaseWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedLease(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedLeaseWithHttpInfo(rsp))); @@ -18885,47 +11969,19 @@ export class ObservableCoordinationV1Api { * @param [body] */ public deleteNamespacedLeaseWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedLease(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedLeaseWithHttpInfo(rsp))); @@ -18952,47 +12008,19 @@ export class ObservableCoordinationV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -19021,47 +12049,19 @@ export class ObservableCoordinationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listLeaseForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listLeaseForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listLeaseForAllNamespacesWithHttpInfo(rsp))); @@ -19102,47 +12102,19 @@ export class ObservableCoordinationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedLeaseWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedLease(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedLeaseWithHttpInfo(rsp))); @@ -19180,47 +12152,19 @@ export class ObservableCoordinationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedLeaseWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedLeaseWithHttpInfo(rsp))); @@ -19249,47 +12193,19 @@ export class ObservableCoordinationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedLeaseWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedLease(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedLeaseWithHttpInfo(rsp))); @@ -19317,47 +12233,19 @@ export class ObservableCoordinationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedLeaseWithHttpInfo(name: string, namespace: string, body: V1Lease, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedLeaseWithHttpInfo(rsp))); @@ -19406,47 +12294,19 @@ export class ObservableCoordinationV1alpha2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedLeaseCandidateWithHttpInfo(namespace: string, body: V1alpha2LeaseCandidate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedLeaseCandidate(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedLeaseCandidateWithHttpInfo(rsp))); @@ -19486,47 +12346,19 @@ export class ObservableCoordinationV1alpha2Api { * @param [body] */ public deleteCollectionNamespacedLeaseCandidateWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedLeaseCandidate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedLeaseCandidateWithHttpInfo(rsp))); @@ -19569,47 +12401,19 @@ export class ObservableCoordinationV1alpha2Api { * @param [body] */ public deleteNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedLeaseCandidate(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedLeaseCandidateWithHttpInfo(rsp))); @@ -19636,47 +12440,19 @@ export class ObservableCoordinationV1alpha2Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -19705,47 +12481,19 @@ export class ObservableCoordinationV1alpha2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listLeaseCandidateForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listLeaseCandidateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listLeaseCandidateForAllNamespacesWithHttpInfo(rsp))); @@ -19786,47 +12534,19 @@ export class ObservableCoordinationV1alpha2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedLeaseCandidateWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedLeaseCandidate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedLeaseCandidateWithHttpInfo(rsp))); @@ -19864,47 +12584,19 @@ export class ObservableCoordinationV1alpha2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedLeaseCandidate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedLeaseCandidateWithHttpInfo(rsp))); @@ -19933,47 +12625,19 @@ export class ObservableCoordinationV1alpha2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedLeaseCandidate(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedLeaseCandidateWithHttpInfo(rsp))); @@ -20001,47 +12665,19 @@ export class ObservableCoordinationV1alpha2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, body: V1alpha2LeaseCandidate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedLeaseCandidate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedLeaseCandidateWithHttpInfo(rsp))); @@ -20090,47 +12726,19 @@ export class ObservableCoordinationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedLeaseCandidateWithHttpInfo(namespace: string, body: V1beta1LeaseCandidate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedLeaseCandidate(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedLeaseCandidateWithHttpInfo(rsp))); @@ -20170,47 +12778,19 @@ export class ObservableCoordinationV1beta1Api { * @param [body] */ public deleteCollectionNamespacedLeaseCandidateWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedLeaseCandidate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedLeaseCandidateWithHttpInfo(rsp))); @@ -20253,47 +12833,19 @@ export class ObservableCoordinationV1beta1Api { * @param [body] */ public deleteNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedLeaseCandidate(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedLeaseCandidateWithHttpInfo(rsp))); @@ -20320,47 +12872,19 @@ export class ObservableCoordinationV1beta1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -20389,47 +12913,19 @@ export class ObservableCoordinationV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listLeaseCandidateForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listLeaseCandidateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listLeaseCandidateForAllNamespacesWithHttpInfo(rsp))); @@ -20470,47 +12966,19 @@ export class ObservableCoordinationV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedLeaseCandidateWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedLeaseCandidate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedLeaseCandidateWithHttpInfo(rsp))); @@ -20548,47 +13016,19 @@ export class ObservableCoordinationV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedLeaseCandidate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedLeaseCandidateWithHttpInfo(rsp))); @@ -20617,47 +13057,19 @@ export class ObservableCoordinationV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedLeaseCandidate(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedLeaseCandidateWithHttpInfo(rsp))); @@ -20685,47 +13097,19 @@ export class ObservableCoordinationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, body: V1beta1LeaseCandidate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedLeaseCandidate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedLeaseCandidateWithHttpInfo(rsp))); @@ -20768,47 +13152,19 @@ export class ObservableCoreApi { * get available API versions */ public getAPIVersionsWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIVersions(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIVersionsWithHttpInfo(rsp))); @@ -20847,47 +13203,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectDeleteNamespacedPodProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectDeleteNamespacedPodProxy(name, namespace, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectDeleteNamespacedPodProxyWithHttpInfo(rsp))); @@ -20912,47 +13240,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectDeleteNamespacedPodProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectDeleteNamespacedPodProxyWithPath(name, namespace, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectDeleteNamespacedPodProxyWithPathWithHttpInfo(rsp))); @@ -20977,47 +13277,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectDeleteNamespacedServiceProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectDeleteNamespacedServiceProxy(name, namespace, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectDeleteNamespacedServiceProxyWithHttpInfo(rsp))); @@ -21042,47 +13314,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectDeleteNamespacedServiceProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectDeleteNamespacedServiceProxyWithPath(name, namespace, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectDeleteNamespacedServiceProxyWithPathWithHttpInfo(rsp))); @@ -21106,47 +13350,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectDeleteNodeProxyWithHttpInfo(name: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectDeleteNodeProxy(name, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectDeleteNodeProxyWithHttpInfo(rsp))); @@ -21169,47 +13385,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectDeleteNodeProxyWithPathWithHttpInfo(name: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectDeleteNodeProxyWithPath(name, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectDeleteNodeProxyWithPathWithHttpInfo(rsp))); @@ -21237,47 +13425,19 @@ export class ObservableCoreV1Api { * @param [tty] TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. */ public connectGetNamespacedPodAttachWithHttpInfo(name: string, namespace: string, container?: string, stderr?: boolean, stdin?: boolean, stdout?: boolean, tty?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectGetNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectGetNamespacedPodAttachWithHttpInfo(rsp))); @@ -21310,47 +13470,19 @@ export class ObservableCoreV1Api { * @param [tty] TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. */ public connectGetNamespacedPodExecWithHttpInfo(name: string, namespace: string, command?: string, container?: string, stderr?: boolean, stdin?: boolean, stdout?: boolean, tty?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectGetNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectGetNamespacedPodExecWithHttpInfo(rsp))); @@ -21379,47 +13511,19 @@ export class ObservableCoreV1Api { * @param [ports] List of ports to forward Required when using WebSockets */ public connectGetNamespacedPodPortforwardWithHttpInfo(name: string, namespace: string, ports?: number, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectGetNamespacedPodPortforward(name, namespace, ports, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectGetNamespacedPodPortforwardWithHttpInfo(rsp))); @@ -21443,47 +13547,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectGetNamespacedPodProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectGetNamespacedPodProxy(name, namespace, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectGetNamespacedPodProxyWithHttpInfo(rsp))); @@ -21508,47 +13584,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectGetNamespacedPodProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectGetNamespacedPodProxyWithPath(name, namespace, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectGetNamespacedPodProxyWithPathWithHttpInfo(rsp))); @@ -21573,47 +13621,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectGetNamespacedServiceProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectGetNamespacedServiceProxy(name, namespace, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectGetNamespacedServiceProxyWithHttpInfo(rsp))); @@ -21638,47 +13658,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectGetNamespacedServiceProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectGetNamespacedServiceProxyWithPath(name, namespace, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectGetNamespacedServiceProxyWithPathWithHttpInfo(rsp))); @@ -21702,47 +13694,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectGetNodeProxyWithHttpInfo(name: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectGetNodeProxy(name, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectGetNodeProxyWithHttpInfo(rsp))); @@ -21765,47 +13729,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectGetNodeProxyWithPathWithHttpInfo(name: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectGetNodeProxyWithPath(name, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectGetNodeProxyWithPathWithHttpInfo(rsp))); @@ -21829,47 +13765,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectHeadNamespacedPodProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectHeadNamespacedPodProxy(name, namespace, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectHeadNamespacedPodProxyWithHttpInfo(rsp))); @@ -21894,47 +13802,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectHeadNamespacedPodProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectHeadNamespacedPodProxyWithPath(name, namespace, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectHeadNamespacedPodProxyWithPathWithHttpInfo(rsp))); @@ -21959,47 +13839,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectHeadNamespacedServiceProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectHeadNamespacedServiceProxy(name, namespace, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectHeadNamespacedServiceProxyWithHttpInfo(rsp))); @@ -22024,47 +13876,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectHeadNamespacedServiceProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectHeadNamespacedServiceProxyWithPath(name, namespace, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectHeadNamespacedServiceProxyWithPathWithHttpInfo(rsp))); @@ -22088,47 +13912,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectHeadNodeProxyWithHttpInfo(name: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectHeadNodeProxy(name, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectHeadNodeProxyWithHttpInfo(rsp))); @@ -22151,47 +13947,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectHeadNodeProxyWithPathWithHttpInfo(name: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectHeadNodeProxyWithPath(name, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectHeadNodeProxyWithPathWithHttpInfo(rsp))); @@ -22215,47 +13983,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectOptionsNamespacedPodProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectOptionsNamespacedPodProxy(name, namespace, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectOptionsNamespacedPodProxyWithHttpInfo(rsp))); @@ -22280,47 +14020,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectOptionsNamespacedPodProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectOptionsNamespacedPodProxyWithPath(name, namespace, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectOptionsNamespacedPodProxyWithPathWithHttpInfo(rsp))); @@ -22345,47 +14057,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectOptionsNamespacedServiceProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectOptionsNamespacedServiceProxy(name, namespace, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectOptionsNamespacedServiceProxyWithHttpInfo(rsp))); @@ -22410,47 +14094,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectOptionsNamespacedServiceProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectOptionsNamespacedServiceProxyWithPath(name, namespace, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectOptionsNamespacedServiceProxyWithPathWithHttpInfo(rsp))); @@ -22474,47 +14130,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectOptionsNodeProxyWithHttpInfo(name: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectOptionsNodeProxy(name, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectOptionsNodeProxyWithHttpInfo(rsp))); @@ -22537,47 +14165,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectOptionsNodeProxyWithPathWithHttpInfo(name: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectOptionsNodeProxyWithPath(name, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectOptionsNodeProxyWithPathWithHttpInfo(rsp))); @@ -22601,47 +14201,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectPatchNamespacedPodProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPatchNamespacedPodProxy(name, namespace, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPatchNamespacedPodProxyWithHttpInfo(rsp))); @@ -22666,47 +14238,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectPatchNamespacedPodProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPatchNamespacedPodProxyWithPath(name, namespace, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPatchNamespacedPodProxyWithPathWithHttpInfo(rsp))); @@ -22731,47 +14275,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPatchNamespacedServiceProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPatchNamespacedServiceProxy(name, namespace, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPatchNamespacedServiceProxyWithHttpInfo(rsp))); @@ -22796,47 +14312,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPatchNamespacedServiceProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPatchNamespacedServiceProxyWithPath(name, namespace, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPatchNamespacedServiceProxyWithPathWithHttpInfo(rsp))); @@ -22860,47 +14348,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectPatchNodeProxyWithHttpInfo(name: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPatchNodeProxy(name, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPatchNodeProxyWithHttpInfo(rsp))); @@ -22923,47 +14383,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectPatchNodeProxyWithPathWithHttpInfo(name: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPatchNodeProxyWithPath(name, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPatchNodeProxyWithPathWithHttpInfo(rsp))); @@ -22991,47 +14423,19 @@ export class ObservableCoreV1Api { * @param [tty] TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. */ public connectPostNamespacedPodAttachWithHttpInfo(name: string, namespace: string, container?: string, stderr?: boolean, stdin?: boolean, stdout?: boolean, tty?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPostNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPostNamespacedPodAttachWithHttpInfo(rsp))); @@ -23064,47 +14468,19 @@ export class ObservableCoreV1Api { * @param [tty] TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. */ public connectPostNamespacedPodExecWithHttpInfo(name: string, namespace: string, command?: string, container?: string, stderr?: boolean, stdin?: boolean, stdout?: boolean, tty?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPostNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPostNamespacedPodExecWithHttpInfo(rsp))); @@ -23133,47 +14509,19 @@ export class ObservableCoreV1Api { * @param [ports] List of ports to forward Required when using WebSockets */ public connectPostNamespacedPodPortforwardWithHttpInfo(name: string, namespace: string, ports?: number, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPostNamespacedPodPortforward(name, namespace, ports, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPostNamespacedPodPortforwardWithHttpInfo(rsp))); @@ -23197,47 +14545,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectPostNamespacedPodProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPostNamespacedPodProxy(name, namespace, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPostNamespacedPodProxyWithHttpInfo(rsp))); @@ -23262,47 +14582,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectPostNamespacedPodProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPostNamespacedPodProxyWithPath(name, namespace, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPostNamespacedPodProxyWithPathWithHttpInfo(rsp))); @@ -23327,47 +14619,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPostNamespacedServiceProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPostNamespacedServiceProxy(name, namespace, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPostNamespacedServiceProxyWithHttpInfo(rsp))); @@ -23392,47 +14656,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPostNamespacedServiceProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPostNamespacedServiceProxyWithPath(name, namespace, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPostNamespacedServiceProxyWithPathWithHttpInfo(rsp))); @@ -23456,47 +14692,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectPostNodeProxyWithHttpInfo(name: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPostNodeProxy(name, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPostNodeProxyWithHttpInfo(rsp))); @@ -23519,47 +14727,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectPostNodeProxyWithPathWithHttpInfo(name: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPostNodeProxyWithPath(name, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPostNodeProxyWithPathWithHttpInfo(rsp))); @@ -23583,47 +14763,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectPutNamespacedPodProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPutNamespacedPodProxy(name, namespace, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPutNamespacedPodProxyWithHttpInfo(rsp))); @@ -23648,47 +14800,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectPutNamespacedPodProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPutNamespacedPodProxyWithPath(name, namespace, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPutNamespacedPodProxyWithPathWithHttpInfo(rsp))); @@ -23713,47 +14837,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPutNamespacedServiceProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPutNamespacedServiceProxy(name, namespace, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPutNamespacedServiceProxyWithHttpInfo(rsp))); @@ -23778,47 +14874,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPutNamespacedServiceProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPutNamespacedServiceProxyWithPath(name, namespace, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPutNamespacedServiceProxyWithPathWithHttpInfo(rsp))); @@ -23842,47 +14910,19 @@ export class ObservableCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectPutNodeProxyWithHttpInfo(name: string, path?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPutNodeProxy(name, path, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPutNodeProxyWithHttpInfo(rsp))); @@ -23905,47 +14945,19 @@ export class ObservableCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectPutNodeProxyWithPathWithHttpInfo(name: string, path: string, path2?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.connectPutNodeProxyWithPath(name, path, path2, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectPutNodeProxyWithPathWithHttpInfo(rsp))); @@ -23971,47 +14983,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespaceWithHttpInfo(body: V1Namespace, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespace(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespaceWithHttpInfo(rsp))); @@ -24040,47 +15024,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createNamespacedBindingWithHttpInfo(namespace: string, body: V1Binding, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedBinding(namespace, body, dryRun, fieldManager, fieldValidation, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedBindingWithHttpInfo(rsp))); @@ -24110,47 +15066,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedConfigMapWithHttpInfo(namespace: string, body: V1ConfigMap, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedConfigMap(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedConfigMapWithHttpInfo(rsp))); @@ -24180,47 +15108,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedEndpointsWithHttpInfo(namespace: string, body: V1Endpoints, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedEndpoints(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedEndpointsWithHttpInfo(rsp))); @@ -24250,47 +15150,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedEventWithHttpInfo(namespace: string, body: CoreV1Event, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedEventWithHttpInfo(rsp))); @@ -24320,47 +15192,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedLimitRangeWithHttpInfo(namespace: string, body: V1LimitRange, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedLimitRange(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedLimitRangeWithHttpInfo(rsp))); @@ -24390,47 +15234,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedPersistentVolumeClaimWithHttpInfo(namespace: string, body: V1PersistentVolumeClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedPersistentVolumeClaim(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedPersistentVolumeClaimWithHttpInfo(rsp))); @@ -24460,47 +15276,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedPodWithHttpInfo(namespace: string, body: V1Pod, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedPod(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedPodWithHttpInfo(rsp))); @@ -24531,47 +15319,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createNamespacedPodBindingWithHttpInfo(name: string, namespace: string, body: V1Binding, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedPodBinding(name, namespace, body, dryRun, fieldManager, fieldValidation, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedPodBindingWithHttpInfo(rsp))); @@ -24603,47 +15363,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createNamespacedPodEvictionWithHttpInfo(name: string, namespace: string, body: V1Eviction, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedPodEviction(name, namespace, body, dryRun, fieldManager, fieldValidation, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedPodEvictionWithHttpInfo(rsp))); @@ -24674,47 +15406,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedPodTemplateWithHttpInfo(namespace: string, body: V1PodTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedPodTemplate(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedPodTemplateWithHttpInfo(rsp))); @@ -24744,47 +15448,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedReplicationControllerWithHttpInfo(namespace: string, body: V1ReplicationController, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedReplicationController(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedReplicationControllerWithHttpInfo(rsp))); @@ -24814,47 +15490,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceQuotaWithHttpInfo(namespace: string, body: V1ResourceQuota, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedResourceQuota(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedResourceQuotaWithHttpInfo(rsp))); @@ -24884,47 +15532,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedSecretWithHttpInfo(namespace: string, body: V1Secret, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedSecret(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedSecretWithHttpInfo(rsp))); @@ -24954,47 +15574,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedServiceWithHttpInfo(namespace: string, body: V1Service, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedService(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedServiceWithHttpInfo(rsp))); @@ -25024,47 +15616,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedServiceAccountWithHttpInfo(namespace: string, body: V1ServiceAccount, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedServiceAccount(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedServiceAccountWithHttpInfo(rsp))); @@ -25095,47 +15659,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createNamespacedServiceAccountTokenWithHttpInfo(name: string, namespace: string, body: AuthenticationV1TokenRequest, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedServiceAccountToken(name, namespace, body, dryRun, fieldManager, fieldValidation, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedServiceAccountTokenWithHttpInfo(rsp))); @@ -25165,47 +15701,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNodeWithHttpInfo(body: V1Node, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNode(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNodeWithHttpInfo(rsp))); @@ -25233,47 +15741,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createPersistentVolumeWithHttpInfo(body: V1PersistentVolume, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createPersistentVolume(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createPersistentVolumeWithHttpInfo(rsp))); @@ -25312,47 +15792,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteCollectionNamespacedConfigMapWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedConfigMap(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedConfigMapWithHttpInfo(rsp))); @@ -25402,47 +15854,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteCollectionNamespacedEndpointsWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedEndpoints(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedEndpointsWithHttpInfo(rsp))); @@ -25492,47 +15916,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteCollectionNamespacedEventWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedEventWithHttpInfo(rsp))); @@ -25582,47 +15978,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteCollectionNamespacedLimitRangeWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedLimitRange(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedLimitRangeWithHttpInfo(rsp))); @@ -25672,47 +16040,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteCollectionNamespacedPersistentVolumeClaimWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedPersistentVolumeClaim(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedPersistentVolumeClaimWithHttpInfo(rsp))); @@ -25762,47 +16102,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteCollectionNamespacedPodWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedPod(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedPodWithHttpInfo(rsp))); @@ -25852,47 +16164,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteCollectionNamespacedPodTemplateWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedPodTemplate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedPodTemplateWithHttpInfo(rsp))); @@ -25942,47 +16226,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteCollectionNamespacedReplicationControllerWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedReplicationController(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedReplicationControllerWithHttpInfo(rsp))); @@ -26032,47 +16288,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteCollectionNamespacedResourceQuotaWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedResourceQuota(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedResourceQuotaWithHttpInfo(rsp))); @@ -26122,47 +16350,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteCollectionNamespacedSecretWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedSecret(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedSecretWithHttpInfo(rsp))); @@ -26212,47 +16412,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteCollectionNamespacedServiceWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedService(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedServiceWithHttpInfo(rsp))); @@ -26302,47 +16474,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteCollectionNamespacedServiceAccountWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedServiceAccount(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedServiceAccountWithHttpInfo(rsp))); @@ -26391,47 +16535,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteCollectionNodeWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNodeWithHttpInfo(rsp))); @@ -26479,47 +16595,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteCollectionPersistentVolumeWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionPersistentVolume(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionPersistentVolumeWithHttpInfo(rsp))); @@ -26560,47 +16648,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteNamespaceWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespace(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespaceWithHttpInfo(rsp))); @@ -26635,47 +16695,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteNamespacedConfigMapWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedConfigMap(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedConfigMapWithHttpInfo(rsp))); @@ -26711,47 +16743,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteNamespacedEndpointsWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedEndpoints(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedEndpointsWithHttpInfo(rsp))); @@ -26787,47 +16791,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteNamespacedEventWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedEventWithHttpInfo(rsp))); @@ -26863,47 +16839,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteNamespacedLimitRangeWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedLimitRange(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedLimitRangeWithHttpInfo(rsp))); @@ -26939,47 +16887,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteNamespacedPersistentVolumeClaimWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedPersistentVolumeClaim(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedPersistentVolumeClaimWithHttpInfo(rsp))); @@ -27015,47 +16935,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteNamespacedPodWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedPod(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedPodWithHttpInfo(rsp))); @@ -27091,47 +16983,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteNamespacedPodTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedPodTemplate(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedPodTemplateWithHttpInfo(rsp))); @@ -27167,47 +17031,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteNamespacedReplicationControllerWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedReplicationController(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedReplicationControllerWithHttpInfo(rsp))); @@ -27243,47 +17079,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteNamespacedResourceQuotaWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedResourceQuota(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedResourceQuotaWithHttpInfo(rsp))); @@ -27319,47 +17127,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteNamespacedSecretWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedSecret(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedSecretWithHttpInfo(rsp))); @@ -27395,47 +17175,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteNamespacedServiceWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedService(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedServiceWithHttpInfo(rsp))); @@ -27471,47 +17223,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteNamespacedServiceAccountWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedServiceAccount(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedServiceAccountWithHttpInfo(rsp))); @@ -27546,47 +17270,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deleteNodeWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNode(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNodeWithHttpInfo(rsp))); @@ -27620,47 +17316,19 @@ export class ObservableCoreV1Api { * @param [body] */ public deletePersistentVolumeWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deletePersistentVolume(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deletePersistentVolumeWithHttpInfo(rsp))); @@ -27686,47 +17354,19 @@ export class ObservableCoreV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -27755,47 +17395,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listComponentStatusWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listComponentStatus(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listComponentStatusWithHttpInfo(rsp))); @@ -27835,47 +17447,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listConfigMapForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listConfigMapForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listConfigMapForAllNamespacesWithHttpInfo(rsp))); @@ -27915,47 +17499,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listEndpointsForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listEndpointsForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listEndpointsForAllNamespacesWithHttpInfo(rsp))); @@ -27995,47 +17551,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listEventForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listEventForAllNamespacesWithHttpInfo(rsp))); @@ -28075,47 +17603,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listLimitRangeForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listLimitRangeForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listLimitRangeForAllNamespacesWithHttpInfo(rsp))); @@ -28155,47 +17655,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespaceWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespace(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespaceWithHttpInfo(rsp))); @@ -28236,47 +17708,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedConfigMapWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedConfigMap(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedConfigMapWithHttpInfo(rsp))); @@ -28318,47 +17762,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedEndpointsWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedEndpoints(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedEndpointsWithHttpInfo(rsp))); @@ -28400,47 +17816,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedEventWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedEventWithHttpInfo(rsp))); @@ -28482,47 +17870,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedLimitRangeWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedLimitRange(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedLimitRangeWithHttpInfo(rsp))); @@ -28564,47 +17924,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedPersistentVolumeClaimWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedPersistentVolumeClaim(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedPersistentVolumeClaimWithHttpInfo(rsp))); @@ -28646,47 +17978,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedPodWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedPod(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedPodWithHttpInfo(rsp))); @@ -28728,47 +18032,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedPodTemplateWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedPodTemplate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedPodTemplateWithHttpInfo(rsp))); @@ -28810,47 +18086,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedReplicationControllerWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedReplicationController(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedReplicationControllerWithHttpInfo(rsp))); @@ -28892,47 +18140,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceQuotaWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedResourceQuota(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedResourceQuotaWithHttpInfo(rsp))); @@ -28974,47 +18194,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedSecretWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedSecret(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedSecretWithHttpInfo(rsp))); @@ -29056,47 +18248,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedServiceWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedService(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedServiceWithHttpInfo(rsp))); @@ -29138,47 +18302,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedServiceAccountWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedServiceAccount(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedServiceAccountWithHttpInfo(rsp))); @@ -29219,47 +18355,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNodeWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNodeWithHttpInfo(rsp))); @@ -29299,47 +18407,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPersistentVolumeWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listPersistentVolume(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listPersistentVolumeWithHttpInfo(rsp))); @@ -29379,47 +18459,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPersistentVolumeClaimForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listPersistentVolumeClaimForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listPersistentVolumeClaimForAllNamespacesWithHttpInfo(rsp))); @@ -29459,47 +18511,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPodForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listPodForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listPodForAllNamespacesWithHttpInfo(rsp))); @@ -29539,47 +18563,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPodTemplateForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listPodTemplateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listPodTemplateForAllNamespacesWithHttpInfo(rsp))); @@ -29619,47 +18615,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listReplicationControllerForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listReplicationControllerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listReplicationControllerForAllNamespacesWithHttpInfo(rsp))); @@ -29699,47 +18667,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceQuotaForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listResourceQuotaForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listResourceQuotaForAllNamespacesWithHttpInfo(rsp))); @@ -29779,47 +18719,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listSecretForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listSecretForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listSecretForAllNamespacesWithHttpInfo(rsp))); @@ -29859,47 +18771,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listServiceAccountForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listServiceAccountForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listServiceAccountForAllNamespacesWithHttpInfo(rsp))); @@ -29939,47 +18823,19 @@ export class ObservableCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listServiceForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listServiceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listServiceForAllNamespacesWithHttpInfo(rsp))); @@ -30015,47 +18871,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespaceWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespace(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespaceWithHttpInfo(rsp))); @@ -30087,47 +18915,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespaceStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespaceStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespaceStatusWithHttpInfo(rsp))); @@ -30160,47 +18960,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedConfigMapWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedConfigMapWithHttpInfo(rsp))); @@ -30234,47 +19006,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedEndpointsWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedEndpointsWithHttpInfo(rsp))); @@ -30308,47 +19052,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedEventWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedEventWithHttpInfo(rsp))); @@ -30382,47 +19098,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedLimitRangeWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedLimitRangeWithHttpInfo(rsp))); @@ -30456,47 +19144,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPersistentVolumeClaimWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedPersistentVolumeClaimWithHttpInfo(rsp))); @@ -30530,47 +19190,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPersistentVolumeClaimStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedPersistentVolumeClaimStatusWithHttpInfo(rsp))); @@ -30604,47 +19236,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedPodWithHttpInfo(rsp))); @@ -30678,47 +19282,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodEphemeralcontainersWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedPodEphemeralcontainers(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedPodEphemeralcontainersWithHttpInfo(rsp))); @@ -30752,47 +19328,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodResizeWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedPodResize(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedPodResizeWithHttpInfo(rsp))); @@ -30826,47 +19374,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedPodStatusWithHttpInfo(rsp))); @@ -30900,47 +19420,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodTemplateWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedPodTemplateWithHttpInfo(rsp))); @@ -30974,47 +19466,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicationControllerWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedReplicationControllerWithHttpInfo(rsp))); @@ -31048,47 +19512,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicationControllerScaleWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedReplicationControllerScaleWithHttpInfo(rsp))); @@ -31122,47 +19558,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicationControllerStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedReplicationControllerStatusWithHttpInfo(rsp))); @@ -31196,47 +19604,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceQuotaWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedResourceQuotaWithHttpInfo(rsp))); @@ -31270,47 +19650,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceQuotaStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedResourceQuotaStatusWithHttpInfo(rsp))); @@ -31344,47 +19696,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedSecretWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedSecretWithHttpInfo(rsp))); @@ -31418,47 +19742,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedServiceWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedServiceWithHttpInfo(rsp))); @@ -31492,47 +19788,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedServiceAccountWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedServiceAccountWithHttpInfo(rsp))); @@ -31566,47 +19834,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedServiceStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedServiceStatusWithHttpInfo(rsp))); @@ -31639,47 +19879,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNodeWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNode(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNodeWithHttpInfo(rsp))); @@ -31711,47 +19923,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNodeStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNodeStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNodeStatusWithHttpInfo(rsp))); @@ -31783,47 +19967,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchPersistentVolumeWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchPersistentVolume(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchPersistentVolumeWithHttpInfo(rsp))); @@ -31855,47 +20011,19 @@ export class ObservableCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchPersistentVolumeStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchPersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchPersistentVolumeStatusWithHttpInfo(rsp))); @@ -31922,47 +20050,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readComponentStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readComponentStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readComponentStatusWithHttpInfo(rsp))); @@ -31984,47 +20084,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespaceWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespace(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespaceWithHttpInfo(rsp))); @@ -32046,47 +20118,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespaceStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespaceStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespaceStatusWithHttpInfo(rsp))); @@ -32109,47 +20153,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedConfigMapWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedConfigMap(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedConfigMapWithHttpInfo(rsp))); @@ -32173,47 +20189,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedEndpointsWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedEndpoints(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedEndpointsWithHttpInfo(rsp))); @@ -32237,47 +20225,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedEventWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedEvent(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedEventWithHttpInfo(rsp))); @@ -32301,47 +20261,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedLimitRangeWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedLimitRange(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedLimitRangeWithHttpInfo(rsp))); @@ -32365,47 +20297,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPersistentVolumeClaimWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedPersistentVolumeClaim(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedPersistentVolumeClaimWithHttpInfo(rsp))); @@ -32429,47 +20333,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPersistentVolumeClaimStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedPersistentVolumeClaimStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedPersistentVolumeClaimStatusWithHttpInfo(rsp))); @@ -32493,47 +20369,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedPod(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedPodWithHttpInfo(rsp))); @@ -32557,47 +20405,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodEphemeralcontainersWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedPodEphemeralcontainers(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedPodEphemeralcontainersWithHttpInfo(rsp))); @@ -32630,47 +20450,19 @@ export class ObservableCoreV1Api { * @param [timestamps] If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false. */ public readNamespacedPodLogWithHttpInfo(name: string, namespace: string, container?: string, follow?: boolean, insecureSkipTLSVerifyBackend?: boolean, limitBytes?: number, pretty?: string, previous?: boolean, sinceSeconds?: number, stream?: string, tailLines?: number, timestamps?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedPodLog(name, namespace, container, follow, insecureSkipTLSVerifyBackend, limitBytes, pretty, previous, sinceSeconds, stream, tailLines, timestamps, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedPodLogWithHttpInfo(rsp))); @@ -32703,47 +20495,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodResizeWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedPodResize(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedPodResizeWithHttpInfo(rsp))); @@ -32767,47 +20531,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedPodStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedPodStatusWithHttpInfo(rsp))); @@ -32831,47 +20567,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedPodTemplate(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedPodTemplateWithHttpInfo(rsp))); @@ -32895,47 +20603,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicationControllerWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedReplicationController(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedReplicationControllerWithHttpInfo(rsp))); @@ -32959,47 +20639,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicationControllerScaleWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedReplicationControllerScale(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedReplicationControllerScaleWithHttpInfo(rsp))); @@ -33023,47 +20675,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicationControllerStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedReplicationControllerStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedReplicationControllerStatusWithHttpInfo(rsp))); @@ -33087,47 +20711,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceQuotaWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedResourceQuota(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedResourceQuotaWithHttpInfo(rsp))); @@ -33151,47 +20747,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceQuotaStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedResourceQuotaStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedResourceQuotaStatusWithHttpInfo(rsp))); @@ -33215,47 +20783,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedSecretWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedSecret(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedSecretWithHttpInfo(rsp))); @@ -33279,47 +20819,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedServiceWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedService(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedServiceWithHttpInfo(rsp))); @@ -33343,47 +20855,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedServiceAccountWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedServiceAccount(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedServiceAccountWithHttpInfo(rsp))); @@ -33407,47 +20891,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedServiceStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedServiceStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedServiceStatusWithHttpInfo(rsp))); @@ -33470,47 +20926,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNodeWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNode(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNodeWithHttpInfo(rsp))); @@ -33532,47 +20960,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNodeStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNodeStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNodeStatusWithHttpInfo(rsp))); @@ -33594,47 +20994,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readPersistentVolumeWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readPersistentVolume(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readPersistentVolumeWithHttpInfo(rsp))); @@ -33656,47 +21028,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readPersistentVolumeStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readPersistentVolumeStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readPersistentVolumeStatusWithHttpInfo(rsp))); @@ -33722,47 +21066,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespaceWithHttpInfo(name: string, body: V1Namespace, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespace(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespaceWithHttpInfo(rsp))); @@ -33792,47 +21108,19 @@ export class ObservableCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public replaceNamespaceFinalizeWithHttpInfo(name: string, body: V1Namespace, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespaceFinalize(name, body, dryRun, fieldManager, fieldValidation, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespaceFinalizeWithHttpInfo(rsp))); @@ -33862,47 +21150,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespaceStatusWithHttpInfo(name: string, body: V1Namespace, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespaceStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespaceStatusWithHttpInfo(rsp))); @@ -33933,47 +21193,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedConfigMapWithHttpInfo(name: string, namespace: string, body: V1ConfigMap, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedConfigMapWithHttpInfo(rsp))); @@ -34005,47 +21237,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedEndpointsWithHttpInfo(name: string, namespace: string, body: V1Endpoints, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedEndpointsWithHttpInfo(rsp))); @@ -34077,47 +21281,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedEventWithHttpInfo(name: string, namespace: string, body: CoreV1Event, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedEventWithHttpInfo(rsp))); @@ -34149,47 +21325,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedLimitRangeWithHttpInfo(name: string, namespace: string, body: V1LimitRange, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedLimitRangeWithHttpInfo(rsp))); @@ -34221,47 +21369,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPersistentVolumeClaimWithHttpInfo(name: string, namespace: string, body: V1PersistentVolumeClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedPersistentVolumeClaimWithHttpInfo(rsp))); @@ -34293,47 +21413,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPersistentVolumeClaimStatusWithHttpInfo(name: string, namespace: string, body: V1PersistentVolumeClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedPersistentVolumeClaimStatusWithHttpInfo(rsp))); @@ -34365,47 +21457,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodWithHttpInfo(name: string, namespace: string, body: V1Pod, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedPodWithHttpInfo(rsp))); @@ -34437,47 +21501,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodEphemeralcontainersWithHttpInfo(name: string, namespace: string, body: V1Pod, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedPodEphemeralcontainers(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedPodEphemeralcontainersWithHttpInfo(rsp))); @@ -34509,47 +21545,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodResizeWithHttpInfo(name: string, namespace: string, body: V1Pod, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedPodResize(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedPodResizeWithHttpInfo(rsp))); @@ -34581,47 +21589,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodStatusWithHttpInfo(name: string, namespace: string, body: V1Pod, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedPodStatusWithHttpInfo(rsp))); @@ -34653,47 +21633,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodTemplateWithHttpInfo(name: string, namespace: string, body: V1PodTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedPodTemplateWithHttpInfo(rsp))); @@ -34725,47 +21677,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicationControllerWithHttpInfo(name: string, namespace: string, body: V1ReplicationController, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedReplicationControllerWithHttpInfo(rsp))); @@ -34797,47 +21721,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicationControllerScaleWithHttpInfo(name: string, namespace: string, body: V1Scale, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedReplicationControllerScaleWithHttpInfo(rsp))); @@ -34869,47 +21765,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicationControllerStatusWithHttpInfo(name: string, namespace: string, body: V1ReplicationController, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedReplicationControllerStatusWithHttpInfo(rsp))); @@ -34941,47 +21809,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceQuotaWithHttpInfo(name: string, namespace: string, body: V1ResourceQuota, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedResourceQuotaWithHttpInfo(rsp))); @@ -35013,47 +21853,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceQuotaStatusWithHttpInfo(name: string, namespace: string, body: V1ResourceQuota, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedResourceQuotaStatusWithHttpInfo(rsp))); @@ -35085,47 +21897,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedSecretWithHttpInfo(name: string, namespace: string, body: V1Secret, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedSecretWithHttpInfo(rsp))); @@ -35157,47 +21941,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedServiceWithHttpInfo(name: string, namespace: string, body: V1Service, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedServiceWithHttpInfo(rsp))); @@ -35229,47 +21985,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedServiceAccountWithHttpInfo(name: string, namespace: string, body: V1ServiceAccount, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedServiceAccountWithHttpInfo(rsp))); @@ -35301,47 +22029,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedServiceStatusWithHttpInfo(name: string, namespace: string, body: V1Service, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedServiceStatusWithHttpInfo(rsp))); @@ -35372,47 +22072,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNodeWithHttpInfo(name: string, body: V1Node, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNode(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNodeWithHttpInfo(rsp))); @@ -35442,47 +22114,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNodeStatusWithHttpInfo(name: string, body: V1Node, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNodeStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNodeStatusWithHttpInfo(rsp))); @@ -35512,47 +22156,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replacePersistentVolumeWithHttpInfo(name: string, body: V1PersistentVolume, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replacePersistentVolume(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replacePersistentVolumeWithHttpInfo(rsp))); @@ -35582,47 +22198,19 @@ export class ObservableCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replacePersistentVolumeStatusWithHttpInfo(name: string, body: V1PersistentVolume, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replacePersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replacePersistentVolumeStatusWithHttpInfo(rsp))); @@ -35672,47 +22260,19 @@ export class ObservableCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public createClusterCustomObjectWithHttpInfo(group: string, version: string, plural: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createClusterCustomObject(group, version, plural, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createClusterCustomObjectWithHttpInfo(rsp))); @@ -35747,47 +22307,19 @@ export class ObservableCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public createNamespacedCustomObjectWithHttpInfo(group: string, version: string, namespace: string, plural: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedCustomObject(group, version, namespace, plural, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedCustomObjectWithHttpInfo(rsp))); @@ -35823,47 +22355,19 @@ export class ObservableCustomObjectsApi { * @param [body] */ public deleteClusterCustomObjectWithHttpInfo(group: string, version: string, plural: string, name: string, gracePeriodSeconds?: number, orphanDependents?: boolean, propagationPolicy?: string, dryRun?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteClusterCustomObject(group, version, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteClusterCustomObjectWithHttpInfo(rsp))); @@ -35900,47 +22404,19 @@ export class ObservableCustomObjectsApi { * @param [body] */ public deleteCollectionClusterCustomObjectWithHttpInfo(group: string, version: string, plural: string, pretty?: string, labelSelector?: string, gracePeriodSeconds?: number, orphanDependents?: boolean, propagationPolicy?: string, dryRun?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionClusterCustomObject(group, version, plural, pretty, labelSelector, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionClusterCustomObjectWithHttpInfo(rsp))); @@ -35980,47 +22456,19 @@ export class ObservableCustomObjectsApi { * @param [body] */ public deleteCollectionNamespacedCustomObjectWithHttpInfo(group: string, version: string, namespace: string, plural: string, pretty?: string, labelSelector?: string, gracePeriodSeconds?: number, orphanDependents?: boolean, propagationPolicy?: string, dryRun?: string, fieldSelector?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedCustomObject(group, version, namespace, plural, pretty, labelSelector, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, fieldSelector, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedCustomObjectWithHttpInfo(rsp))); @@ -36060,47 +22508,19 @@ export class ObservableCustomObjectsApi { * @param [body] */ public deleteNamespacedCustomObjectWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, gracePeriodSeconds?: number, orphanDependents?: boolean, propagationPolicy?: string, dryRun?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedCustomObject(group, version, namespace, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedCustomObjectWithHttpInfo(rsp))); @@ -36130,47 +22550,19 @@ export class ObservableCustomObjectsApi { * @param version The custom resource\'s version */ public getAPIResourcesWithHttpInfo(group: string, version: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(group, version, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -36194,47 +22586,19 @@ export class ObservableCustomObjectsApi { * @param name the custom object\'s name */ public getClusterCustomObjectWithHttpInfo(group: string, version: string, plural: string, name: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getClusterCustomObject(group, version, plural, name, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getClusterCustomObjectWithHttpInfo(rsp))); @@ -36260,47 +22624,19 @@ export class ObservableCustomObjectsApi { * @param name the custom object\'s name */ public getClusterCustomObjectScaleWithHttpInfo(group: string, version: string, plural: string, name: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getClusterCustomObjectScale(group, version, plural, name, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getClusterCustomObjectScaleWithHttpInfo(rsp))); @@ -36326,47 +22662,19 @@ export class ObservableCustomObjectsApi { * @param name the custom object\'s name */ public getClusterCustomObjectStatusWithHttpInfo(group: string, version: string, plural: string, name: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getClusterCustomObjectStatus(group, version, plural, name, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getClusterCustomObjectStatusWithHttpInfo(rsp))); @@ -36393,47 +22701,19 @@ export class ObservableCustomObjectsApi { * @param name the custom object\'s name */ public getNamespacedCustomObjectWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getNamespacedCustomObject(group, version, namespace, plural, name, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getNamespacedCustomObjectWithHttpInfo(rsp))); @@ -36461,47 +22741,19 @@ export class ObservableCustomObjectsApi { * @param name the custom object\'s name */ public getNamespacedCustomObjectScaleWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getNamespacedCustomObjectScale(group, version, namespace, plural, name, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getNamespacedCustomObjectScaleWithHttpInfo(rsp))); @@ -36529,47 +22781,19 @@ export class ObservableCustomObjectsApi { * @param name the custom object\'s name */ public getNamespacedCustomObjectStatusWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getNamespacedCustomObjectStatus(group, version, namespace, plural, name, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getNamespacedCustomObjectStatusWithHttpInfo(rsp))); @@ -36605,47 +22829,19 @@ export class ObservableCustomObjectsApi { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. */ public listClusterCustomObjectWithHttpInfo(group: string, version: string, plural: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listClusterCustomObject(group, version, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listClusterCustomObjectWithHttpInfo(rsp))); @@ -36689,47 +22885,19 @@ export class ObservableCustomObjectsApi { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. */ public listCustomObjectForAllNamespacesWithHttpInfo(group: string, version: string, plural: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listCustomObjectForAllNamespaces(group, version, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listCustomObjectForAllNamespacesWithHttpInfo(rsp))); @@ -36774,47 +22942,19 @@ export class ObservableCustomObjectsApi { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. */ public listNamespacedCustomObjectWithHttpInfo(group: string, version: string, namespace: string, plural: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedCustomObject(group, version, namespace, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedCustomObjectWithHttpInfo(rsp))); @@ -36855,47 +22995,19 @@ export class ObservableCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterCustomObjectWithHttpInfo(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchClusterCustomObjectWithHttpInfo(rsp))); @@ -36931,47 +23043,19 @@ export class ObservableCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterCustomObjectScaleWithHttpInfo(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchClusterCustomObjectScaleWithHttpInfo(rsp))); @@ -37007,47 +23091,19 @@ export class ObservableCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterCustomObjectStatusWithHttpInfo(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchClusterCustomObjectStatusWithHttpInfo(rsp))); @@ -37084,47 +23140,19 @@ export class ObservableCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCustomObjectWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedCustomObjectWithHttpInfo(rsp))); @@ -37162,47 +23190,19 @@ export class ObservableCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCustomObjectScaleWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedCustomObjectScaleWithHttpInfo(rsp))); @@ -37240,47 +23240,19 @@ export class ObservableCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCustomObjectStatusWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedCustomObjectStatusWithHttpInfo(rsp))); @@ -37316,47 +23288,19 @@ export class ObservableCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceClusterCustomObjectWithHttpInfo(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceClusterCustomObjectWithHttpInfo(rsp))); @@ -37390,47 +23334,19 @@ export class ObservableCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceClusterCustomObjectScaleWithHttpInfo(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceClusterCustomObjectScaleWithHttpInfo(rsp))); @@ -37464,47 +23380,19 @@ export class ObservableCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceClusterCustomObjectStatusWithHttpInfo(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceClusterCustomObjectStatusWithHttpInfo(rsp))); @@ -37539,47 +23427,19 @@ export class ObservableCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceNamespacedCustomObjectWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedCustomObjectWithHttpInfo(rsp))); @@ -37615,47 +23475,19 @@ export class ObservableCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceNamespacedCustomObjectScaleWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedCustomObjectScaleWithHttpInfo(rsp))); @@ -37691,47 +23523,19 @@ export class ObservableCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceNamespacedCustomObjectStatusWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedCustomObjectStatusWithHttpInfo(rsp))); @@ -37776,47 +23580,19 @@ export class ObservableDiscoveryApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -37858,47 +23634,19 @@ export class ObservableDiscoveryV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedEndpointSliceWithHttpInfo(namespace: string, body: V1EndpointSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedEndpointSlice(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedEndpointSliceWithHttpInfo(rsp))); @@ -37938,47 +23686,19 @@ export class ObservableDiscoveryV1Api { * @param [body] */ public deleteCollectionNamespacedEndpointSliceWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedEndpointSlice(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedEndpointSliceWithHttpInfo(rsp))); @@ -38021,47 +23741,19 @@ export class ObservableDiscoveryV1Api { * @param [body] */ public deleteNamespacedEndpointSliceWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedEndpointSlice(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedEndpointSliceWithHttpInfo(rsp))); @@ -38088,47 +23780,19 @@ export class ObservableDiscoveryV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -38157,47 +23821,19 @@ export class ObservableDiscoveryV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listEndpointSliceForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listEndpointSliceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listEndpointSliceForAllNamespacesWithHttpInfo(rsp))); @@ -38238,47 +23874,19 @@ export class ObservableDiscoveryV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedEndpointSliceWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedEndpointSlice(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedEndpointSliceWithHttpInfo(rsp))); @@ -38316,47 +23924,19 @@ export class ObservableDiscoveryV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedEndpointSliceWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedEndpointSliceWithHttpInfo(rsp))); @@ -38385,47 +23965,19 @@ export class ObservableDiscoveryV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedEndpointSliceWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedEndpointSlice(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedEndpointSliceWithHttpInfo(rsp))); @@ -38453,47 +24005,19 @@ export class ObservableDiscoveryV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedEndpointSliceWithHttpInfo(name: string, namespace: string, body: V1EndpointSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedEndpointSliceWithHttpInfo(rsp))); @@ -38536,47 +24060,19 @@ export class ObservableEventsApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -38618,47 +24114,19 @@ export class ObservableEventsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedEventWithHttpInfo(namespace: string, body: EventsV1Event, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedEventWithHttpInfo(rsp))); @@ -38698,47 +24166,19 @@ export class ObservableEventsV1Api { * @param [body] */ public deleteCollectionNamespacedEventWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedEventWithHttpInfo(rsp))); @@ -38781,47 +24221,19 @@ export class ObservableEventsV1Api { * @param [body] */ public deleteNamespacedEventWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedEventWithHttpInfo(rsp))); @@ -38848,47 +24260,19 @@ export class ObservableEventsV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -38917,47 +24301,19 @@ export class ObservableEventsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listEventForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listEventForAllNamespacesWithHttpInfo(rsp))); @@ -38998,47 +24354,19 @@ export class ObservableEventsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedEventWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedEventWithHttpInfo(rsp))); @@ -39076,47 +24404,19 @@ export class ObservableEventsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedEventWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedEventWithHttpInfo(rsp))); @@ -39145,47 +24445,19 @@ export class ObservableEventsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedEventWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedEvent(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedEventWithHttpInfo(rsp))); @@ -39213,47 +24485,19 @@ export class ObservableEventsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedEventWithHttpInfo(name: string, namespace: string, body: EventsV1Event, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedEventWithHttpInfo(rsp))); @@ -39296,47 +24540,19 @@ export class ObservableFlowcontrolApiserverApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -39377,47 +24593,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createFlowSchemaWithHttpInfo(body: V1FlowSchema, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createFlowSchema(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createFlowSchemaWithHttpInfo(rsp))); @@ -39445,47 +24633,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createPriorityLevelConfigurationWithHttpInfo(body: V1PriorityLevelConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createPriorityLevelConfiguration(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createPriorityLevelConfigurationWithHttpInfo(rsp))); @@ -39523,47 +24683,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [body] */ public deleteCollectionFlowSchemaWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionFlowSchema(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionFlowSchemaWithHttpInfo(rsp))); @@ -39611,47 +24743,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [body] */ public deleteCollectionPriorityLevelConfigurationWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionPriorityLevelConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionPriorityLevelConfigurationWithHttpInfo(rsp))); @@ -39692,47 +24796,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [body] */ public deleteFlowSchemaWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteFlowSchema(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteFlowSchemaWithHttpInfo(rsp))); @@ -39766,47 +24842,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [body] */ public deletePriorityLevelConfigurationWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deletePriorityLevelConfiguration(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deletePriorityLevelConfigurationWithHttpInfo(rsp))); @@ -39832,47 +24880,19 @@ export class ObservableFlowcontrolApiserverV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -39901,47 +24921,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listFlowSchemaWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listFlowSchema(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listFlowSchemaWithHttpInfo(rsp))); @@ -39981,47 +24973,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPriorityLevelConfigurationWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listPriorityLevelConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listPriorityLevelConfigurationWithHttpInfo(rsp))); @@ -40057,47 +25021,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchFlowSchemaWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchFlowSchema(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchFlowSchemaWithHttpInfo(rsp))); @@ -40129,47 +25065,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchFlowSchemaStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchFlowSchemaStatusWithHttpInfo(rsp))); @@ -40201,47 +25109,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchPriorityLevelConfigurationWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchPriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchPriorityLevelConfigurationWithHttpInfo(rsp))); @@ -40273,47 +25153,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchPriorityLevelConfigurationStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchPriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchPriorityLevelConfigurationStatusWithHttpInfo(rsp))); @@ -40340,47 +25192,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readFlowSchemaWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readFlowSchema(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readFlowSchemaWithHttpInfo(rsp))); @@ -40402,47 +25226,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readFlowSchemaStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readFlowSchemaStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readFlowSchemaStatusWithHttpInfo(rsp))); @@ -40464,47 +25260,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readPriorityLevelConfigurationWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readPriorityLevelConfiguration(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readPriorityLevelConfigurationWithHttpInfo(rsp))); @@ -40526,47 +25294,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readPriorityLevelConfigurationStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readPriorityLevelConfigurationStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readPriorityLevelConfigurationStatusWithHttpInfo(rsp))); @@ -40592,47 +25332,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceFlowSchemaWithHttpInfo(name: string, body: V1FlowSchema, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceFlowSchema(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceFlowSchemaWithHttpInfo(rsp))); @@ -40662,47 +25374,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceFlowSchemaStatusWithHttpInfo(name: string, body: V1FlowSchema, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceFlowSchemaStatusWithHttpInfo(rsp))); @@ -40732,47 +25416,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replacePriorityLevelConfigurationWithHttpInfo(name: string, body: V1PriorityLevelConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replacePriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replacePriorityLevelConfigurationWithHttpInfo(rsp))); @@ -40802,47 +25458,19 @@ export class ObservableFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replacePriorityLevelConfigurationStatusWithHttpInfo(name: string, body: V1PriorityLevelConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replacePriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replacePriorityLevelConfigurationStatusWithHttpInfo(rsp))); @@ -40884,47 +25512,19 @@ export class ObservableInternalApiserverApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -40965,47 +25565,19 @@ export class ObservableInternalApiserverV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createStorageVersionWithHttpInfo(body: V1alpha1StorageVersion, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createStorageVersion(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createStorageVersionWithHttpInfo(rsp))); @@ -41043,47 +25615,19 @@ export class ObservableInternalApiserverV1alpha1Api { * @param [body] */ public deleteCollectionStorageVersionWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionStorageVersion(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionStorageVersionWithHttpInfo(rsp))); @@ -41124,47 +25668,19 @@ export class ObservableInternalApiserverV1alpha1Api { * @param [body] */ public deleteStorageVersionWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteStorageVersion(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteStorageVersionWithHttpInfo(rsp))); @@ -41190,47 +25706,19 @@ export class ObservableInternalApiserverV1alpha1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -41259,47 +25747,19 @@ export class ObservableInternalApiserverV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listStorageVersionWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listStorageVersion(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listStorageVersionWithHttpInfo(rsp))); @@ -41335,47 +25795,19 @@ export class ObservableInternalApiserverV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchStorageVersionWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchStorageVersion(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchStorageVersionWithHttpInfo(rsp))); @@ -41407,47 +25839,19 @@ export class ObservableInternalApiserverV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchStorageVersionStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchStorageVersionStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchStorageVersionStatusWithHttpInfo(rsp))); @@ -41474,47 +25878,19 @@ export class ObservableInternalApiserverV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readStorageVersionWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readStorageVersion(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readStorageVersionWithHttpInfo(rsp))); @@ -41536,47 +25912,19 @@ export class ObservableInternalApiserverV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readStorageVersionStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readStorageVersionStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readStorageVersionStatusWithHttpInfo(rsp))); @@ -41602,47 +25950,19 @@ export class ObservableInternalApiserverV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceStorageVersionWithHttpInfo(name: string, body: V1alpha1StorageVersion, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceStorageVersion(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceStorageVersionWithHttpInfo(rsp))); @@ -41672,47 +25992,19 @@ export class ObservableInternalApiserverV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceStorageVersionStatusWithHttpInfo(name: string, body: V1alpha1StorageVersion, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceStorageVersionStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceStorageVersionStatusWithHttpInfo(rsp))); @@ -41754,47 +26046,19 @@ export class ObservableLogsApi { * @param logpath path to the log */ public logFileHandlerWithHttpInfo(logpath: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.logFileHandler(logpath, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.logFileHandlerWithHttpInfo(rsp))); @@ -41811,47 +26075,19 @@ export class ObservableLogsApi { /** */ public logFileListHandlerWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.logFileListHandler(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.logFileListHandlerWithHttpInfo(rsp))); @@ -41886,47 +26122,19 @@ export class ObservableNetworkingApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -41967,47 +26175,19 @@ export class ObservableNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createIPAddressWithHttpInfo(body: V1IPAddress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createIPAddress(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createIPAddressWithHttpInfo(rsp))); @@ -42035,47 +26215,19 @@ export class ObservableNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createIngressClassWithHttpInfo(body: V1IngressClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createIngressClass(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createIngressClassWithHttpInfo(rsp))); @@ -42104,47 +26256,19 @@ export class ObservableNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedIngressWithHttpInfo(namespace: string, body: V1Ingress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedIngress(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedIngressWithHttpInfo(rsp))); @@ -42174,47 +26298,19 @@ export class ObservableNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedNetworkPolicyWithHttpInfo(namespace: string, body: V1NetworkPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedNetworkPolicy(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedNetworkPolicyWithHttpInfo(rsp))); @@ -42243,47 +26339,19 @@ export class ObservableNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createServiceCIDRWithHttpInfo(body: V1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createServiceCIDR(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createServiceCIDRWithHttpInfo(rsp))); @@ -42321,47 +26389,19 @@ export class ObservableNetworkingV1Api { * @param [body] */ public deleteCollectionIPAddressWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionIPAddress(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionIPAddressWithHttpInfo(rsp))); @@ -42409,47 +26449,19 @@ export class ObservableNetworkingV1Api { * @param [body] */ public deleteCollectionIngressClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionIngressClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionIngressClassWithHttpInfo(rsp))); @@ -42498,47 +26510,19 @@ export class ObservableNetworkingV1Api { * @param [body] */ public deleteCollectionNamespacedIngressWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedIngress(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedIngressWithHttpInfo(rsp))); @@ -42588,47 +26572,19 @@ export class ObservableNetworkingV1Api { * @param [body] */ public deleteCollectionNamespacedNetworkPolicyWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedNetworkPolicy(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedNetworkPolicyWithHttpInfo(rsp))); @@ -42677,47 +26633,19 @@ export class ObservableNetworkingV1Api { * @param [body] */ public deleteCollectionServiceCIDRWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionServiceCIDR(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionServiceCIDRWithHttpInfo(rsp))); @@ -42758,47 +26686,19 @@ export class ObservableNetworkingV1Api { * @param [body] */ public deleteIPAddressWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteIPAddress(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteIPAddressWithHttpInfo(rsp))); @@ -42832,47 +26732,19 @@ export class ObservableNetworkingV1Api { * @param [body] */ public deleteIngressClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteIngressClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteIngressClassWithHttpInfo(rsp))); @@ -42907,47 +26779,19 @@ export class ObservableNetworkingV1Api { * @param [body] */ public deleteNamespacedIngressWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedIngress(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedIngressWithHttpInfo(rsp))); @@ -42983,47 +26827,19 @@ export class ObservableNetworkingV1Api { * @param [body] */ public deleteNamespacedNetworkPolicyWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedNetworkPolicy(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedNetworkPolicyWithHttpInfo(rsp))); @@ -43058,47 +26874,19 @@ export class ObservableNetworkingV1Api { * @param [body] */ public deleteServiceCIDRWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteServiceCIDR(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteServiceCIDRWithHttpInfo(rsp))); @@ -43124,47 +26912,19 @@ export class ObservableNetworkingV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -43193,47 +26953,19 @@ export class ObservableNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listIPAddressWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listIPAddress(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listIPAddressWithHttpInfo(rsp))); @@ -43273,47 +27005,19 @@ export class ObservableNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listIngressClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listIngressClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listIngressClassWithHttpInfo(rsp))); @@ -43353,47 +27057,19 @@ export class ObservableNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listIngressForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listIngressForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listIngressForAllNamespacesWithHttpInfo(rsp))); @@ -43434,47 +27110,19 @@ export class ObservableNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedIngressWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedIngress(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedIngressWithHttpInfo(rsp))); @@ -43516,47 +27164,19 @@ export class ObservableNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedNetworkPolicyWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedNetworkPolicy(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedNetworkPolicyWithHttpInfo(rsp))); @@ -43597,47 +27217,19 @@ export class ObservableNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNetworkPolicyForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNetworkPolicyForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNetworkPolicyForAllNamespacesWithHttpInfo(rsp))); @@ -43677,47 +27269,19 @@ export class ObservableNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listServiceCIDRWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listServiceCIDR(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listServiceCIDRWithHttpInfo(rsp))); @@ -43753,47 +27317,19 @@ export class ObservableNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchIPAddressWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchIPAddress(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchIPAddressWithHttpInfo(rsp))); @@ -43825,47 +27361,19 @@ export class ObservableNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchIngressClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchIngressClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchIngressClassWithHttpInfo(rsp))); @@ -43898,47 +27406,19 @@ export class ObservableNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedIngressWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedIngressWithHttpInfo(rsp))); @@ -43972,47 +27452,19 @@ export class ObservableNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedIngressStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedIngressStatusWithHttpInfo(rsp))); @@ -44046,47 +27498,19 @@ export class ObservableNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedNetworkPolicyWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedNetworkPolicyWithHttpInfo(rsp))); @@ -44119,47 +27543,19 @@ export class ObservableNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchServiceCIDRWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchServiceCIDR(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchServiceCIDRWithHttpInfo(rsp))); @@ -44191,47 +27587,19 @@ export class ObservableNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchServiceCIDRStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchServiceCIDRStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchServiceCIDRStatusWithHttpInfo(rsp))); @@ -44258,47 +27626,19 @@ export class ObservableNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readIPAddressWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readIPAddress(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readIPAddressWithHttpInfo(rsp))); @@ -44320,47 +27660,19 @@ export class ObservableNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readIngressClassWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readIngressClass(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readIngressClassWithHttpInfo(rsp))); @@ -44383,47 +27695,19 @@ export class ObservableNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedIngressWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedIngress(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedIngressWithHttpInfo(rsp))); @@ -44447,47 +27731,19 @@ export class ObservableNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedIngressStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedIngressStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedIngressStatusWithHttpInfo(rsp))); @@ -44511,47 +27767,19 @@ export class ObservableNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedNetworkPolicyWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedNetworkPolicy(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedNetworkPolicyWithHttpInfo(rsp))); @@ -44574,47 +27802,19 @@ export class ObservableNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readServiceCIDRWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readServiceCIDR(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readServiceCIDRWithHttpInfo(rsp))); @@ -44636,47 +27836,19 @@ export class ObservableNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readServiceCIDRStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readServiceCIDRStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readServiceCIDRStatusWithHttpInfo(rsp))); @@ -44702,47 +27874,19 @@ export class ObservableNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceIPAddressWithHttpInfo(name: string, body: V1IPAddress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceIPAddress(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceIPAddressWithHttpInfo(rsp))); @@ -44772,47 +27916,19 @@ export class ObservableNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceIngressClassWithHttpInfo(name: string, body: V1IngressClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceIngressClass(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceIngressClassWithHttpInfo(rsp))); @@ -44843,47 +27959,19 @@ export class ObservableNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedIngressWithHttpInfo(name: string, namespace: string, body: V1Ingress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedIngressWithHttpInfo(rsp))); @@ -44915,47 +28003,19 @@ export class ObservableNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedIngressStatusWithHttpInfo(name: string, namespace: string, body: V1Ingress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedIngressStatusWithHttpInfo(rsp))); @@ -44987,47 +28047,19 @@ export class ObservableNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedNetworkPolicyWithHttpInfo(name: string, namespace: string, body: V1NetworkPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedNetworkPolicyWithHttpInfo(rsp))); @@ -45058,47 +28090,19 @@ export class ObservableNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceServiceCIDRWithHttpInfo(name: string, body: V1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceServiceCIDR(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceServiceCIDRWithHttpInfo(rsp))); @@ -45128,47 +28132,19 @@ export class ObservableNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceServiceCIDRStatusWithHttpInfo(name: string, body: V1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceServiceCIDRStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceServiceCIDRStatusWithHttpInfo(rsp))); @@ -45215,47 +28191,19 @@ export class ObservableNetworkingV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createIPAddressWithHttpInfo(body: V1beta1IPAddress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createIPAddress(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createIPAddressWithHttpInfo(rsp))); @@ -45283,47 +28231,19 @@ export class ObservableNetworkingV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createServiceCIDRWithHttpInfo(body: V1beta1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createServiceCIDR(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createServiceCIDRWithHttpInfo(rsp))); @@ -45361,47 +28281,19 @@ export class ObservableNetworkingV1beta1Api { * @param [body] */ public deleteCollectionIPAddressWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionIPAddress(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionIPAddressWithHttpInfo(rsp))); @@ -45449,47 +28341,19 @@ export class ObservableNetworkingV1beta1Api { * @param [body] */ public deleteCollectionServiceCIDRWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionServiceCIDR(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionServiceCIDRWithHttpInfo(rsp))); @@ -45530,47 +28394,19 @@ export class ObservableNetworkingV1beta1Api { * @param [body] */ public deleteIPAddressWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteIPAddress(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteIPAddressWithHttpInfo(rsp))); @@ -45604,47 +28440,19 @@ export class ObservableNetworkingV1beta1Api { * @param [body] */ public deleteServiceCIDRWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteServiceCIDR(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteServiceCIDRWithHttpInfo(rsp))); @@ -45670,47 +28478,19 @@ export class ObservableNetworkingV1beta1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -45739,47 +28519,19 @@ export class ObservableNetworkingV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listIPAddressWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listIPAddress(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listIPAddressWithHttpInfo(rsp))); @@ -45819,47 +28571,19 @@ export class ObservableNetworkingV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listServiceCIDRWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listServiceCIDR(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listServiceCIDRWithHttpInfo(rsp))); @@ -45895,47 +28619,19 @@ export class ObservableNetworkingV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchIPAddressWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchIPAddress(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchIPAddressWithHttpInfo(rsp))); @@ -45967,47 +28663,19 @@ export class ObservableNetworkingV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchServiceCIDRWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchServiceCIDR(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchServiceCIDRWithHttpInfo(rsp))); @@ -46039,47 +28707,19 @@ export class ObservableNetworkingV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchServiceCIDRStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchServiceCIDRStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchServiceCIDRStatusWithHttpInfo(rsp))); @@ -46106,47 +28746,19 @@ export class ObservableNetworkingV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readIPAddressWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readIPAddress(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readIPAddressWithHttpInfo(rsp))); @@ -46168,47 +28780,19 @@ export class ObservableNetworkingV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readServiceCIDRWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readServiceCIDR(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readServiceCIDRWithHttpInfo(rsp))); @@ -46230,47 +28814,19 @@ export class ObservableNetworkingV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readServiceCIDRStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readServiceCIDRStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readServiceCIDRStatusWithHttpInfo(rsp))); @@ -46296,47 +28852,19 @@ export class ObservableNetworkingV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceIPAddressWithHttpInfo(name: string, body: V1beta1IPAddress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceIPAddress(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceIPAddressWithHttpInfo(rsp))); @@ -46366,47 +28894,19 @@ export class ObservableNetworkingV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceServiceCIDRWithHttpInfo(name: string, body: V1beta1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceServiceCIDR(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceServiceCIDRWithHttpInfo(rsp))); @@ -46436,47 +28936,19 @@ export class ObservableNetworkingV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceServiceCIDRStatusWithHttpInfo(name: string, body: V1beta1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceServiceCIDRStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceServiceCIDRStatusWithHttpInfo(rsp))); @@ -46518,47 +28990,19 @@ export class ObservableNodeApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -46599,47 +29043,19 @@ export class ObservableNodeV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createRuntimeClassWithHttpInfo(body: V1RuntimeClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createRuntimeClass(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createRuntimeClassWithHttpInfo(rsp))); @@ -46677,47 +29093,19 @@ export class ObservableNodeV1Api { * @param [body] */ public deleteCollectionRuntimeClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionRuntimeClassWithHttpInfo(rsp))); @@ -46758,47 +29146,19 @@ export class ObservableNodeV1Api { * @param [body] */ public deleteRuntimeClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteRuntimeClassWithHttpInfo(rsp))); @@ -46824,47 +29184,19 @@ export class ObservableNodeV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -46893,47 +29225,19 @@ export class ObservableNodeV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listRuntimeClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listRuntimeClassWithHttpInfo(rsp))); @@ -46969,47 +29273,19 @@ export class ObservableNodeV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchRuntimeClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchRuntimeClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchRuntimeClassWithHttpInfo(rsp))); @@ -47036,47 +29312,19 @@ export class ObservableNodeV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readRuntimeClassWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readRuntimeClass(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readRuntimeClassWithHttpInfo(rsp))); @@ -47102,47 +29350,19 @@ export class ObservableNodeV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceRuntimeClassWithHttpInfo(name: string, body: V1RuntimeClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceRuntimeClassWithHttpInfo(rsp))); @@ -47184,47 +29404,19 @@ export class ObservableOpenidApi { * get service account issuer OpenID JSON Web Key Set (contains public token verification keys) */ public getServiceAccountIssuerOpenIDKeysetWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getServiceAccountIssuerOpenIDKeyset(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getServiceAccountIssuerOpenIDKeysetWithHttpInfo(rsp))); @@ -47260,47 +29452,19 @@ export class ObservablePolicyApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -47342,47 +29506,19 @@ export class ObservablePolicyV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedPodDisruptionBudgetWithHttpInfo(namespace: string, body: V1PodDisruptionBudget, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedPodDisruptionBudget(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedPodDisruptionBudgetWithHttpInfo(rsp))); @@ -47422,47 +29558,19 @@ export class ObservablePolicyV1Api { * @param [body] */ public deleteCollectionNamespacedPodDisruptionBudgetWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedPodDisruptionBudget(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedPodDisruptionBudgetWithHttpInfo(rsp))); @@ -47505,47 +29613,19 @@ export class ObservablePolicyV1Api { * @param [body] */ public deleteNamespacedPodDisruptionBudgetWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedPodDisruptionBudget(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedPodDisruptionBudgetWithHttpInfo(rsp))); @@ -47572,47 +29652,19 @@ export class ObservablePolicyV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -47642,47 +29694,19 @@ export class ObservablePolicyV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedPodDisruptionBudgetWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedPodDisruptionBudget(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedPodDisruptionBudgetWithHttpInfo(rsp))); @@ -47723,47 +29747,19 @@ export class ObservablePolicyV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPodDisruptionBudgetForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listPodDisruptionBudgetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listPodDisruptionBudgetForAllNamespacesWithHttpInfo(rsp))); @@ -47800,47 +29796,19 @@ export class ObservablePolicyV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodDisruptionBudgetWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedPodDisruptionBudgetWithHttpInfo(rsp))); @@ -47874,47 +29842,19 @@ export class ObservablePolicyV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodDisruptionBudgetStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedPodDisruptionBudgetStatusWithHttpInfo(rsp))); @@ -47943,47 +29883,19 @@ export class ObservablePolicyV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodDisruptionBudgetWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedPodDisruptionBudget(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedPodDisruptionBudgetWithHttpInfo(rsp))); @@ -48007,47 +29919,19 @@ export class ObservablePolicyV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodDisruptionBudgetStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedPodDisruptionBudgetStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedPodDisruptionBudgetStatusWithHttpInfo(rsp))); @@ -48075,47 +29959,19 @@ export class ObservablePolicyV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodDisruptionBudgetWithHttpInfo(name: string, namespace: string, body: V1PodDisruptionBudget, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedPodDisruptionBudgetWithHttpInfo(rsp))); @@ -48147,47 +30003,19 @@ export class ObservablePolicyV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodDisruptionBudgetStatusWithHttpInfo(name: string, namespace: string, body: V1PodDisruptionBudget, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedPodDisruptionBudgetStatusWithHttpInfo(rsp))); @@ -48230,47 +30058,19 @@ export class ObservableRbacAuthorizationApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -48311,47 +30111,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createClusterRoleWithHttpInfo(body: V1ClusterRole, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createClusterRole(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createClusterRoleWithHttpInfo(rsp))); @@ -48379,47 +30151,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createClusterRoleBindingWithHttpInfo(body: V1ClusterRoleBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createClusterRoleBinding(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createClusterRoleBindingWithHttpInfo(rsp))); @@ -48448,47 +30192,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedRoleWithHttpInfo(namespace: string, body: V1Role, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedRoleWithHttpInfo(rsp))); @@ -48518,47 +30234,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedRoleBindingWithHttpInfo(namespace: string, body: V1RoleBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedRoleBindingWithHttpInfo(rsp))); @@ -48590,47 +30278,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [body] */ public deleteClusterRoleWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteClusterRoleWithHttpInfo(rsp))); @@ -48664,47 +30324,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [body] */ public deleteClusterRoleBindingWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteClusterRoleBindingWithHttpInfo(rsp))); @@ -48745,47 +30377,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [body] */ public deleteCollectionClusterRoleWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionClusterRoleWithHttpInfo(rsp))); @@ -48833,47 +30437,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [body] */ public deleteCollectionClusterRoleBindingWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionClusterRoleBindingWithHttpInfo(rsp))); @@ -48922,47 +30498,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [body] */ public deleteCollectionNamespacedRoleWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedRoleWithHttpInfo(rsp))); @@ -49012,47 +30560,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [body] */ public deleteCollectionNamespacedRoleBindingWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedRoleBindingWithHttpInfo(rsp))); @@ -49095,47 +30615,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [body] */ public deleteNamespacedRoleWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedRoleWithHttpInfo(rsp))); @@ -49171,47 +30663,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [body] */ public deleteNamespacedRoleBindingWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedRoleBindingWithHttpInfo(rsp))); @@ -49238,47 +30702,19 @@ export class ObservableRbacAuthorizationV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -49307,47 +30743,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listClusterRoleWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listClusterRoleWithHttpInfo(rsp))); @@ -49387,47 +30795,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listClusterRoleBindingWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listClusterRoleBindingWithHttpInfo(rsp))); @@ -49468,47 +30848,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedRoleWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedRoleWithHttpInfo(rsp))); @@ -49550,47 +30902,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedRoleBindingWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedRoleBindingWithHttpInfo(rsp))); @@ -49631,47 +30955,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listRoleBindingForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listRoleBindingForAllNamespacesWithHttpInfo(rsp))); @@ -49711,47 +31007,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listRoleForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listRoleForAllNamespacesWithHttpInfo(rsp))); @@ -49787,47 +31055,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterRoleWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchClusterRole(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchClusterRoleWithHttpInfo(rsp))); @@ -49859,47 +31099,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterRoleBindingWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchClusterRoleBindingWithHttpInfo(rsp))); @@ -49932,47 +31144,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedRoleWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedRoleWithHttpInfo(rsp))); @@ -50006,47 +31190,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedRoleBindingWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedRoleBindingWithHttpInfo(rsp))); @@ -50074,47 +31230,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readClusterRoleWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readClusterRole(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readClusterRoleWithHttpInfo(rsp))); @@ -50136,47 +31264,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readClusterRoleBindingWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readClusterRoleBinding(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readClusterRoleBindingWithHttpInfo(rsp))); @@ -50199,47 +31299,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedRoleWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedRole(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedRoleWithHttpInfo(rsp))); @@ -50263,47 +31335,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedRoleBindingWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedRoleBinding(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedRoleBindingWithHttpInfo(rsp))); @@ -50330,47 +31374,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceClusterRoleWithHttpInfo(name: string, body: V1ClusterRole, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceClusterRole(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceClusterRoleWithHttpInfo(rsp))); @@ -50400,47 +31416,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceClusterRoleBindingWithHttpInfo(name: string, body: V1ClusterRoleBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceClusterRoleBindingWithHttpInfo(rsp))); @@ -50471,47 +31459,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedRoleWithHttpInfo(name: string, namespace: string, body: V1Role, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedRoleWithHttpInfo(rsp))); @@ -50543,47 +31503,19 @@ export class ObservableRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedRoleBindingWithHttpInfo(name: string, namespace: string, body: V1RoleBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedRoleBindingWithHttpInfo(rsp))); @@ -50626,47 +31558,19 @@ export class ObservableResourceApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -50707,47 +31611,19 @@ export class ObservableResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createDeviceClassWithHttpInfo(body: V1alpha3DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createDeviceClass(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createDeviceClassWithHttpInfo(rsp))); @@ -50775,47 +31651,19 @@ export class ObservableResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createDeviceTaintRuleWithHttpInfo(body: V1alpha3DeviceTaintRule, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createDeviceTaintRule(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createDeviceTaintRuleWithHttpInfo(rsp))); @@ -50844,47 +31692,19 @@ export class ObservableResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaimWithHttpInfo(namespace: string, body: V1alpha3ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedResourceClaim(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedResourceClaimWithHttpInfo(rsp))); @@ -50914,47 +31734,19 @@ export class ObservableResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, body: V1alpha3ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedResourceClaimTemplate(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -50983,47 +31775,19 @@ export class ObservableResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createResourceSliceWithHttpInfo(body: V1alpha3ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createResourceSlice(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createResourceSliceWithHttpInfo(rsp))); @@ -51061,47 +31825,19 @@ export class ObservableResourceV1alpha3Api { * @param [body] */ public deleteCollectionDeviceClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionDeviceClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionDeviceClassWithHttpInfo(rsp))); @@ -51149,47 +31885,19 @@ export class ObservableResourceV1alpha3Api { * @param [body] */ public deleteCollectionDeviceTaintRuleWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionDeviceTaintRule(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionDeviceTaintRuleWithHttpInfo(rsp))); @@ -51238,47 +31946,19 @@ export class ObservableResourceV1alpha3Api { * @param [body] */ public deleteCollectionNamespacedResourceClaimWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedResourceClaim(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedResourceClaimWithHttpInfo(rsp))); @@ -51328,47 +32008,19 @@ export class ObservableResourceV1alpha3Api { * @param [body] */ public deleteCollectionNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedResourceClaimTemplate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -51417,47 +32069,19 @@ export class ObservableResourceV1alpha3Api { * @param [body] */ public deleteCollectionResourceSliceWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionResourceSlice(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionResourceSliceWithHttpInfo(rsp))); @@ -51498,47 +32122,19 @@ export class ObservableResourceV1alpha3Api { * @param [body] */ public deleteDeviceClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteDeviceClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteDeviceClassWithHttpInfo(rsp))); @@ -51572,47 +32168,19 @@ export class ObservableResourceV1alpha3Api { * @param [body] */ public deleteDeviceTaintRuleWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteDeviceTaintRule(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteDeviceTaintRuleWithHttpInfo(rsp))); @@ -51647,47 +32215,19 @@ export class ObservableResourceV1alpha3Api { * @param [body] */ public deleteNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedResourceClaim(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedResourceClaimWithHttpInfo(rsp))); @@ -51723,47 +32263,19 @@ export class ObservableResourceV1alpha3Api { * @param [body] */ public deleteNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedResourceClaimTemplate(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -51798,47 +32310,19 @@ export class ObservableResourceV1alpha3Api { * @param [body] */ public deleteResourceSliceWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteResourceSlice(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteResourceSliceWithHttpInfo(rsp))); @@ -51864,47 +32348,19 @@ export class ObservableResourceV1alpha3Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -51933,47 +32389,19 @@ export class ObservableResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDeviceClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listDeviceClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listDeviceClassWithHttpInfo(rsp))); @@ -52013,47 +32441,19 @@ export class ObservableResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDeviceTaintRuleWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listDeviceTaintRule(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listDeviceTaintRuleWithHttpInfo(rsp))); @@ -52094,47 +32494,19 @@ export class ObservableResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaimWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedResourceClaim(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedResourceClaimWithHttpInfo(rsp))); @@ -52176,47 +32548,19 @@ export class ObservableResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedResourceClaimTemplate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -52257,47 +32601,19 @@ export class ObservableResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listResourceClaimForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listResourceClaimForAllNamespacesWithHttpInfo(rsp))); @@ -52337,47 +32653,19 @@ export class ObservableResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimTemplateForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listResourceClaimTemplateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listResourceClaimTemplateForAllNamespacesWithHttpInfo(rsp))); @@ -52417,47 +32705,19 @@ export class ObservableResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceSliceWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listResourceSlice(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listResourceSliceWithHttpInfo(rsp))); @@ -52493,47 +32753,19 @@ export class ObservableResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchDeviceClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchDeviceClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchDeviceClassWithHttpInfo(rsp))); @@ -52565,47 +32797,19 @@ export class ObservableResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchDeviceTaintRuleWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchDeviceTaintRule(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchDeviceTaintRuleWithHttpInfo(rsp))); @@ -52638,47 +32842,19 @@ export class ObservableResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedResourceClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedResourceClaimWithHttpInfo(rsp))); @@ -52712,47 +32888,19 @@ export class ObservableResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedResourceClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedResourceClaimStatusWithHttpInfo(rsp))); @@ -52786,47 +32934,19 @@ export class ObservableResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedResourceClaimTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -52859,47 +32979,19 @@ export class ObservableResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchResourceSliceWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchResourceSlice(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchResourceSliceWithHttpInfo(rsp))); @@ -52926,47 +33018,19 @@ export class ObservableResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readDeviceClassWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readDeviceClass(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readDeviceClassWithHttpInfo(rsp))); @@ -52988,47 +33052,19 @@ export class ObservableResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readDeviceTaintRuleWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readDeviceTaintRule(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readDeviceTaintRuleWithHttpInfo(rsp))); @@ -53051,47 +33087,19 @@ export class ObservableResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedResourceClaim(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedResourceClaimWithHttpInfo(rsp))); @@ -53115,47 +33123,19 @@ export class ObservableResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedResourceClaimStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedResourceClaimStatusWithHttpInfo(rsp))); @@ -53179,47 +33159,19 @@ export class ObservableResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedResourceClaimTemplate(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -53242,47 +33194,19 @@ export class ObservableResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readResourceSliceWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readResourceSlice(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readResourceSliceWithHttpInfo(rsp))); @@ -53308,47 +33232,19 @@ export class ObservableResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceDeviceClassWithHttpInfo(name: string, body: V1alpha3DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceDeviceClass(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceDeviceClassWithHttpInfo(rsp))); @@ -53378,47 +33274,19 @@ export class ObservableResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceDeviceTaintRuleWithHttpInfo(name: string, body: V1alpha3DeviceTaintRule, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceDeviceTaintRule(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceDeviceTaintRuleWithHttpInfo(rsp))); @@ -53449,47 +33317,19 @@ export class ObservableResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, body: V1alpha3ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedResourceClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedResourceClaimWithHttpInfo(rsp))); @@ -53521,47 +33361,19 @@ export class ObservableResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, body: V1alpha3ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedResourceClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedResourceClaimStatusWithHttpInfo(rsp))); @@ -53593,47 +33405,19 @@ export class ObservableResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, body: V1alpha3ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedResourceClaimTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -53664,47 +33448,19 @@ export class ObservableResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceResourceSliceWithHttpInfo(name: string, body: V1alpha3ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceResourceSlice(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceResourceSliceWithHttpInfo(rsp))); @@ -53751,47 +33507,19 @@ export class ObservableResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createDeviceClassWithHttpInfo(body: V1beta1DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createDeviceClass(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createDeviceClassWithHttpInfo(rsp))); @@ -53820,47 +33548,19 @@ export class ObservableResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaimWithHttpInfo(namespace: string, body: V1beta1ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedResourceClaim(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedResourceClaimWithHttpInfo(rsp))); @@ -53890,47 +33590,19 @@ export class ObservableResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, body: V1beta1ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedResourceClaimTemplate(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -53959,47 +33631,19 @@ export class ObservableResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createResourceSliceWithHttpInfo(body: V1beta1ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createResourceSlice(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createResourceSliceWithHttpInfo(rsp))); @@ -54037,47 +33681,19 @@ export class ObservableResourceV1beta1Api { * @param [body] */ public deleteCollectionDeviceClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionDeviceClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionDeviceClassWithHttpInfo(rsp))); @@ -54126,47 +33742,19 @@ export class ObservableResourceV1beta1Api { * @param [body] */ public deleteCollectionNamespacedResourceClaimWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedResourceClaim(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedResourceClaimWithHttpInfo(rsp))); @@ -54216,47 +33804,19 @@ export class ObservableResourceV1beta1Api { * @param [body] */ public deleteCollectionNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedResourceClaimTemplate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -54305,47 +33865,19 @@ export class ObservableResourceV1beta1Api { * @param [body] */ public deleteCollectionResourceSliceWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionResourceSlice(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionResourceSliceWithHttpInfo(rsp))); @@ -54386,47 +33918,19 @@ export class ObservableResourceV1beta1Api { * @param [body] */ public deleteDeviceClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteDeviceClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteDeviceClassWithHttpInfo(rsp))); @@ -54461,47 +33965,19 @@ export class ObservableResourceV1beta1Api { * @param [body] */ public deleteNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedResourceClaim(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedResourceClaimWithHttpInfo(rsp))); @@ -54537,47 +34013,19 @@ export class ObservableResourceV1beta1Api { * @param [body] */ public deleteNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedResourceClaimTemplate(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -54612,47 +34060,19 @@ export class ObservableResourceV1beta1Api { * @param [body] */ public deleteResourceSliceWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteResourceSlice(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteResourceSliceWithHttpInfo(rsp))); @@ -54678,47 +34098,19 @@ export class ObservableResourceV1beta1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -54747,47 +34139,19 @@ export class ObservableResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDeviceClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listDeviceClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listDeviceClassWithHttpInfo(rsp))); @@ -54828,47 +34192,19 @@ export class ObservableResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaimWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedResourceClaim(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedResourceClaimWithHttpInfo(rsp))); @@ -54910,47 +34246,19 @@ export class ObservableResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedResourceClaimTemplate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -54991,47 +34299,19 @@ export class ObservableResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listResourceClaimForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listResourceClaimForAllNamespacesWithHttpInfo(rsp))); @@ -55071,47 +34351,19 @@ export class ObservableResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimTemplateForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listResourceClaimTemplateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listResourceClaimTemplateForAllNamespacesWithHttpInfo(rsp))); @@ -55151,47 +34403,19 @@ export class ObservableResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceSliceWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listResourceSlice(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listResourceSliceWithHttpInfo(rsp))); @@ -55227,47 +34451,19 @@ export class ObservableResourceV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchDeviceClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchDeviceClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchDeviceClassWithHttpInfo(rsp))); @@ -55300,47 +34496,19 @@ export class ObservableResourceV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedResourceClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedResourceClaimWithHttpInfo(rsp))); @@ -55374,47 +34542,19 @@ export class ObservableResourceV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedResourceClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedResourceClaimStatusWithHttpInfo(rsp))); @@ -55448,47 +34588,19 @@ export class ObservableResourceV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedResourceClaimTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -55521,47 +34633,19 @@ export class ObservableResourceV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchResourceSliceWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchResourceSlice(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchResourceSliceWithHttpInfo(rsp))); @@ -55588,47 +34672,19 @@ export class ObservableResourceV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readDeviceClassWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readDeviceClass(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readDeviceClassWithHttpInfo(rsp))); @@ -55651,47 +34707,19 @@ export class ObservableResourceV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedResourceClaim(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedResourceClaimWithHttpInfo(rsp))); @@ -55715,47 +34743,19 @@ export class ObservableResourceV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedResourceClaimStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedResourceClaimStatusWithHttpInfo(rsp))); @@ -55779,47 +34779,19 @@ export class ObservableResourceV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedResourceClaimTemplate(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -55842,47 +34814,19 @@ export class ObservableResourceV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readResourceSliceWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readResourceSlice(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readResourceSliceWithHttpInfo(rsp))); @@ -55908,47 +34852,19 @@ export class ObservableResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceDeviceClassWithHttpInfo(name: string, body: V1beta1DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceDeviceClass(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceDeviceClassWithHttpInfo(rsp))); @@ -55979,47 +34895,19 @@ export class ObservableResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, body: V1beta1ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedResourceClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedResourceClaimWithHttpInfo(rsp))); @@ -56051,47 +34939,19 @@ export class ObservableResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, body: V1beta1ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedResourceClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedResourceClaimStatusWithHttpInfo(rsp))); @@ -56123,47 +34983,19 @@ export class ObservableResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, body: V1beta1ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedResourceClaimTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -56194,47 +35026,19 @@ export class ObservableResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceResourceSliceWithHttpInfo(name: string, body: V1beta1ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceResourceSlice(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceResourceSliceWithHttpInfo(rsp))); @@ -56281,47 +35085,19 @@ export class ObservableResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createDeviceClassWithHttpInfo(body: V1beta2DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createDeviceClass(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createDeviceClassWithHttpInfo(rsp))); @@ -56350,47 +35126,19 @@ export class ObservableResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaimWithHttpInfo(namespace: string, body: V1beta2ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedResourceClaim(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedResourceClaimWithHttpInfo(rsp))); @@ -56420,47 +35168,19 @@ export class ObservableResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, body: V1beta2ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedResourceClaimTemplate(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -56489,47 +35209,19 @@ export class ObservableResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createResourceSliceWithHttpInfo(body: V1beta2ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createResourceSlice(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createResourceSliceWithHttpInfo(rsp))); @@ -56567,47 +35259,19 @@ export class ObservableResourceV1beta2Api { * @param [body] */ public deleteCollectionDeviceClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionDeviceClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionDeviceClassWithHttpInfo(rsp))); @@ -56656,47 +35320,19 @@ export class ObservableResourceV1beta2Api { * @param [body] */ public deleteCollectionNamespacedResourceClaimWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedResourceClaim(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedResourceClaimWithHttpInfo(rsp))); @@ -56746,47 +35382,19 @@ export class ObservableResourceV1beta2Api { * @param [body] */ public deleteCollectionNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedResourceClaimTemplate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -56835,47 +35443,19 @@ export class ObservableResourceV1beta2Api { * @param [body] */ public deleteCollectionResourceSliceWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionResourceSlice(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionResourceSliceWithHttpInfo(rsp))); @@ -56916,47 +35496,19 @@ export class ObservableResourceV1beta2Api { * @param [body] */ public deleteDeviceClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteDeviceClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteDeviceClassWithHttpInfo(rsp))); @@ -56991,47 +35543,19 @@ export class ObservableResourceV1beta2Api { * @param [body] */ public deleteNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedResourceClaim(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedResourceClaimWithHttpInfo(rsp))); @@ -57067,47 +35591,19 @@ export class ObservableResourceV1beta2Api { * @param [body] */ public deleteNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedResourceClaimTemplate(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -57142,47 +35638,19 @@ export class ObservableResourceV1beta2Api { * @param [body] */ public deleteResourceSliceWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteResourceSlice(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteResourceSliceWithHttpInfo(rsp))); @@ -57208,47 +35676,19 @@ export class ObservableResourceV1beta2Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -57277,47 +35717,19 @@ export class ObservableResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDeviceClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listDeviceClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listDeviceClassWithHttpInfo(rsp))); @@ -57358,47 +35770,19 @@ export class ObservableResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaimWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedResourceClaim(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedResourceClaimWithHttpInfo(rsp))); @@ -57440,47 +35824,19 @@ export class ObservableResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedResourceClaimTemplate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -57521,47 +35877,19 @@ export class ObservableResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listResourceClaimForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listResourceClaimForAllNamespacesWithHttpInfo(rsp))); @@ -57601,47 +35929,19 @@ export class ObservableResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimTemplateForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listResourceClaimTemplateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listResourceClaimTemplateForAllNamespacesWithHttpInfo(rsp))); @@ -57681,47 +35981,19 @@ export class ObservableResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceSliceWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listResourceSlice(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listResourceSliceWithHttpInfo(rsp))); @@ -57757,47 +36029,19 @@ export class ObservableResourceV1beta2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchDeviceClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchDeviceClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchDeviceClassWithHttpInfo(rsp))); @@ -57830,47 +36074,19 @@ export class ObservableResourceV1beta2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedResourceClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedResourceClaimWithHttpInfo(rsp))); @@ -57904,47 +36120,19 @@ export class ObservableResourceV1beta2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedResourceClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedResourceClaimStatusWithHttpInfo(rsp))); @@ -57978,47 +36166,19 @@ export class ObservableResourceV1beta2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedResourceClaimTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -58051,47 +36211,19 @@ export class ObservableResourceV1beta2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchResourceSliceWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchResourceSlice(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchResourceSliceWithHttpInfo(rsp))); @@ -58118,47 +36250,19 @@ export class ObservableResourceV1beta2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readDeviceClassWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readDeviceClass(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readDeviceClassWithHttpInfo(rsp))); @@ -58181,47 +36285,19 @@ export class ObservableResourceV1beta2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedResourceClaim(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedResourceClaimWithHttpInfo(rsp))); @@ -58245,47 +36321,19 @@ export class ObservableResourceV1beta2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedResourceClaimStatus(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedResourceClaimStatusWithHttpInfo(rsp))); @@ -58309,47 +36357,19 @@ export class ObservableResourceV1beta2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedResourceClaimTemplate(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -58372,47 +36392,19 @@ export class ObservableResourceV1beta2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readResourceSliceWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readResourceSlice(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readResourceSliceWithHttpInfo(rsp))); @@ -58438,47 +36430,19 @@ export class ObservableResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceDeviceClassWithHttpInfo(name: string, body: V1beta2DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceDeviceClass(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceDeviceClassWithHttpInfo(rsp))); @@ -58509,47 +36473,19 @@ export class ObservableResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, body: V1beta2ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedResourceClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedResourceClaimWithHttpInfo(rsp))); @@ -58581,47 +36517,19 @@ export class ObservableResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, body: V1beta2ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedResourceClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedResourceClaimStatusWithHttpInfo(rsp))); @@ -58653,47 +36561,19 @@ export class ObservableResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, body: V1beta2ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedResourceClaimTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedResourceClaimTemplateWithHttpInfo(rsp))); @@ -58724,47 +36604,19 @@ export class ObservableResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceResourceSliceWithHttpInfo(name: string, body: V1beta2ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceResourceSlice(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceResourceSliceWithHttpInfo(rsp))); @@ -58806,47 +36658,19 @@ export class ObservableSchedulingApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -58887,47 +36711,19 @@ export class ObservableSchedulingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createPriorityClassWithHttpInfo(body: V1PriorityClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createPriorityClass(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createPriorityClassWithHttpInfo(rsp))); @@ -58965,47 +36761,19 @@ export class ObservableSchedulingV1Api { * @param [body] */ public deleteCollectionPriorityClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionPriorityClassWithHttpInfo(rsp))); @@ -59046,47 +36814,19 @@ export class ObservableSchedulingV1Api { * @param [body] */ public deletePriorityClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deletePriorityClassWithHttpInfo(rsp))); @@ -59112,47 +36852,19 @@ export class ObservableSchedulingV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -59181,47 +36893,19 @@ export class ObservableSchedulingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPriorityClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listPriorityClassWithHttpInfo(rsp))); @@ -59257,47 +36941,19 @@ export class ObservableSchedulingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchPriorityClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchPriorityClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchPriorityClassWithHttpInfo(rsp))); @@ -59324,47 +36980,19 @@ export class ObservableSchedulingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readPriorityClassWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readPriorityClass(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readPriorityClassWithHttpInfo(rsp))); @@ -59390,47 +37018,19 @@ export class ObservableSchedulingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replacePriorityClassWithHttpInfo(name: string, body: V1PriorityClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replacePriorityClass(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replacePriorityClassWithHttpInfo(rsp))); @@ -59472,47 +37072,19 @@ export class ObservableStorageApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -59553,47 +37125,19 @@ export class ObservableStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createCSIDriverWithHttpInfo(body: V1CSIDriver, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createCSIDriver(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createCSIDriverWithHttpInfo(rsp))); @@ -59621,47 +37165,19 @@ export class ObservableStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createCSINodeWithHttpInfo(body: V1CSINode, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createCSINode(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createCSINodeWithHttpInfo(rsp))); @@ -59690,47 +37206,19 @@ export class ObservableStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedCSIStorageCapacityWithHttpInfo(namespace: string, body: V1CSIStorageCapacity, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createNamespacedCSIStorageCapacity(namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createNamespacedCSIStorageCapacityWithHttpInfo(rsp))); @@ -59759,47 +37247,19 @@ export class ObservableStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createStorageClassWithHttpInfo(body: V1StorageClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createStorageClass(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createStorageClassWithHttpInfo(rsp))); @@ -59827,47 +37287,19 @@ export class ObservableStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createVolumeAttachmentWithHttpInfo(body: V1VolumeAttachment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createVolumeAttachment(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createVolumeAttachmentWithHttpInfo(rsp))); @@ -59898,47 +37330,19 @@ export class ObservableStorageV1Api { * @param [body] */ public deleteCSIDriverWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCSIDriver(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCSIDriverWithHttpInfo(rsp))); @@ -59972,47 +37376,19 @@ export class ObservableStorageV1Api { * @param [body] */ public deleteCSINodeWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCSINode(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCSINodeWithHttpInfo(rsp))); @@ -60053,47 +37429,19 @@ export class ObservableStorageV1Api { * @param [body] */ public deleteCollectionCSIDriverWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionCSIDriver(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionCSIDriverWithHttpInfo(rsp))); @@ -60141,47 +37489,19 @@ export class ObservableStorageV1Api { * @param [body] */ public deleteCollectionCSINodeWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionCSINode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionCSINodeWithHttpInfo(rsp))); @@ -60230,47 +37550,19 @@ export class ObservableStorageV1Api { * @param [body] */ public deleteCollectionNamespacedCSIStorageCapacityWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionNamespacedCSIStorageCapacity(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionNamespacedCSIStorageCapacityWithHttpInfo(rsp))); @@ -60319,47 +37611,19 @@ export class ObservableStorageV1Api { * @param [body] */ public deleteCollectionStorageClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionStorageClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionStorageClassWithHttpInfo(rsp))); @@ -60407,47 +37671,19 @@ export class ObservableStorageV1Api { * @param [body] */ public deleteCollectionVolumeAttachmentWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionVolumeAttachmentWithHttpInfo(rsp))); @@ -60489,47 +37725,19 @@ export class ObservableStorageV1Api { * @param [body] */ public deleteNamespacedCSIStorageCapacityWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteNamespacedCSIStorageCapacity(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteNamespacedCSIStorageCapacityWithHttpInfo(rsp))); @@ -60564,47 +37772,19 @@ export class ObservableStorageV1Api { * @param [body] */ public deleteStorageClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteStorageClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteStorageClassWithHttpInfo(rsp))); @@ -60638,47 +37818,19 @@ export class ObservableStorageV1Api { * @param [body] */ public deleteVolumeAttachmentWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteVolumeAttachmentWithHttpInfo(rsp))); @@ -60704,47 +37856,19 @@ export class ObservableStorageV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -60773,47 +37897,19 @@ export class ObservableStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCSIDriverWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listCSIDriver(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listCSIDriverWithHttpInfo(rsp))); @@ -60853,47 +37949,19 @@ export class ObservableStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCSINodeWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listCSINode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listCSINodeWithHttpInfo(rsp))); @@ -60933,47 +38001,19 @@ export class ObservableStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCSIStorageCapacityForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listCSIStorageCapacityForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listCSIStorageCapacityForAllNamespacesWithHttpInfo(rsp))); @@ -61014,47 +38054,19 @@ export class ObservableStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedCSIStorageCapacityWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listNamespacedCSIStorageCapacity(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listNamespacedCSIStorageCapacityWithHttpInfo(rsp))); @@ -61095,47 +38107,19 @@ export class ObservableStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listStorageClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listStorageClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listStorageClassWithHttpInfo(rsp))); @@ -61175,47 +38159,19 @@ export class ObservableStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listVolumeAttachmentWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listVolumeAttachmentWithHttpInfo(rsp))); @@ -61251,47 +38207,19 @@ export class ObservableStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCSIDriverWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchCSIDriver(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchCSIDriverWithHttpInfo(rsp))); @@ -61323,47 +38251,19 @@ export class ObservableStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCSINodeWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchCSINode(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchCSINodeWithHttpInfo(rsp))); @@ -61396,47 +38296,19 @@ export class ObservableStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCSIStorageCapacityWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchNamespacedCSIStorageCapacityWithHttpInfo(rsp))); @@ -61469,47 +38341,19 @@ export class ObservableStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchStorageClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchStorageClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchStorageClassWithHttpInfo(rsp))); @@ -61541,47 +38385,19 @@ export class ObservableStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchVolumeAttachmentWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchVolumeAttachmentWithHttpInfo(rsp))); @@ -61613,47 +38429,19 @@ export class ObservableStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchVolumeAttachmentStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchVolumeAttachmentStatusWithHttpInfo(rsp))); @@ -61680,47 +38468,19 @@ export class ObservableStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCSIDriverWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readCSIDriver(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readCSIDriverWithHttpInfo(rsp))); @@ -61742,47 +38502,19 @@ export class ObservableStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCSINodeWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readCSINode(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readCSINodeWithHttpInfo(rsp))); @@ -61805,47 +38537,19 @@ export class ObservableStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedCSIStorageCapacityWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readNamespacedCSIStorageCapacity(name, namespace, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readNamespacedCSIStorageCapacityWithHttpInfo(rsp))); @@ -61868,47 +38572,19 @@ export class ObservableStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readStorageClassWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readStorageClass(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readStorageClassWithHttpInfo(rsp))); @@ -61930,47 +38606,19 @@ export class ObservableStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readVolumeAttachmentWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readVolumeAttachment(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readVolumeAttachmentWithHttpInfo(rsp))); @@ -61992,47 +38640,19 @@ export class ObservableStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readVolumeAttachmentStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readVolumeAttachmentStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readVolumeAttachmentStatusWithHttpInfo(rsp))); @@ -62058,47 +38678,19 @@ export class ObservableStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCSIDriverWithHttpInfo(name: string, body: V1CSIDriver, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceCSIDriver(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceCSIDriverWithHttpInfo(rsp))); @@ -62128,47 +38720,19 @@ export class ObservableStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCSINodeWithHttpInfo(name: string, body: V1CSINode, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceCSINode(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceCSINodeWithHttpInfo(rsp))); @@ -62199,47 +38763,19 @@ export class ObservableStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedCSIStorageCapacityWithHttpInfo(name: string, namespace: string, body: V1CSIStorageCapacity, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceNamespacedCSIStorageCapacityWithHttpInfo(rsp))); @@ -62270,47 +38806,19 @@ export class ObservableStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceStorageClassWithHttpInfo(name: string, body: V1StorageClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceStorageClass(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceStorageClassWithHttpInfo(rsp))); @@ -62340,47 +38848,19 @@ export class ObservableStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceVolumeAttachmentWithHttpInfo(name: string, body: V1VolumeAttachment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceVolumeAttachmentWithHttpInfo(rsp))); @@ -62410,47 +38890,19 @@ export class ObservableStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceVolumeAttachmentStatusWithHttpInfo(name: string, body: V1VolumeAttachment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceVolumeAttachmentStatusWithHttpInfo(rsp))); @@ -62497,47 +38949,19 @@ export class ObservableStorageV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createVolumeAttributesClassWithHttpInfo(body: V1alpha1VolumeAttributesClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createVolumeAttributesClass(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createVolumeAttributesClassWithHttpInfo(rsp))); @@ -62575,47 +38999,19 @@ export class ObservableStorageV1alpha1Api { * @param [body] */ public deleteCollectionVolumeAttributesClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionVolumeAttributesClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionVolumeAttributesClassWithHttpInfo(rsp))); @@ -62656,47 +39052,19 @@ export class ObservableStorageV1alpha1Api { * @param [body] */ public deleteVolumeAttributesClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteVolumeAttributesClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteVolumeAttributesClassWithHttpInfo(rsp))); @@ -62722,47 +39090,19 @@ export class ObservableStorageV1alpha1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -62791,47 +39131,19 @@ export class ObservableStorageV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listVolumeAttributesClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listVolumeAttributesClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listVolumeAttributesClassWithHttpInfo(rsp))); @@ -62867,47 +39179,19 @@ export class ObservableStorageV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchVolumeAttributesClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchVolumeAttributesClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchVolumeAttributesClassWithHttpInfo(rsp))); @@ -62934,47 +39218,19 @@ export class ObservableStorageV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readVolumeAttributesClassWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readVolumeAttributesClass(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readVolumeAttributesClassWithHttpInfo(rsp))); @@ -63000,47 +39256,19 @@ export class ObservableStorageV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceVolumeAttributesClassWithHttpInfo(name: string, body: V1alpha1VolumeAttributesClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceVolumeAttributesClass(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceVolumeAttributesClassWithHttpInfo(rsp))); @@ -63087,47 +39315,19 @@ export class ObservableStorageV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createVolumeAttributesClassWithHttpInfo(body: V1beta1VolumeAttributesClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createVolumeAttributesClass(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createVolumeAttributesClassWithHttpInfo(rsp))); @@ -63165,47 +39365,19 @@ export class ObservableStorageV1beta1Api { * @param [body] */ public deleteCollectionVolumeAttributesClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionVolumeAttributesClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionVolumeAttributesClassWithHttpInfo(rsp))); @@ -63246,47 +39418,19 @@ export class ObservableStorageV1beta1Api { * @param [body] */ public deleteVolumeAttributesClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteVolumeAttributesClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteVolumeAttributesClassWithHttpInfo(rsp))); @@ -63312,47 +39456,19 @@ export class ObservableStorageV1beta1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -63381,47 +39497,19 @@ export class ObservableStorageV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listVolumeAttributesClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listVolumeAttributesClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listVolumeAttributesClassWithHttpInfo(rsp))); @@ -63457,47 +39545,19 @@ export class ObservableStorageV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchVolumeAttributesClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchVolumeAttributesClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchVolumeAttributesClassWithHttpInfo(rsp))); @@ -63524,47 +39584,19 @@ export class ObservableStorageV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readVolumeAttributesClassWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readVolumeAttributesClass(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readVolumeAttributesClassWithHttpInfo(rsp))); @@ -63590,47 +39622,19 @@ export class ObservableStorageV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceVolumeAttributesClassWithHttpInfo(name: string, body: V1beta1VolumeAttributesClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceVolumeAttributesClass(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceVolumeAttributesClassWithHttpInfo(rsp))); @@ -63672,47 +39676,19 @@ export class ObservableStoragemigrationApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIGroup(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIGroupWithHttpInfo(rsp))); @@ -63753,47 +39729,19 @@ export class ObservableStoragemigrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createStorageVersionMigrationWithHttpInfo(body: V1alpha1StorageVersionMigration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.createStorageVersionMigration(body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createStorageVersionMigrationWithHttpInfo(rsp))); @@ -63831,47 +39779,19 @@ export class ObservableStoragemigrationV1alpha1Api { * @param [body] */ public deleteCollectionStorageVersionMigrationWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteCollectionStorageVersionMigration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollectionStorageVersionMigrationWithHttpInfo(rsp))); @@ -63912,47 +39832,19 @@ export class ObservableStoragemigrationV1alpha1Api { * @param [body] */ public deleteStorageVersionMigrationWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.deleteStorageVersionMigration(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteStorageVersionMigrationWithHttpInfo(rsp))); @@ -63978,47 +39870,19 @@ export class ObservableStoragemigrationV1alpha1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getAPIResources(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAPIResourcesWithHttpInfo(rsp))); @@ -64047,47 +39911,19 @@ export class ObservableStoragemigrationV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listStorageVersionMigrationWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.listStorageVersionMigration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listStorageVersionMigrationWithHttpInfo(rsp))); @@ -64123,47 +39959,19 @@ export class ObservableStoragemigrationV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchStorageVersionMigrationWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchStorageVersionMigration(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchStorageVersionMigrationWithHttpInfo(rsp))); @@ -64195,47 +40003,19 @@ export class ObservableStoragemigrationV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchStorageVersionMigrationStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.patchStorageVersionMigrationStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.patchStorageVersionMigrationStatusWithHttpInfo(rsp))); @@ -64262,47 +40042,19 @@ export class ObservableStoragemigrationV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readStorageVersionMigrationWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readStorageVersionMigration(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readStorageVersionMigrationWithHttpInfo(rsp))); @@ -64324,47 +40076,19 @@ export class ObservableStoragemigrationV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readStorageVersionMigrationStatusWithHttpInfo(name: string, pretty?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.readStorageVersionMigrationStatus(name, pretty, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.readStorageVersionMigrationStatusWithHttpInfo(rsp))); @@ -64390,47 +40114,19 @@ export class ObservableStoragemigrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceStorageVersionMigrationWithHttpInfo(name: string, body: V1alpha1StorageVersionMigration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceStorageVersionMigration(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceStorageVersionMigrationWithHttpInfo(rsp))); @@ -64460,47 +40156,19 @@ export class ObservableStoragemigrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceStorageVersionMigrationStatusWithHttpInfo(name: string, body: V1alpha1StorageVersionMigration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.replaceStorageVersionMigrationStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, _config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replaceStorageVersionMigrationStatusWithHttpInfo(rsp))); @@ -64542,47 +40210,19 @@ export class ObservableVersionApi { * get the version information for this server */ public getCodeWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getCode(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getCodeWithHttpInfo(rsp))); @@ -64618,47 +40258,19 @@ export class ObservableWellKnownApi { * get service account issuer OpenID configuration, also known as the \'OIDC discovery doc\' */ public getServiceAccountIssuerOpenIDConfigurationWithHttpInfo(_options?: ConfigurationOptions): Observable> { - let _config = this.configuration; - let allMiddleware: Middleware[] = []; - if (_options && _options.middleware){ - const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior - // call-time middleware provided - const calltimeMiddleware: Middleware[] = _options.middleware; - - switch(middlewareMergeStrategy){ - case 'append': - allMiddleware = this.configuration.middleware.concat(calltimeMiddleware); - break; - case 'prepend': - allMiddleware = calltimeMiddleware.concat(this.configuration.middleware) - break; - case 'replace': - allMiddleware = calltimeMiddleware - break; - default: - throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`) - } - } - if (_options){ - _config = { - baseServer: _options.baseServer || this.configuration.baseServer, - httpApi: _options.httpApi || this.configuration.httpApi, - authMethods: _options.authMethods || this.configuration.authMethods, - middleware: allMiddleware || this.configuration.middleware - }; - } + const _config = mergeConfiguration(this.configuration, _options); const requestContextPromise = this.requestFactory.getServiceAccountIssuerOpenIDConfiguration(_config); // build promise chain let middlewarePreObservable = from(requestContextPromise); - for (const middleware of allMiddleware) { + for (const middleware of _config.middleware) { middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); } - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). pipe(mergeMap((response: ResponseContext) => { let middlewarePostObservable = of(response); - for (const middleware of allMiddleware.reverse()) { + for (const middleware of _config.middleware.reverse()) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getServiceAccountIssuerOpenIDConfigurationWithHttpInfo(rsp))); diff --git a/src/gen/types/PromiseAPI.ts b/src/gen/types/PromiseAPI.ts index 654cc8ab1e..38aa29444a 100644 --- a/src/gen/types/PromiseAPI.ts +++ b/src/gen/types/PromiseAPI.ts @@ -1,5 +1,5 @@ import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http.js'; -import { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from '../configuration.js' +import { Configuration, PromiseConfigurationOptions, wrapOptions } from '../configuration.js' import { PromiseMiddleware, Middleware, PromiseMiddlewareWrapper } from '../middleware.js'; import { AdmissionregistrationV1ServiceReference } from '../models/AdmissionregistrationV1ServiceReference.js'; @@ -714,18 +714,7 @@ export class PromiseAdmissionregistrationApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -734,18 +723,7 @@ export class PromiseAdmissionregistrationApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -778,18 +756,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createMutatingWebhookConfigurationWithHttpInfo(body: V1MutatingWebhookConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createMutatingWebhookConfigurationWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -803,18 +770,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createMutatingWebhookConfiguration(body: V1MutatingWebhookConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createMutatingWebhookConfiguration(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -828,18 +784,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createValidatingAdmissionPolicyWithHttpInfo(body: V1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createValidatingAdmissionPolicyWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -853,18 +798,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createValidatingAdmissionPolicy(body: V1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createValidatingAdmissionPolicy(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -878,18 +812,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createValidatingAdmissionPolicyBindingWithHttpInfo(body: V1ValidatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createValidatingAdmissionPolicyBindingWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -903,18 +826,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createValidatingAdmissionPolicyBinding(body: V1ValidatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createValidatingAdmissionPolicyBinding(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -928,18 +840,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createValidatingWebhookConfigurationWithHttpInfo(body: V1ValidatingWebhookConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createValidatingWebhookConfigurationWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -953,18 +854,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createValidatingWebhookConfiguration(body: V1ValidatingWebhookConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createValidatingWebhookConfiguration(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -988,18 +878,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteCollectionMutatingWebhookConfigurationWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionMutatingWebhookConfigurationWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -1023,18 +902,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteCollectionMutatingWebhookConfiguration(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionMutatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -1058,18 +926,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteCollectionValidatingAdmissionPolicyWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionValidatingAdmissionPolicyWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -1093,18 +950,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteCollectionValidatingAdmissionPolicy(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionValidatingAdmissionPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -1128,18 +974,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteCollectionValidatingAdmissionPolicyBindingWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionValidatingAdmissionPolicyBindingWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -1163,18 +998,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteCollectionValidatingAdmissionPolicyBinding(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionValidatingAdmissionPolicyBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -1198,18 +1022,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteCollectionValidatingWebhookConfigurationWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionValidatingWebhookConfigurationWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -1233,18 +1046,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteCollectionValidatingWebhookConfiguration(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionValidatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -1261,18 +1063,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteMutatingWebhookConfigurationWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteMutatingWebhookConfigurationWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -1289,18 +1080,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteMutatingWebhookConfiguration(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteMutatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -1317,18 +1097,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteValidatingAdmissionPolicyWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteValidatingAdmissionPolicyWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -1345,18 +1114,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteValidatingAdmissionPolicy(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteValidatingAdmissionPolicy(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -1373,18 +1131,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteValidatingAdmissionPolicyBindingWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteValidatingAdmissionPolicyBindingWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -1401,18 +1148,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteValidatingAdmissionPolicyBinding(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteValidatingAdmissionPolicyBinding(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -1429,18 +1165,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteValidatingWebhookConfigurationWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteValidatingWebhookConfigurationWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -1457,18 +1182,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [body] */ public deleteValidatingWebhookConfiguration(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteValidatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -1477,18 +1191,7 @@ export class PromiseAdmissionregistrationV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -1497,18 +1200,7 @@ export class PromiseAdmissionregistrationV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -1528,18 +1220,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listMutatingWebhookConfigurationWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listMutatingWebhookConfigurationWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -1559,18 +1240,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listMutatingWebhookConfiguration(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listMutatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -1590,18 +1260,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listValidatingAdmissionPolicyWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listValidatingAdmissionPolicyWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -1621,18 +1280,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listValidatingAdmissionPolicy(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listValidatingAdmissionPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -1652,18 +1300,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listValidatingAdmissionPolicyBindingWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listValidatingAdmissionPolicyBindingWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -1683,18 +1320,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listValidatingAdmissionPolicyBinding(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listValidatingAdmissionPolicyBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -1714,18 +1340,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listValidatingWebhookConfigurationWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listValidatingWebhookConfigurationWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -1745,18 +1360,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listValidatingWebhookConfiguration(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listValidatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -1772,18 +1376,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchMutatingWebhookConfigurationWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchMutatingWebhookConfigurationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -1799,18 +1392,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchMutatingWebhookConfiguration(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -1826,18 +1408,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchValidatingAdmissionPolicyWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -1853,18 +1424,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicy(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -1880,18 +1440,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyBindingWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchValidatingAdmissionPolicyBindingWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -1907,18 +1456,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyBinding(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -1934,18 +1472,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchValidatingAdmissionPolicyStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -1961,18 +1488,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyStatus(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -1988,18 +1504,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingWebhookConfigurationWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchValidatingWebhookConfigurationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -2015,18 +1520,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingWebhookConfiguration(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -2037,18 +1531,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readMutatingWebhookConfigurationWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readMutatingWebhookConfigurationWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -2059,18 +1542,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readMutatingWebhookConfiguration(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readMutatingWebhookConfiguration(name, pretty, observableOptions); return result.toPromise(); } @@ -2081,18 +1553,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readValidatingAdmissionPolicyWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -2103,18 +1564,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicy(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readValidatingAdmissionPolicy(name, pretty, observableOptions); return result.toPromise(); } @@ -2125,18 +1575,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyBindingWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readValidatingAdmissionPolicyBindingWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -2147,18 +1586,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyBinding(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readValidatingAdmissionPolicyBinding(name, pretty, observableOptions); return result.toPromise(); } @@ -2169,18 +1597,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readValidatingAdmissionPolicyStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -2191,18 +1608,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readValidatingAdmissionPolicyStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -2213,18 +1619,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingWebhookConfigurationWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readValidatingWebhookConfigurationWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -2235,18 +1630,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingWebhookConfiguration(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readValidatingWebhookConfiguration(name, pretty, observableOptions); return result.toPromise(); } @@ -2261,18 +1645,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceMutatingWebhookConfigurationWithHttpInfo(name: string, body: V1MutatingWebhookConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceMutatingWebhookConfigurationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -2287,18 +1660,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceMutatingWebhookConfiguration(name: string, body: V1MutatingWebhookConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -2313,18 +1675,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyWithHttpInfo(name: string, body: V1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceValidatingAdmissionPolicyWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -2339,18 +1690,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicy(name: string, body: V1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -2365,18 +1705,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyBindingWithHttpInfo(name: string, body: V1ValidatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceValidatingAdmissionPolicyBindingWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -2391,18 +1720,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyBinding(name: string, body: V1ValidatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -2417,18 +1735,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyStatusWithHttpInfo(name: string, body: V1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceValidatingAdmissionPolicyStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -2443,18 +1750,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyStatus(name: string, body: V1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -2469,18 +1765,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingWebhookConfigurationWithHttpInfo(name: string, body: V1ValidatingWebhookConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceValidatingWebhookConfigurationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -2495,18 +1780,7 @@ export class PromiseAdmissionregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingWebhookConfiguration(name: string, body: V1ValidatingWebhookConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -2539,18 +1813,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createMutatingAdmissionPolicyWithHttpInfo(body: V1alpha1MutatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createMutatingAdmissionPolicyWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -2564,18 +1827,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createMutatingAdmissionPolicy(body: V1alpha1MutatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createMutatingAdmissionPolicy(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -2589,18 +1841,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createMutatingAdmissionPolicyBindingWithHttpInfo(body: V1alpha1MutatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createMutatingAdmissionPolicyBindingWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -2614,18 +1855,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createMutatingAdmissionPolicyBinding(body: V1alpha1MutatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createMutatingAdmissionPolicyBinding(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -2649,18 +1879,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [body] */ public deleteCollectionMutatingAdmissionPolicyWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionMutatingAdmissionPolicyWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -2684,18 +1903,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [body] */ public deleteCollectionMutatingAdmissionPolicy(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionMutatingAdmissionPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -2719,18 +1927,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [body] */ public deleteCollectionMutatingAdmissionPolicyBindingWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionMutatingAdmissionPolicyBindingWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -2754,18 +1951,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [body] */ public deleteCollectionMutatingAdmissionPolicyBinding(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionMutatingAdmissionPolicyBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -2782,18 +1968,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [body] */ public deleteMutatingAdmissionPolicyWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteMutatingAdmissionPolicyWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -2810,18 +1985,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [body] */ public deleteMutatingAdmissionPolicy(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteMutatingAdmissionPolicy(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -2838,18 +2002,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [body] */ public deleteMutatingAdmissionPolicyBindingWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteMutatingAdmissionPolicyBindingWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -2866,18 +2019,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [body] */ public deleteMutatingAdmissionPolicyBinding(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteMutatingAdmissionPolicyBinding(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -2886,18 +2028,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -2906,18 +2037,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -2937,18 +2057,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listMutatingAdmissionPolicyWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listMutatingAdmissionPolicyWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -2968,18 +2077,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listMutatingAdmissionPolicy(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listMutatingAdmissionPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -2999,18 +2097,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listMutatingAdmissionPolicyBindingWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listMutatingAdmissionPolicyBindingWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -3030,18 +2117,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listMutatingAdmissionPolicyBinding(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listMutatingAdmissionPolicyBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -3057,18 +2133,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchMutatingAdmissionPolicyWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchMutatingAdmissionPolicyWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -3084,18 +2149,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchMutatingAdmissionPolicy(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchMutatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -3111,18 +2165,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchMutatingAdmissionPolicyBindingWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchMutatingAdmissionPolicyBindingWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -3138,18 +2181,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchMutatingAdmissionPolicyBinding(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchMutatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -3160,18 +2192,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readMutatingAdmissionPolicyWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readMutatingAdmissionPolicyWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -3182,18 +2203,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readMutatingAdmissionPolicy(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readMutatingAdmissionPolicy(name, pretty, observableOptions); return result.toPromise(); } @@ -3204,18 +2214,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readMutatingAdmissionPolicyBindingWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readMutatingAdmissionPolicyBindingWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -3226,18 +2225,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readMutatingAdmissionPolicyBinding(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readMutatingAdmissionPolicyBinding(name, pretty, observableOptions); return result.toPromise(); } @@ -3252,18 +2240,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceMutatingAdmissionPolicyWithHttpInfo(name: string, body: V1alpha1MutatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceMutatingAdmissionPolicyWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -3278,18 +2255,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceMutatingAdmissionPolicy(name: string, body: V1alpha1MutatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceMutatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -3304,18 +2270,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceMutatingAdmissionPolicyBindingWithHttpInfo(name: string, body: V1alpha1MutatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceMutatingAdmissionPolicyBindingWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -3330,18 +2285,7 @@ export class PromiseAdmissionregistrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceMutatingAdmissionPolicyBinding(name: string, body: V1alpha1MutatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceMutatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -3374,18 +2318,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createValidatingAdmissionPolicyWithHttpInfo(body: V1beta1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createValidatingAdmissionPolicyWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -3399,18 +2332,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createValidatingAdmissionPolicy(body: V1beta1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createValidatingAdmissionPolicy(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -3424,18 +2346,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createValidatingAdmissionPolicyBindingWithHttpInfo(body: V1beta1ValidatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createValidatingAdmissionPolicyBindingWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -3449,18 +2360,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createValidatingAdmissionPolicyBinding(body: V1beta1ValidatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createValidatingAdmissionPolicyBinding(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -3484,18 +2384,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [body] */ public deleteCollectionValidatingAdmissionPolicyWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionValidatingAdmissionPolicyWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -3519,18 +2408,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [body] */ public deleteCollectionValidatingAdmissionPolicy(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionValidatingAdmissionPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -3554,18 +2432,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [body] */ public deleteCollectionValidatingAdmissionPolicyBindingWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionValidatingAdmissionPolicyBindingWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -3589,18 +2456,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [body] */ public deleteCollectionValidatingAdmissionPolicyBinding(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionValidatingAdmissionPolicyBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -3617,18 +2473,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [body] */ public deleteValidatingAdmissionPolicyWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteValidatingAdmissionPolicyWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -3645,18 +2490,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [body] */ public deleteValidatingAdmissionPolicy(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteValidatingAdmissionPolicy(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -3673,18 +2507,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [body] */ public deleteValidatingAdmissionPolicyBindingWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteValidatingAdmissionPolicyBindingWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -3701,18 +2524,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [body] */ public deleteValidatingAdmissionPolicyBinding(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteValidatingAdmissionPolicyBinding(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -3721,18 +2533,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -3741,18 +2542,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -3772,18 +2562,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listValidatingAdmissionPolicyWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listValidatingAdmissionPolicyWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -3803,18 +2582,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listValidatingAdmissionPolicy(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listValidatingAdmissionPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -3834,18 +2602,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listValidatingAdmissionPolicyBindingWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listValidatingAdmissionPolicyBindingWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -3865,18 +2622,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listValidatingAdmissionPolicyBinding(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listValidatingAdmissionPolicyBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -3892,18 +2638,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchValidatingAdmissionPolicyWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -3919,18 +2654,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicy(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -3946,18 +2670,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyBindingWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchValidatingAdmissionPolicyBindingWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -3973,18 +2686,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyBinding(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -4000,18 +2702,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchValidatingAdmissionPolicyStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -4027,18 +2718,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchValidatingAdmissionPolicyStatus(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -4049,18 +2729,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readValidatingAdmissionPolicyWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -4071,18 +2740,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicy(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readValidatingAdmissionPolicy(name, pretty, observableOptions); return result.toPromise(); } @@ -4093,18 +2751,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyBindingWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readValidatingAdmissionPolicyBindingWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -4115,18 +2762,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyBinding(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readValidatingAdmissionPolicyBinding(name, pretty, observableOptions); return result.toPromise(); } @@ -4137,18 +2773,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readValidatingAdmissionPolicyStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -4159,18 +2784,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readValidatingAdmissionPolicyStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readValidatingAdmissionPolicyStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -4185,18 +2799,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyWithHttpInfo(name: string, body: V1beta1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceValidatingAdmissionPolicyWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -4211,18 +2814,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicy(name: string, body: V1beta1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -4237,18 +2829,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyBindingWithHttpInfo(name: string, body: V1beta1ValidatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceValidatingAdmissionPolicyBindingWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -4263,18 +2844,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyBinding(name: string, body: V1beta1ValidatingAdmissionPolicyBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -4289,18 +2859,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyStatusWithHttpInfo(name: string, body: V1beta1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceValidatingAdmissionPolicyStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -4315,18 +2874,7 @@ export class PromiseAdmissionregistrationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceValidatingAdmissionPolicyStatus(name: string, body: V1beta1ValidatingAdmissionPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -4354,18 +2902,7 @@ export class PromiseApiextensionsApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -4374,18 +2911,7 @@ export class PromiseApiextensionsApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -4418,18 +2944,7 @@ export class PromiseApiextensionsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createCustomResourceDefinitionWithHttpInfo(body: V1CustomResourceDefinition, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createCustomResourceDefinitionWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -4443,18 +2958,7 @@ export class PromiseApiextensionsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createCustomResourceDefinition(body: V1CustomResourceDefinition, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createCustomResourceDefinition(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -4478,18 +2982,7 @@ export class PromiseApiextensionsV1Api { * @param [body] */ public deleteCollectionCustomResourceDefinitionWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionCustomResourceDefinitionWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -4513,18 +3006,7 @@ export class PromiseApiextensionsV1Api { * @param [body] */ public deleteCollectionCustomResourceDefinition(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionCustomResourceDefinition(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -4541,18 +3023,7 @@ export class PromiseApiextensionsV1Api { * @param [body] */ public deleteCustomResourceDefinitionWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCustomResourceDefinitionWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -4569,18 +3040,7 @@ export class PromiseApiextensionsV1Api { * @param [body] */ public deleteCustomResourceDefinition(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCustomResourceDefinition(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -4589,18 +3049,7 @@ export class PromiseApiextensionsV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -4609,18 +3058,7 @@ export class PromiseApiextensionsV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -4640,18 +3078,7 @@ export class PromiseApiextensionsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCustomResourceDefinitionWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listCustomResourceDefinitionWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -4671,18 +3098,7 @@ export class PromiseApiextensionsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCustomResourceDefinition(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listCustomResourceDefinition(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -4698,18 +3114,7 @@ export class PromiseApiextensionsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCustomResourceDefinitionWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchCustomResourceDefinitionWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -4725,18 +3130,7 @@ export class PromiseApiextensionsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCustomResourceDefinition(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -4752,18 +3146,7 @@ export class PromiseApiextensionsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCustomResourceDefinitionStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchCustomResourceDefinitionStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -4779,18 +3162,7 @@ export class PromiseApiextensionsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCustomResourceDefinitionStatus(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -4801,18 +3173,7 @@ export class PromiseApiextensionsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCustomResourceDefinitionWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readCustomResourceDefinitionWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -4823,18 +3184,7 @@ export class PromiseApiextensionsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCustomResourceDefinition(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readCustomResourceDefinition(name, pretty, observableOptions); return result.toPromise(); } @@ -4845,18 +3195,7 @@ export class PromiseApiextensionsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCustomResourceDefinitionStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readCustomResourceDefinitionStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -4867,18 +3206,7 @@ export class PromiseApiextensionsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCustomResourceDefinitionStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readCustomResourceDefinitionStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -4893,18 +3221,7 @@ export class PromiseApiextensionsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCustomResourceDefinitionWithHttpInfo(name: string, body: V1CustomResourceDefinition, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceCustomResourceDefinitionWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -4919,18 +3236,7 @@ export class PromiseApiextensionsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCustomResourceDefinition(name: string, body: V1CustomResourceDefinition, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -4945,18 +3251,7 @@ export class PromiseApiextensionsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCustomResourceDefinitionStatusWithHttpInfo(name: string, body: V1CustomResourceDefinition, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceCustomResourceDefinitionStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -4971,18 +3266,7 @@ export class PromiseApiextensionsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCustomResourceDefinitionStatus(name: string, body: V1CustomResourceDefinition, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -5010,18 +3294,7 @@ export class PromiseApiregistrationApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -5030,18 +3303,7 @@ export class PromiseApiregistrationApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -5074,18 +3336,7 @@ export class PromiseApiregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createAPIServiceWithHttpInfo(body: V1APIService, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createAPIServiceWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -5099,18 +3350,7 @@ export class PromiseApiregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createAPIService(body: V1APIService, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createAPIService(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -5127,18 +3367,7 @@ export class PromiseApiregistrationV1Api { * @param [body] */ public deleteAPIServiceWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteAPIServiceWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -5155,18 +3384,7 @@ export class PromiseApiregistrationV1Api { * @param [body] */ public deleteAPIService(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteAPIService(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -5190,18 +3408,7 @@ export class PromiseApiregistrationV1Api { * @param [body] */ public deleteCollectionAPIServiceWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionAPIServiceWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -5225,18 +3432,7 @@ export class PromiseApiregistrationV1Api { * @param [body] */ public deleteCollectionAPIService(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionAPIService(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -5245,18 +3441,7 @@ export class PromiseApiregistrationV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -5265,18 +3450,7 @@ export class PromiseApiregistrationV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -5296,18 +3470,7 @@ export class PromiseApiregistrationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listAPIServiceWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listAPIServiceWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -5327,18 +3490,7 @@ export class PromiseApiregistrationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listAPIService(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listAPIService(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -5354,18 +3506,7 @@ export class PromiseApiregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchAPIServiceWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchAPIServiceWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -5381,18 +3522,7 @@ export class PromiseApiregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchAPIService(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchAPIService(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -5408,18 +3538,7 @@ export class PromiseApiregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchAPIServiceStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchAPIServiceStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -5435,18 +3554,7 @@ export class PromiseApiregistrationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchAPIServiceStatus(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchAPIServiceStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -5457,18 +3565,7 @@ export class PromiseApiregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readAPIServiceWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readAPIServiceWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -5479,18 +3576,7 @@ export class PromiseApiregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readAPIService(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readAPIService(name, pretty, observableOptions); return result.toPromise(); } @@ -5501,18 +3587,7 @@ export class PromiseApiregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readAPIServiceStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readAPIServiceStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -5523,18 +3598,7 @@ export class PromiseApiregistrationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readAPIServiceStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readAPIServiceStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -5549,18 +3613,7 @@ export class PromiseApiregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceAPIServiceWithHttpInfo(name: string, body: V1APIService, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceAPIServiceWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -5575,18 +3628,7 @@ export class PromiseApiregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceAPIService(name: string, body: V1APIService, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceAPIService(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -5601,18 +3643,7 @@ export class PromiseApiregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceAPIServiceStatusWithHttpInfo(name: string, body: V1APIService, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceAPIServiceStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -5627,18 +3658,7 @@ export class PromiseApiregistrationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceAPIServiceStatus(name: string, body: V1APIService, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceAPIServiceStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -5666,18 +3686,7 @@ export class PromiseApisApi { * get available API versions */ public getAPIVersionsWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIVersionsWithHttpInfo(observableOptions); return result.toPromise(); } @@ -5686,18 +3695,7 @@ export class PromiseApisApi { * get available API versions */ public getAPIVersions(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIVersions(observableOptions); return result.toPromise(); } @@ -5725,18 +3723,7 @@ export class PromiseAppsApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -5745,18 +3732,7 @@ export class PromiseAppsApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -5790,18 +3766,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedControllerRevisionWithHttpInfo(namespace: string, body: V1ControllerRevision, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedControllerRevisionWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -5816,18 +3781,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedControllerRevision(namespace: string, body: V1ControllerRevision, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedControllerRevision(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -5842,18 +3796,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedDaemonSetWithHttpInfo(namespace: string, body: V1DaemonSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedDaemonSetWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -5868,18 +3811,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedDaemonSet(namespace: string, body: V1DaemonSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedDaemonSet(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -5894,18 +3826,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedDeploymentWithHttpInfo(namespace: string, body: V1Deployment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedDeploymentWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -5920,18 +3841,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedDeployment(namespace: string, body: V1Deployment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedDeployment(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -5946,18 +3856,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedReplicaSetWithHttpInfo(namespace: string, body: V1ReplicaSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedReplicaSetWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -5972,18 +3871,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedReplicaSet(namespace: string, body: V1ReplicaSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedReplicaSet(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -5998,18 +3886,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedStatefulSetWithHttpInfo(namespace: string, body: V1StatefulSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedStatefulSetWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -6024,18 +3901,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedStatefulSet(namespace: string, body: V1StatefulSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedStatefulSet(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -6060,18 +3926,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteCollectionNamespacedControllerRevisionWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedControllerRevisionWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -6096,18 +3951,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteCollectionNamespacedControllerRevision(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedControllerRevision(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -6132,18 +3976,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteCollectionNamespacedDaemonSetWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedDaemonSetWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -6168,18 +4001,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteCollectionNamespacedDaemonSet(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedDaemonSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -6204,18 +4026,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteCollectionNamespacedDeploymentWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedDeploymentWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -6240,18 +4051,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteCollectionNamespacedDeployment(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedDeployment(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -6276,18 +4076,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteCollectionNamespacedReplicaSetWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedReplicaSetWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -6312,18 +4101,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteCollectionNamespacedReplicaSet(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedReplicaSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -6348,18 +4126,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteCollectionNamespacedStatefulSetWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedStatefulSetWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -6384,18 +4151,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteCollectionNamespacedStatefulSet(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedStatefulSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -6413,18 +4169,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteNamespacedControllerRevisionWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedControllerRevisionWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -6442,18 +4187,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteNamespacedControllerRevision(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedControllerRevision(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -6471,18 +4205,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteNamespacedDaemonSetWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedDaemonSetWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -6500,18 +4223,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteNamespacedDaemonSet(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedDaemonSet(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -6529,18 +4241,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteNamespacedDeploymentWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedDeploymentWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -6558,18 +4259,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteNamespacedDeployment(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedDeployment(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -6587,18 +4277,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteNamespacedReplicaSetWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedReplicaSetWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -6616,18 +4295,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteNamespacedReplicaSet(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedReplicaSet(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -6645,18 +4313,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteNamespacedStatefulSetWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedStatefulSetWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -6674,18 +4331,7 @@ export class PromiseAppsV1Api { * @param [body] */ public deleteNamespacedStatefulSet(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedStatefulSet(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -6694,18 +4340,7 @@ export class PromiseAppsV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -6714,18 +4349,7 @@ export class PromiseAppsV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -6745,18 +4369,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listControllerRevisionForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listControllerRevisionForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -6776,18 +4389,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listControllerRevisionForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listControllerRevisionForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -6807,18 +4409,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDaemonSetForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listDaemonSetForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -6838,18 +4429,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDaemonSetForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listDaemonSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -6869,18 +4449,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDeploymentForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listDeploymentForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -6900,18 +4469,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDeploymentForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listDeploymentForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -6932,18 +4490,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedControllerRevisionWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedControllerRevisionWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -6964,18 +4511,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedControllerRevision(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedControllerRevision(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -6996,18 +4532,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedDaemonSetWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedDaemonSetWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -7028,18 +4553,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedDaemonSet(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedDaemonSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -7060,18 +4574,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedDeploymentWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedDeploymentWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -7092,18 +4595,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedDeployment(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedDeployment(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -7124,18 +4616,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedReplicaSetWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedReplicaSetWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -7156,18 +4637,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedReplicaSet(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedReplicaSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -7188,18 +4658,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedStatefulSetWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedStatefulSetWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -7220,18 +4679,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedStatefulSet(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedStatefulSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -7251,18 +4699,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listReplicaSetForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listReplicaSetForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -7282,18 +4719,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listReplicaSetForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listReplicaSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -7313,18 +4739,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listStatefulSetForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listStatefulSetForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -7344,18 +4759,7 @@ export class PromiseAppsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listStatefulSetForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listStatefulSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -7372,18 +4776,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedControllerRevisionWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedControllerRevisionWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7400,18 +4793,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedControllerRevision(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7428,18 +4810,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedDaemonSetWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedDaemonSetWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7456,18 +4827,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedDaemonSet(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7484,18 +4844,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedDaemonSetStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedDaemonSetStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7512,18 +4861,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedDaemonSetStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7540,18 +4878,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedDeploymentWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedDeploymentWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7568,18 +4895,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedDeployment(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7596,18 +4912,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedDeploymentScaleWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedDeploymentScaleWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7624,18 +4929,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedDeploymentScale(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7652,18 +4946,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedDeploymentStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedDeploymentStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7680,18 +4963,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedDeploymentStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7708,18 +4980,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicaSetWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedReplicaSetWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7736,18 +4997,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicaSet(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7764,18 +5014,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicaSetScaleWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedReplicaSetScaleWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7792,18 +5031,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicaSetScale(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7820,18 +5048,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicaSetStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedReplicaSetStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7848,18 +5065,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicaSetStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7876,18 +5082,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedStatefulSetWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedStatefulSetWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7904,18 +5099,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedStatefulSet(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7932,18 +5116,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedStatefulSetScaleWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedStatefulSetScaleWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7960,18 +5133,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedStatefulSetScale(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -7988,18 +5150,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedStatefulSetStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedStatefulSetStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -8016,18 +5167,7 @@ export class PromiseAppsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedStatefulSetStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -8039,18 +5179,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedControllerRevisionWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedControllerRevisionWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8062,18 +5191,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedControllerRevision(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedControllerRevision(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8085,18 +5203,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedDaemonSetWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedDaemonSetWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8108,18 +5215,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedDaemonSet(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedDaemonSet(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8131,18 +5227,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedDaemonSetStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedDaemonSetStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8154,18 +5239,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedDaemonSetStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedDaemonSetStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8177,18 +5251,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedDeploymentWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedDeploymentWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8200,18 +5263,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedDeployment(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedDeployment(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8223,18 +5275,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedDeploymentScaleWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedDeploymentScaleWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8246,18 +5287,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedDeploymentScale(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedDeploymentScale(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8269,18 +5299,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedDeploymentStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedDeploymentStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8292,18 +5311,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedDeploymentStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedDeploymentStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8315,18 +5323,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicaSetWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedReplicaSetWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8338,18 +5335,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicaSet(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedReplicaSet(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8361,18 +5347,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicaSetScaleWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedReplicaSetScaleWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8384,18 +5359,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicaSetScale(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedReplicaSetScale(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8407,18 +5371,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicaSetStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedReplicaSetStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8430,18 +5383,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicaSetStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedReplicaSetStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8453,18 +5395,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedStatefulSetWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedStatefulSetWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8476,18 +5407,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedStatefulSet(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedStatefulSet(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8499,18 +5419,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedStatefulSetScaleWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedStatefulSetScaleWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8522,18 +5431,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedStatefulSetScale(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedStatefulSetScale(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8545,18 +5443,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedStatefulSetStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedStatefulSetStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8568,18 +5455,7 @@ export class PromiseAppsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedStatefulSetStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedStatefulSetStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -8595,18 +5471,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedControllerRevisionWithHttpInfo(name: string, namespace: string, body: V1ControllerRevision, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedControllerRevisionWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -8622,18 +5487,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedControllerRevision(name: string, namespace: string, body: V1ControllerRevision, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -8649,18 +5503,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedDaemonSetWithHttpInfo(name: string, namespace: string, body: V1DaemonSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedDaemonSetWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -8676,18 +5519,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedDaemonSet(name: string, namespace: string, body: V1DaemonSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -8703,18 +5535,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedDaemonSetStatusWithHttpInfo(name: string, namespace: string, body: V1DaemonSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedDaemonSetStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -8730,18 +5551,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedDaemonSetStatus(name: string, namespace: string, body: V1DaemonSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -8757,18 +5567,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedDeploymentWithHttpInfo(name: string, namespace: string, body: V1Deployment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedDeploymentWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -8784,18 +5583,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedDeployment(name: string, namespace: string, body: V1Deployment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -8811,18 +5599,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedDeploymentScaleWithHttpInfo(name: string, namespace: string, body: V1Scale, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedDeploymentScaleWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -8838,18 +5615,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedDeploymentScale(name: string, namespace: string, body: V1Scale, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -8865,18 +5631,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedDeploymentStatusWithHttpInfo(name: string, namespace: string, body: V1Deployment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedDeploymentStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -8892,18 +5647,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedDeploymentStatus(name: string, namespace: string, body: V1Deployment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -8919,18 +5663,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicaSetWithHttpInfo(name: string, namespace: string, body: V1ReplicaSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedReplicaSetWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -8946,18 +5679,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicaSet(name: string, namespace: string, body: V1ReplicaSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -8973,18 +5695,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicaSetScaleWithHttpInfo(name: string, namespace: string, body: V1Scale, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedReplicaSetScaleWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -9000,18 +5711,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicaSetScale(name: string, namespace: string, body: V1Scale, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -9027,18 +5727,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicaSetStatusWithHttpInfo(name: string, namespace: string, body: V1ReplicaSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedReplicaSetStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -9054,18 +5743,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicaSetStatus(name: string, namespace: string, body: V1ReplicaSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -9081,18 +5759,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedStatefulSetWithHttpInfo(name: string, namespace: string, body: V1StatefulSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedStatefulSetWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -9108,18 +5775,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedStatefulSet(name: string, namespace: string, body: V1StatefulSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -9135,18 +5791,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedStatefulSetScaleWithHttpInfo(name: string, namespace: string, body: V1Scale, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedStatefulSetScaleWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -9162,18 +5807,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedStatefulSetScale(name: string, namespace: string, body: V1Scale, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -9189,18 +5823,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedStatefulSetStatusWithHttpInfo(name: string, namespace: string, body: V1StatefulSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedStatefulSetStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -9216,18 +5839,7 @@ export class PromiseAppsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedStatefulSetStatus(name: string, namespace: string, body: V1StatefulSet, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -9255,18 +5867,7 @@ export class PromiseAuthenticationApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -9275,18 +5876,7 @@ export class PromiseAuthenticationApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -9319,18 +5909,7 @@ export class PromiseAuthenticationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createSelfSubjectReviewWithHttpInfo(body: V1SelfSubjectReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createSelfSubjectReviewWithHttpInfo(body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -9344,18 +5923,7 @@ export class PromiseAuthenticationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createSelfSubjectReview(body: V1SelfSubjectReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createSelfSubjectReview(body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -9369,18 +5937,7 @@ export class PromiseAuthenticationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createTokenReviewWithHttpInfo(body: V1TokenReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createTokenReviewWithHttpInfo(body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -9394,18 +5951,7 @@ export class PromiseAuthenticationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createTokenReview(body: V1TokenReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createTokenReview(body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -9414,18 +5960,7 @@ export class PromiseAuthenticationV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -9434,18 +5969,7 @@ export class PromiseAuthenticationV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -9473,18 +5997,7 @@ export class PromiseAuthorizationApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -9493,18 +6006,7 @@ export class PromiseAuthorizationApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -9538,18 +6040,7 @@ export class PromiseAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createNamespacedLocalSubjectAccessReviewWithHttpInfo(namespace: string, body: V1LocalSubjectAccessReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedLocalSubjectAccessReviewWithHttpInfo(namespace, body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -9564,18 +6055,7 @@ export class PromiseAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createNamespacedLocalSubjectAccessReview(namespace: string, body: V1LocalSubjectAccessReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -9589,18 +6069,7 @@ export class PromiseAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createSelfSubjectAccessReviewWithHttpInfo(body: V1SelfSubjectAccessReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createSelfSubjectAccessReviewWithHttpInfo(body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -9614,18 +6083,7 @@ export class PromiseAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createSelfSubjectAccessReview(body: V1SelfSubjectAccessReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createSelfSubjectAccessReview(body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -9639,18 +6097,7 @@ export class PromiseAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createSelfSubjectRulesReviewWithHttpInfo(body: V1SelfSubjectRulesReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createSelfSubjectRulesReviewWithHttpInfo(body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -9664,18 +6111,7 @@ export class PromiseAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createSelfSubjectRulesReview(body: V1SelfSubjectRulesReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createSelfSubjectRulesReview(body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -9689,18 +6125,7 @@ export class PromiseAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createSubjectAccessReviewWithHttpInfo(body: V1SubjectAccessReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createSubjectAccessReviewWithHttpInfo(body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -9714,18 +6139,7 @@ export class PromiseAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createSubjectAccessReview(body: V1SubjectAccessReview, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createSubjectAccessReview(body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -9734,18 +6148,7 @@ export class PromiseAuthorizationV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -9754,18 +6157,7 @@ export class PromiseAuthorizationV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -9793,18 +6185,7 @@ export class PromiseAutoscalingApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -9813,18 +6194,7 @@ export class PromiseAutoscalingApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -9858,18 +6228,7 @@ export class PromiseAutoscalingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace: string, body: V1HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -9884,18 +6243,7 @@ export class PromiseAutoscalingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedHorizontalPodAutoscaler(namespace: string, body: V1HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -9920,18 +6268,7 @@ export class PromiseAutoscalingV1Api { * @param [body] */ public deleteCollectionNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -9956,18 +6293,7 @@ export class PromiseAutoscalingV1Api { * @param [body] */ public deleteCollectionNamespacedHorizontalPodAutoscaler(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -9985,18 +6311,7 @@ export class PromiseAutoscalingV1Api { * @param [body] */ public deleteNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedHorizontalPodAutoscalerWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -10014,18 +6329,7 @@ export class PromiseAutoscalingV1Api { * @param [body] */ public deleteNamespacedHorizontalPodAutoscaler(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -10034,18 +6338,7 @@ export class PromiseAutoscalingV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -10054,18 +6347,7 @@ export class PromiseAutoscalingV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -10085,18 +6367,7 @@ export class PromiseAutoscalingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listHorizontalPodAutoscalerForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listHorizontalPodAutoscalerForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -10116,18 +6387,7 @@ export class PromiseAutoscalingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -10148,18 +6408,7 @@ export class PromiseAutoscalingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -10180,18 +6429,7 @@ export class PromiseAutoscalingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedHorizontalPodAutoscaler(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -10208,18 +6446,7 @@ export class PromiseAutoscalingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedHorizontalPodAutoscalerWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -10236,18 +6463,7 @@ export class PromiseAutoscalingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedHorizontalPodAutoscaler(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -10264,18 +6480,7 @@ export class PromiseAutoscalingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -10292,18 +6497,7 @@ export class PromiseAutoscalingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedHorizontalPodAutoscalerStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -10315,18 +6509,7 @@ export class PromiseAutoscalingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedHorizontalPodAutoscalerWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -10338,18 +6521,7 @@ export class PromiseAutoscalingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedHorizontalPodAutoscaler(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -10361,18 +6533,7 @@ export class PromiseAutoscalingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -10384,18 +6545,7 @@ export class PromiseAutoscalingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedHorizontalPodAutoscalerStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -10411,18 +6561,7 @@ export class PromiseAutoscalingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, body: V1HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedHorizontalPodAutoscalerWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -10438,18 +6577,7 @@ export class PromiseAutoscalingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedHorizontalPodAutoscaler(name: string, namespace: string, body: V1HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -10465,18 +6593,7 @@ export class PromiseAutoscalingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name: string, namespace: string, body: V1HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -10492,18 +6609,7 @@ export class PromiseAutoscalingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedHorizontalPodAutoscalerStatus(name: string, namespace: string, body: V1HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -10537,18 +6643,7 @@ export class PromiseAutoscalingV2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace: string, body: V2HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -10563,18 +6658,7 @@ export class PromiseAutoscalingV2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedHorizontalPodAutoscaler(namespace: string, body: V2HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -10599,18 +6683,7 @@ export class PromiseAutoscalingV2Api { * @param [body] */ public deleteCollectionNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -10635,18 +6708,7 @@ export class PromiseAutoscalingV2Api { * @param [body] */ public deleteCollectionNamespacedHorizontalPodAutoscaler(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -10664,18 +6726,7 @@ export class PromiseAutoscalingV2Api { * @param [body] */ public deleteNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedHorizontalPodAutoscalerWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -10693,18 +6744,7 @@ export class PromiseAutoscalingV2Api { * @param [body] */ public deleteNamespacedHorizontalPodAutoscaler(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -10713,18 +6753,7 @@ export class PromiseAutoscalingV2Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -10733,18 +6762,7 @@ export class PromiseAutoscalingV2Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -10764,18 +6782,7 @@ export class PromiseAutoscalingV2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listHorizontalPodAutoscalerForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listHorizontalPodAutoscalerForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -10795,18 +6802,7 @@ export class PromiseAutoscalingV2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -10827,18 +6823,7 @@ export class PromiseAutoscalingV2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedHorizontalPodAutoscalerWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -10859,18 +6844,7 @@ export class PromiseAutoscalingV2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedHorizontalPodAutoscaler(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -10887,18 +6861,7 @@ export class PromiseAutoscalingV2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedHorizontalPodAutoscalerWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -10915,18 +6878,7 @@ export class PromiseAutoscalingV2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedHorizontalPodAutoscaler(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -10943,18 +6895,7 @@ export class PromiseAutoscalingV2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -10971,18 +6912,7 @@ export class PromiseAutoscalingV2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedHorizontalPodAutoscalerStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -10994,18 +6924,7 @@ export class PromiseAutoscalingV2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedHorizontalPodAutoscalerWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -11017,18 +6936,7 @@ export class PromiseAutoscalingV2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedHorizontalPodAutoscaler(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -11040,18 +6948,7 @@ export class PromiseAutoscalingV2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -11063,18 +6960,7 @@ export class PromiseAutoscalingV2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedHorizontalPodAutoscalerStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -11090,18 +6976,7 @@ export class PromiseAutoscalingV2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedHorizontalPodAutoscalerWithHttpInfo(name: string, namespace: string, body: V2HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedHorizontalPodAutoscalerWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -11117,18 +6992,7 @@ export class PromiseAutoscalingV2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedHorizontalPodAutoscaler(name: string, namespace: string, body: V2HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -11144,18 +7008,7 @@ export class PromiseAutoscalingV2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name: string, namespace: string, body: V2HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedHorizontalPodAutoscalerStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -11171,18 +7024,7 @@ export class PromiseAutoscalingV2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedHorizontalPodAutoscalerStatus(name: string, namespace: string, body: V2HorizontalPodAutoscaler, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -11210,18 +7052,7 @@ export class PromiseBatchApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -11230,18 +7061,7 @@ export class PromiseBatchApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -11275,18 +7095,7 @@ export class PromiseBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedCronJobWithHttpInfo(namespace: string, body: V1CronJob, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedCronJobWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -11301,18 +7110,7 @@ export class PromiseBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedCronJob(namespace: string, body: V1CronJob, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedCronJob(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -11327,18 +7125,7 @@ export class PromiseBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedJobWithHttpInfo(namespace: string, body: V1Job, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedJobWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -11353,18 +7140,7 @@ export class PromiseBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedJob(namespace: string, body: V1Job, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedJob(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -11389,18 +7165,7 @@ export class PromiseBatchV1Api { * @param [body] */ public deleteCollectionNamespacedCronJobWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedCronJobWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -11425,18 +7190,7 @@ export class PromiseBatchV1Api { * @param [body] */ public deleteCollectionNamespacedCronJob(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedCronJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -11461,18 +7215,7 @@ export class PromiseBatchV1Api { * @param [body] */ public deleteCollectionNamespacedJobWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedJobWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -11497,18 +7240,7 @@ export class PromiseBatchV1Api { * @param [body] */ public deleteCollectionNamespacedJob(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -11526,18 +7258,7 @@ export class PromiseBatchV1Api { * @param [body] */ public deleteNamespacedCronJobWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedCronJobWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -11555,18 +7276,7 @@ export class PromiseBatchV1Api { * @param [body] */ public deleteNamespacedCronJob(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedCronJob(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -11584,18 +7294,7 @@ export class PromiseBatchV1Api { * @param [body] */ public deleteNamespacedJobWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedJobWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -11613,18 +7312,7 @@ export class PromiseBatchV1Api { * @param [body] */ public deleteNamespacedJob(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedJob(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -11633,18 +7321,7 @@ export class PromiseBatchV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -11653,18 +7330,7 @@ export class PromiseBatchV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -11684,18 +7350,7 @@ export class PromiseBatchV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCronJobForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listCronJobForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -11715,18 +7370,7 @@ export class PromiseBatchV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCronJobForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listCronJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -11746,18 +7390,7 @@ export class PromiseBatchV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listJobForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listJobForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -11777,18 +7410,7 @@ export class PromiseBatchV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listJobForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -11809,18 +7431,7 @@ export class PromiseBatchV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedCronJobWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedCronJobWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -11841,18 +7452,7 @@ export class PromiseBatchV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedCronJob(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedCronJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -11873,18 +7473,7 @@ export class PromiseBatchV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedJobWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedJobWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -11905,18 +7494,7 @@ export class PromiseBatchV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedJob(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -11933,18 +7511,7 @@ export class PromiseBatchV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCronJobWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedCronJobWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -11961,18 +7528,7 @@ export class PromiseBatchV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCronJob(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -11989,18 +7545,7 @@ export class PromiseBatchV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCronJobStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedCronJobStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -12017,18 +7562,7 @@ export class PromiseBatchV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCronJobStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -12045,18 +7579,7 @@ export class PromiseBatchV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedJobWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedJobWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -12073,18 +7596,7 @@ export class PromiseBatchV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedJob(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -12101,18 +7613,7 @@ export class PromiseBatchV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedJobStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedJobStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -12129,18 +7630,7 @@ export class PromiseBatchV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedJobStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -12152,18 +7642,7 @@ export class PromiseBatchV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedCronJobWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedCronJobWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -12175,18 +7654,7 @@ export class PromiseBatchV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedCronJob(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedCronJob(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -12198,18 +7666,7 @@ export class PromiseBatchV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedCronJobStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedCronJobStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -12221,18 +7678,7 @@ export class PromiseBatchV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedCronJobStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedCronJobStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -12244,18 +7690,7 @@ export class PromiseBatchV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedJobWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedJobWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -12267,18 +7702,7 @@ export class PromiseBatchV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedJob(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedJob(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -12290,18 +7714,7 @@ export class PromiseBatchV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedJobStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedJobStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -12313,18 +7726,7 @@ export class PromiseBatchV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedJobStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedJobStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -12340,18 +7742,7 @@ export class PromiseBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedCronJobWithHttpInfo(name: string, namespace: string, body: V1CronJob, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedCronJobWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -12367,18 +7758,7 @@ export class PromiseBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedCronJob(name: string, namespace: string, body: V1CronJob, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -12394,18 +7774,7 @@ export class PromiseBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedCronJobStatusWithHttpInfo(name: string, namespace: string, body: V1CronJob, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedCronJobStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -12421,18 +7790,7 @@ export class PromiseBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedCronJobStatus(name: string, namespace: string, body: V1CronJob, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -12448,18 +7806,7 @@ export class PromiseBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedJobWithHttpInfo(name: string, namespace: string, body: V1Job, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedJobWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -12475,18 +7822,7 @@ export class PromiseBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedJob(name: string, namespace: string, body: V1Job, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -12502,18 +7838,7 @@ export class PromiseBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedJobStatusWithHttpInfo(name: string, namespace: string, body: V1Job, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedJobStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -12529,18 +7854,7 @@ export class PromiseBatchV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedJobStatus(name: string, namespace: string, body: V1Job, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -12568,18 +7882,7 @@ export class PromiseCertificatesApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -12588,18 +7891,7 @@ export class PromiseCertificatesApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -12632,18 +7924,7 @@ export class PromiseCertificatesV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createCertificateSigningRequestWithHttpInfo(body: V1CertificateSigningRequest, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createCertificateSigningRequestWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -12657,18 +7938,7 @@ export class PromiseCertificatesV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createCertificateSigningRequest(body: V1CertificateSigningRequest, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createCertificateSigningRequest(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -12685,18 +7955,7 @@ export class PromiseCertificatesV1Api { * @param [body] */ public deleteCertificateSigningRequestWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCertificateSigningRequestWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -12713,18 +7972,7 @@ export class PromiseCertificatesV1Api { * @param [body] */ public deleteCertificateSigningRequest(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCertificateSigningRequest(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -12748,18 +7996,7 @@ export class PromiseCertificatesV1Api { * @param [body] */ public deleteCollectionCertificateSigningRequestWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionCertificateSigningRequestWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -12783,18 +8020,7 @@ export class PromiseCertificatesV1Api { * @param [body] */ public deleteCollectionCertificateSigningRequest(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionCertificateSigningRequest(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -12803,18 +8029,7 @@ export class PromiseCertificatesV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -12823,18 +8038,7 @@ export class PromiseCertificatesV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -12854,18 +8058,7 @@ export class PromiseCertificatesV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCertificateSigningRequestWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listCertificateSigningRequestWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -12885,18 +8078,7 @@ export class PromiseCertificatesV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCertificateSigningRequest(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listCertificateSigningRequest(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -12912,18 +8094,7 @@ export class PromiseCertificatesV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCertificateSigningRequestWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchCertificateSigningRequestWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -12939,18 +8110,7 @@ export class PromiseCertificatesV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCertificateSigningRequest(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -12966,18 +8126,7 @@ export class PromiseCertificatesV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCertificateSigningRequestApprovalWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchCertificateSigningRequestApprovalWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -12993,18 +8142,7 @@ export class PromiseCertificatesV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCertificateSigningRequestApproval(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -13020,18 +8158,7 @@ export class PromiseCertificatesV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCertificateSigningRequestStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchCertificateSigningRequestStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -13047,18 +8174,7 @@ export class PromiseCertificatesV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCertificateSigningRequestStatus(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -13069,18 +8185,7 @@ export class PromiseCertificatesV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCertificateSigningRequestWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readCertificateSigningRequestWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -13091,18 +8196,7 @@ export class PromiseCertificatesV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCertificateSigningRequest(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readCertificateSigningRequest(name, pretty, observableOptions); return result.toPromise(); } @@ -13113,18 +8207,7 @@ export class PromiseCertificatesV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCertificateSigningRequestApprovalWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readCertificateSigningRequestApprovalWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -13135,18 +8218,7 @@ export class PromiseCertificatesV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCertificateSigningRequestApproval(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readCertificateSigningRequestApproval(name, pretty, observableOptions); return result.toPromise(); } @@ -13157,18 +8229,7 @@ export class PromiseCertificatesV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCertificateSigningRequestStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readCertificateSigningRequestStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -13179,18 +8240,7 @@ export class PromiseCertificatesV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCertificateSigningRequestStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readCertificateSigningRequestStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -13205,18 +8255,7 @@ export class PromiseCertificatesV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCertificateSigningRequestWithHttpInfo(name: string, body: V1CertificateSigningRequest, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceCertificateSigningRequestWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -13231,18 +8270,7 @@ export class PromiseCertificatesV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCertificateSigningRequest(name: string, body: V1CertificateSigningRequest, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -13257,18 +8285,7 @@ export class PromiseCertificatesV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCertificateSigningRequestApprovalWithHttpInfo(name: string, body: V1CertificateSigningRequest, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceCertificateSigningRequestApprovalWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -13283,18 +8300,7 @@ export class PromiseCertificatesV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCertificateSigningRequestApproval(name: string, body: V1CertificateSigningRequest, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -13309,18 +8315,7 @@ export class PromiseCertificatesV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCertificateSigningRequestStatusWithHttpInfo(name: string, body: V1CertificateSigningRequest, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceCertificateSigningRequestStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -13335,18 +8330,7 @@ export class PromiseCertificatesV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCertificateSigningRequestStatus(name: string, body: V1CertificateSigningRequest, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -13379,18 +8363,7 @@ export class PromiseCertificatesV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createClusterTrustBundleWithHttpInfo(body: V1alpha1ClusterTrustBundle, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createClusterTrustBundleWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -13404,18 +8377,7 @@ export class PromiseCertificatesV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createClusterTrustBundle(body: V1alpha1ClusterTrustBundle, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createClusterTrustBundle(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -13432,18 +8394,7 @@ export class PromiseCertificatesV1alpha1Api { * @param [body] */ public deleteClusterTrustBundleWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteClusterTrustBundleWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -13460,18 +8411,7 @@ export class PromiseCertificatesV1alpha1Api { * @param [body] */ public deleteClusterTrustBundle(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteClusterTrustBundle(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -13495,18 +8435,7 @@ export class PromiseCertificatesV1alpha1Api { * @param [body] */ public deleteCollectionClusterTrustBundleWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionClusterTrustBundleWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -13530,18 +8459,7 @@ export class PromiseCertificatesV1alpha1Api { * @param [body] */ public deleteCollectionClusterTrustBundle(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionClusterTrustBundle(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -13550,18 +8468,7 @@ export class PromiseCertificatesV1alpha1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -13570,18 +8477,7 @@ export class PromiseCertificatesV1alpha1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -13601,18 +8497,7 @@ export class PromiseCertificatesV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listClusterTrustBundleWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listClusterTrustBundleWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -13632,18 +8517,7 @@ export class PromiseCertificatesV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listClusterTrustBundle(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listClusterTrustBundle(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -13659,18 +8533,7 @@ export class PromiseCertificatesV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterTrustBundleWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchClusterTrustBundleWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -13686,18 +8549,7 @@ export class PromiseCertificatesV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterTrustBundle(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchClusterTrustBundle(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -13708,18 +8560,7 @@ export class PromiseCertificatesV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readClusterTrustBundleWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readClusterTrustBundleWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -13730,18 +8571,7 @@ export class PromiseCertificatesV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readClusterTrustBundle(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readClusterTrustBundle(name, pretty, observableOptions); return result.toPromise(); } @@ -13756,18 +8586,7 @@ export class PromiseCertificatesV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceClusterTrustBundleWithHttpInfo(name: string, body: V1alpha1ClusterTrustBundle, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceClusterTrustBundleWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -13782,18 +8601,7 @@ export class PromiseCertificatesV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceClusterTrustBundle(name: string, body: V1alpha1ClusterTrustBundle, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceClusterTrustBundle(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -13826,18 +8634,7 @@ export class PromiseCertificatesV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createClusterTrustBundleWithHttpInfo(body: V1beta1ClusterTrustBundle, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createClusterTrustBundleWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -13851,18 +8648,7 @@ export class PromiseCertificatesV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createClusterTrustBundle(body: V1beta1ClusterTrustBundle, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createClusterTrustBundle(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -13879,18 +8665,7 @@ export class PromiseCertificatesV1beta1Api { * @param [body] */ public deleteClusterTrustBundleWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteClusterTrustBundleWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -13907,18 +8682,7 @@ export class PromiseCertificatesV1beta1Api { * @param [body] */ public deleteClusterTrustBundle(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteClusterTrustBundle(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -13942,18 +8706,7 @@ export class PromiseCertificatesV1beta1Api { * @param [body] */ public deleteCollectionClusterTrustBundleWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionClusterTrustBundleWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -13977,18 +8730,7 @@ export class PromiseCertificatesV1beta1Api { * @param [body] */ public deleteCollectionClusterTrustBundle(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionClusterTrustBundle(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -13997,18 +8739,7 @@ export class PromiseCertificatesV1beta1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -14017,18 +8748,7 @@ export class PromiseCertificatesV1beta1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -14048,18 +8768,7 @@ export class PromiseCertificatesV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listClusterTrustBundleWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listClusterTrustBundleWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -14079,18 +8788,7 @@ export class PromiseCertificatesV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listClusterTrustBundle(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listClusterTrustBundle(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -14106,18 +8804,7 @@ export class PromiseCertificatesV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterTrustBundleWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchClusterTrustBundleWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -14133,18 +8820,7 @@ export class PromiseCertificatesV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterTrustBundle(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchClusterTrustBundle(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -14155,18 +8831,7 @@ export class PromiseCertificatesV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readClusterTrustBundleWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readClusterTrustBundleWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -14177,18 +8842,7 @@ export class PromiseCertificatesV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readClusterTrustBundle(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readClusterTrustBundle(name, pretty, observableOptions); return result.toPromise(); } @@ -14203,18 +8857,7 @@ export class PromiseCertificatesV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceClusterTrustBundleWithHttpInfo(name: string, body: V1beta1ClusterTrustBundle, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceClusterTrustBundleWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -14229,18 +8872,7 @@ export class PromiseCertificatesV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceClusterTrustBundle(name: string, body: V1beta1ClusterTrustBundle, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceClusterTrustBundle(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -14268,18 +8900,7 @@ export class PromiseCoordinationApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -14288,18 +8909,7 @@ export class PromiseCoordinationApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -14333,18 +8943,7 @@ export class PromiseCoordinationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedLeaseWithHttpInfo(namespace: string, body: V1Lease, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedLeaseWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -14359,18 +8958,7 @@ export class PromiseCoordinationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedLease(namespace: string, body: V1Lease, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedLease(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -14395,18 +8983,7 @@ export class PromiseCoordinationV1Api { * @param [body] */ public deleteCollectionNamespacedLeaseWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedLeaseWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -14431,18 +9008,7 @@ export class PromiseCoordinationV1Api { * @param [body] */ public deleteCollectionNamespacedLease(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedLease(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -14460,18 +9026,7 @@ export class PromiseCoordinationV1Api { * @param [body] */ public deleteNamespacedLeaseWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedLeaseWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -14489,18 +9044,7 @@ export class PromiseCoordinationV1Api { * @param [body] */ public deleteNamespacedLease(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedLease(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -14509,18 +9053,7 @@ export class PromiseCoordinationV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -14529,18 +9062,7 @@ export class PromiseCoordinationV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -14560,18 +9082,7 @@ export class PromiseCoordinationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listLeaseForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listLeaseForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -14591,18 +9102,7 @@ export class PromiseCoordinationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listLeaseForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listLeaseForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -14623,18 +9123,7 @@ export class PromiseCoordinationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedLeaseWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedLeaseWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -14655,18 +9144,7 @@ export class PromiseCoordinationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedLease(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedLease(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -14683,18 +9161,7 @@ export class PromiseCoordinationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedLeaseWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedLeaseWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -14711,18 +9178,7 @@ export class PromiseCoordinationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedLease(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -14734,18 +9190,7 @@ export class PromiseCoordinationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedLeaseWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedLeaseWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -14757,18 +9202,7 @@ export class PromiseCoordinationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedLease(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedLease(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -14784,18 +9218,7 @@ export class PromiseCoordinationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedLeaseWithHttpInfo(name: string, namespace: string, body: V1Lease, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedLeaseWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -14811,18 +9234,7 @@ export class PromiseCoordinationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedLease(name: string, namespace: string, body: V1Lease, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -14856,18 +9268,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedLeaseCandidateWithHttpInfo(namespace: string, body: V1alpha2LeaseCandidate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedLeaseCandidateWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -14882,18 +9283,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedLeaseCandidate(namespace: string, body: V1alpha2LeaseCandidate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedLeaseCandidate(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -14918,18 +9308,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [body] */ public deleteCollectionNamespacedLeaseCandidateWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedLeaseCandidateWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -14954,18 +9333,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [body] */ public deleteCollectionNamespacedLeaseCandidate(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedLeaseCandidate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -14983,18 +9351,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [body] */ public deleteNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedLeaseCandidateWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -15012,18 +9369,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [body] */ public deleteNamespacedLeaseCandidate(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedLeaseCandidate(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -15032,18 +9378,7 @@ export class PromiseCoordinationV1alpha2Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -15052,18 +9387,7 @@ export class PromiseCoordinationV1alpha2Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -15083,18 +9407,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listLeaseCandidateForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listLeaseCandidateForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -15114,18 +9427,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listLeaseCandidateForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listLeaseCandidateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -15146,18 +9448,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedLeaseCandidateWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedLeaseCandidateWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -15178,18 +9469,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedLeaseCandidate(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedLeaseCandidate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -15206,18 +9486,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedLeaseCandidateWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -15234,18 +9503,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedLeaseCandidate(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedLeaseCandidate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -15257,18 +9515,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedLeaseCandidateWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -15280,18 +9527,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedLeaseCandidate(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedLeaseCandidate(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -15307,18 +9543,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, body: V1alpha2LeaseCandidate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedLeaseCandidateWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -15334,18 +9559,7 @@ export class PromiseCoordinationV1alpha2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedLeaseCandidate(name: string, namespace: string, body: V1alpha2LeaseCandidate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedLeaseCandidate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -15379,18 +9593,7 @@ export class PromiseCoordinationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedLeaseCandidateWithHttpInfo(namespace: string, body: V1beta1LeaseCandidate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedLeaseCandidateWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -15405,18 +9608,7 @@ export class PromiseCoordinationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedLeaseCandidate(namespace: string, body: V1beta1LeaseCandidate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedLeaseCandidate(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -15441,18 +9633,7 @@ export class PromiseCoordinationV1beta1Api { * @param [body] */ public deleteCollectionNamespacedLeaseCandidateWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedLeaseCandidateWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -15477,18 +9658,7 @@ export class PromiseCoordinationV1beta1Api { * @param [body] */ public deleteCollectionNamespacedLeaseCandidate(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedLeaseCandidate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -15506,18 +9676,7 @@ export class PromiseCoordinationV1beta1Api { * @param [body] */ public deleteNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedLeaseCandidateWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -15535,18 +9694,7 @@ export class PromiseCoordinationV1beta1Api { * @param [body] */ public deleteNamespacedLeaseCandidate(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedLeaseCandidate(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -15555,18 +9703,7 @@ export class PromiseCoordinationV1beta1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -15575,18 +9712,7 @@ export class PromiseCoordinationV1beta1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -15606,18 +9732,7 @@ export class PromiseCoordinationV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listLeaseCandidateForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listLeaseCandidateForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -15637,18 +9752,7 @@ export class PromiseCoordinationV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listLeaseCandidateForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listLeaseCandidateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -15669,18 +9773,7 @@ export class PromiseCoordinationV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedLeaseCandidateWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedLeaseCandidateWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -15701,18 +9794,7 @@ export class PromiseCoordinationV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedLeaseCandidate(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedLeaseCandidate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -15729,18 +9811,7 @@ export class PromiseCoordinationV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedLeaseCandidateWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -15757,18 +9828,7 @@ export class PromiseCoordinationV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedLeaseCandidate(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedLeaseCandidate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -15780,18 +9840,7 @@ export class PromiseCoordinationV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedLeaseCandidateWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -15803,18 +9852,7 @@ export class PromiseCoordinationV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedLeaseCandidate(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedLeaseCandidate(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -15830,18 +9868,7 @@ export class PromiseCoordinationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedLeaseCandidateWithHttpInfo(name: string, namespace: string, body: V1beta1LeaseCandidate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedLeaseCandidateWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -15857,18 +9884,7 @@ export class PromiseCoordinationV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedLeaseCandidate(name: string, namespace: string, body: V1beta1LeaseCandidate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedLeaseCandidate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -15896,18 +9912,7 @@ export class PromiseCoreApi { * get available API versions */ public getAPIVersionsWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIVersionsWithHttpInfo(observableOptions); return result.toPromise(); } @@ -15916,18 +9921,7 @@ export class PromiseCoreApi { * get available API versions */ public getAPIVersions(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIVersions(observableOptions); return result.toPromise(); } @@ -15958,18 +9952,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectDeleteNamespacedPodProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectDeleteNamespacedPodProxyWithHttpInfo(name, namespace, path, observableOptions); return result.toPromise(); } @@ -15981,18 +9964,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectDeleteNamespacedPodProxy(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectDeleteNamespacedPodProxy(name, namespace, path, observableOptions); return result.toPromise(); } @@ -16005,18 +9977,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectDeleteNamespacedPodProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectDeleteNamespacedPodProxyWithPathWithHttpInfo(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -16029,18 +9990,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectDeleteNamespacedPodProxyWithPath(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectDeleteNamespacedPodProxyWithPath(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -16052,18 +10002,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectDeleteNamespacedServiceProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectDeleteNamespacedServiceProxyWithHttpInfo(name, namespace, path, observableOptions); return result.toPromise(); } @@ -16075,18 +10014,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectDeleteNamespacedServiceProxy(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectDeleteNamespacedServiceProxy(name, namespace, path, observableOptions); return result.toPromise(); } @@ -16099,18 +10027,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectDeleteNamespacedServiceProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectDeleteNamespacedServiceProxyWithPathWithHttpInfo(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -16123,18 +10040,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectDeleteNamespacedServiceProxyWithPath(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectDeleteNamespacedServiceProxyWithPath(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -16145,18 +10051,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectDeleteNodeProxyWithHttpInfo(name: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectDeleteNodeProxyWithHttpInfo(name, path, observableOptions); return result.toPromise(); } @@ -16167,18 +10062,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectDeleteNodeProxy(name: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectDeleteNodeProxy(name, path, observableOptions); return result.toPromise(); } @@ -16190,18 +10074,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectDeleteNodeProxyWithPathWithHttpInfo(name: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectDeleteNodeProxyWithPathWithHttpInfo(name, path, path2, observableOptions); return result.toPromise(); } @@ -16213,18 +10086,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectDeleteNodeProxyWithPath(name: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectDeleteNodeProxyWithPath(name, path, path2, observableOptions); return result.toPromise(); } @@ -16240,18 +10102,7 @@ export class PromiseCoreV1Api { * @param [tty] TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. */ public connectGetNamespacedPodAttachWithHttpInfo(name: string, namespace: string, container?: string, stderr?: boolean, stdin?: boolean, stdout?: boolean, tty?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNamespacedPodAttachWithHttpInfo(name, namespace, container, stderr, stdin, stdout, tty, observableOptions); return result.toPromise(); } @@ -16267,18 +10118,7 @@ export class PromiseCoreV1Api { * @param [tty] TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. */ public connectGetNamespacedPodAttach(name: string, namespace: string, container?: string, stderr?: boolean, stdin?: boolean, stdout?: boolean, tty?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, observableOptions); return result.toPromise(); } @@ -16295,18 +10135,7 @@ export class PromiseCoreV1Api { * @param [tty] TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. */ public connectGetNamespacedPodExecWithHttpInfo(name: string, namespace: string, command?: string, container?: string, stderr?: boolean, stdin?: boolean, stdout?: boolean, tty?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNamespacedPodExecWithHttpInfo(name, namespace, command, container, stderr, stdin, stdout, tty, observableOptions); return result.toPromise(); } @@ -16323,18 +10152,7 @@ export class PromiseCoreV1Api { * @param [tty] TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. */ public connectGetNamespacedPodExec(name: string, namespace: string, command?: string, container?: string, stderr?: boolean, stdin?: boolean, stdout?: boolean, tty?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, observableOptions); return result.toPromise(); } @@ -16346,18 +10164,7 @@ export class PromiseCoreV1Api { * @param [ports] List of ports to forward Required when using WebSockets */ public connectGetNamespacedPodPortforwardWithHttpInfo(name: string, namespace: string, ports?: number, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNamespacedPodPortforwardWithHttpInfo(name, namespace, ports, observableOptions); return result.toPromise(); } @@ -16369,18 +10176,7 @@ export class PromiseCoreV1Api { * @param [ports] List of ports to forward Required when using WebSockets */ public connectGetNamespacedPodPortforward(name: string, namespace: string, ports?: number, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNamespacedPodPortforward(name, namespace, ports, observableOptions); return result.toPromise(); } @@ -16392,18 +10188,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectGetNamespacedPodProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNamespacedPodProxyWithHttpInfo(name, namespace, path, observableOptions); return result.toPromise(); } @@ -16415,18 +10200,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectGetNamespacedPodProxy(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNamespacedPodProxy(name, namespace, path, observableOptions); return result.toPromise(); } @@ -16439,18 +10213,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectGetNamespacedPodProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNamespacedPodProxyWithPathWithHttpInfo(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -16463,18 +10226,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectGetNamespacedPodProxyWithPath(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNamespacedPodProxyWithPath(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -16486,18 +10238,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectGetNamespacedServiceProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNamespacedServiceProxyWithHttpInfo(name, namespace, path, observableOptions); return result.toPromise(); } @@ -16509,18 +10250,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectGetNamespacedServiceProxy(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNamespacedServiceProxy(name, namespace, path, observableOptions); return result.toPromise(); } @@ -16533,18 +10263,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectGetNamespacedServiceProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNamespacedServiceProxyWithPathWithHttpInfo(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -16557,18 +10276,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectGetNamespacedServiceProxyWithPath(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNamespacedServiceProxyWithPath(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -16579,18 +10287,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectGetNodeProxyWithHttpInfo(name: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNodeProxyWithHttpInfo(name, path, observableOptions); return result.toPromise(); } @@ -16601,18 +10298,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectGetNodeProxy(name: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNodeProxy(name, path, observableOptions); return result.toPromise(); } @@ -16624,18 +10310,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectGetNodeProxyWithPathWithHttpInfo(name: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNodeProxyWithPathWithHttpInfo(name, path, path2, observableOptions); return result.toPromise(); } @@ -16647,18 +10322,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectGetNodeProxyWithPath(name: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectGetNodeProxyWithPath(name, path, path2, observableOptions); return result.toPromise(); } @@ -16670,18 +10334,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectHeadNamespacedPodProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectHeadNamespacedPodProxyWithHttpInfo(name, namespace, path, observableOptions); return result.toPromise(); } @@ -16693,18 +10346,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectHeadNamespacedPodProxy(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectHeadNamespacedPodProxy(name, namespace, path, observableOptions); return result.toPromise(); } @@ -16717,18 +10359,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectHeadNamespacedPodProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectHeadNamespacedPodProxyWithPathWithHttpInfo(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -16741,18 +10372,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectHeadNamespacedPodProxyWithPath(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectHeadNamespacedPodProxyWithPath(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -16764,18 +10384,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectHeadNamespacedServiceProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectHeadNamespacedServiceProxyWithHttpInfo(name, namespace, path, observableOptions); return result.toPromise(); } @@ -16787,18 +10396,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectHeadNamespacedServiceProxy(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectHeadNamespacedServiceProxy(name, namespace, path, observableOptions); return result.toPromise(); } @@ -16811,18 +10409,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectHeadNamespacedServiceProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectHeadNamespacedServiceProxyWithPathWithHttpInfo(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -16835,18 +10422,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectHeadNamespacedServiceProxyWithPath(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectHeadNamespacedServiceProxyWithPath(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -16857,18 +10433,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectHeadNodeProxyWithHttpInfo(name: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectHeadNodeProxyWithHttpInfo(name, path, observableOptions); return result.toPromise(); } @@ -16879,18 +10444,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectHeadNodeProxy(name: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectHeadNodeProxy(name, path, observableOptions); return result.toPromise(); } @@ -16902,18 +10456,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectHeadNodeProxyWithPathWithHttpInfo(name: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectHeadNodeProxyWithPathWithHttpInfo(name, path, path2, observableOptions); return result.toPromise(); } @@ -16925,18 +10468,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectHeadNodeProxyWithPath(name: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectHeadNodeProxyWithPath(name, path, path2, observableOptions); return result.toPromise(); } @@ -16948,18 +10480,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectOptionsNamespacedPodProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectOptionsNamespacedPodProxyWithHttpInfo(name, namespace, path, observableOptions); return result.toPromise(); } @@ -16971,18 +10492,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectOptionsNamespacedPodProxy(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectOptionsNamespacedPodProxy(name, namespace, path, observableOptions); return result.toPromise(); } @@ -16995,18 +10505,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectOptionsNamespacedPodProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectOptionsNamespacedPodProxyWithPathWithHttpInfo(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -17019,18 +10518,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectOptionsNamespacedPodProxyWithPath(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectOptionsNamespacedPodProxyWithPath(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -17042,18 +10530,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectOptionsNamespacedServiceProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectOptionsNamespacedServiceProxyWithHttpInfo(name, namespace, path, observableOptions); return result.toPromise(); } @@ -17065,18 +10542,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectOptionsNamespacedServiceProxy(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectOptionsNamespacedServiceProxy(name, namespace, path, observableOptions); return result.toPromise(); } @@ -17089,18 +10555,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectOptionsNamespacedServiceProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectOptionsNamespacedServiceProxyWithPathWithHttpInfo(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -17113,18 +10568,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectOptionsNamespacedServiceProxyWithPath(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectOptionsNamespacedServiceProxyWithPath(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -17135,18 +10579,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectOptionsNodeProxyWithHttpInfo(name: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectOptionsNodeProxyWithHttpInfo(name, path, observableOptions); return result.toPromise(); } @@ -17157,18 +10590,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectOptionsNodeProxy(name: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectOptionsNodeProxy(name, path, observableOptions); return result.toPromise(); } @@ -17180,18 +10602,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectOptionsNodeProxyWithPathWithHttpInfo(name: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectOptionsNodeProxyWithPathWithHttpInfo(name, path, path2, observableOptions); return result.toPromise(); } @@ -17203,18 +10614,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectOptionsNodeProxyWithPath(name: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectOptionsNodeProxyWithPath(name, path, path2, observableOptions); return result.toPromise(); } @@ -17226,18 +10626,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectPatchNamespacedPodProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPatchNamespacedPodProxyWithHttpInfo(name, namespace, path, observableOptions); return result.toPromise(); } @@ -17249,18 +10638,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectPatchNamespacedPodProxy(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPatchNamespacedPodProxy(name, namespace, path, observableOptions); return result.toPromise(); } @@ -17273,18 +10651,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectPatchNamespacedPodProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPatchNamespacedPodProxyWithPathWithHttpInfo(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -17297,18 +10664,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectPatchNamespacedPodProxyWithPath(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPatchNamespacedPodProxyWithPath(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -17320,18 +10676,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPatchNamespacedServiceProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPatchNamespacedServiceProxyWithHttpInfo(name, namespace, path, observableOptions); return result.toPromise(); } @@ -17343,18 +10688,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPatchNamespacedServiceProxy(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPatchNamespacedServiceProxy(name, namespace, path, observableOptions); return result.toPromise(); } @@ -17367,18 +10701,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPatchNamespacedServiceProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPatchNamespacedServiceProxyWithPathWithHttpInfo(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -17391,18 +10714,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPatchNamespacedServiceProxyWithPath(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPatchNamespacedServiceProxyWithPath(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -17413,18 +10725,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectPatchNodeProxyWithHttpInfo(name: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPatchNodeProxyWithHttpInfo(name, path, observableOptions); return result.toPromise(); } @@ -17435,18 +10736,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectPatchNodeProxy(name: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPatchNodeProxy(name, path, observableOptions); return result.toPromise(); } @@ -17458,18 +10748,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectPatchNodeProxyWithPathWithHttpInfo(name: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPatchNodeProxyWithPathWithHttpInfo(name, path, path2, observableOptions); return result.toPromise(); } @@ -17481,18 +10760,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectPatchNodeProxyWithPath(name: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPatchNodeProxyWithPath(name, path, path2, observableOptions); return result.toPromise(); } @@ -17508,18 +10776,7 @@ export class PromiseCoreV1Api { * @param [tty] TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. */ public connectPostNamespacedPodAttachWithHttpInfo(name: string, namespace: string, container?: string, stderr?: boolean, stdin?: boolean, stdout?: boolean, tty?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNamespacedPodAttachWithHttpInfo(name, namespace, container, stderr, stdin, stdout, tty, observableOptions); return result.toPromise(); } @@ -17535,18 +10792,7 @@ export class PromiseCoreV1Api { * @param [tty] TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. */ public connectPostNamespacedPodAttach(name: string, namespace: string, container?: string, stderr?: boolean, stdin?: boolean, stdout?: boolean, tty?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, observableOptions); return result.toPromise(); } @@ -17563,18 +10809,7 @@ export class PromiseCoreV1Api { * @param [tty] TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. */ public connectPostNamespacedPodExecWithHttpInfo(name: string, namespace: string, command?: string, container?: string, stderr?: boolean, stdin?: boolean, stdout?: boolean, tty?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNamespacedPodExecWithHttpInfo(name, namespace, command, container, stderr, stdin, stdout, tty, observableOptions); return result.toPromise(); } @@ -17591,18 +10826,7 @@ export class PromiseCoreV1Api { * @param [tty] TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. */ public connectPostNamespacedPodExec(name: string, namespace: string, command?: string, container?: string, stderr?: boolean, stdin?: boolean, stdout?: boolean, tty?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, observableOptions); return result.toPromise(); } @@ -17614,18 +10838,7 @@ export class PromiseCoreV1Api { * @param [ports] List of ports to forward Required when using WebSockets */ public connectPostNamespacedPodPortforwardWithHttpInfo(name: string, namespace: string, ports?: number, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNamespacedPodPortforwardWithHttpInfo(name, namespace, ports, observableOptions); return result.toPromise(); } @@ -17637,18 +10850,7 @@ export class PromiseCoreV1Api { * @param [ports] List of ports to forward Required when using WebSockets */ public connectPostNamespacedPodPortforward(name: string, namespace: string, ports?: number, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNamespacedPodPortforward(name, namespace, ports, observableOptions); return result.toPromise(); } @@ -17660,18 +10862,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectPostNamespacedPodProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNamespacedPodProxyWithHttpInfo(name, namespace, path, observableOptions); return result.toPromise(); } @@ -17683,18 +10874,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectPostNamespacedPodProxy(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNamespacedPodProxy(name, namespace, path, observableOptions); return result.toPromise(); } @@ -17707,18 +10887,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectPostNamespacedPodProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNamespacedPodProxyWithPathWithHttpInfo(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -17731,18 +10900,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectPostNamespacedPodProxyWithPath(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNamespacedPodProxyWithPath(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -17754,18 +10912,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPostNamespacedServiceProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNamespacedServiceProxyWithHttpInfo(name, namespace, path, observableOptions); return result.toPromise(); } @@ -17777,18 +10924,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPostNamespacedServiceProxy(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNamespacedServiceProxy(name, namespace, path, observableOptions); return result.toPromise(); } @@ -17801,18 +10937,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPostNamespacedServiceProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNamespacedServiceProxyWithPathWithHttpInfo(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -17825,18 +10950,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPostNamespacedServiceProxyWithPath(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNamespacedServiceProxyWithPath(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -17847,18 +10961,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectPostNodeProxyWithHttpInfo(name: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNodeProxyWithHttpInfo(name, path, observableOptions); return result.toPromise(); } @@ -17869,18 +10972,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectPostNodeProxy(name: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNodeProxy(name, path, observableOptions); return result.toPromise(); } @@ -17892,18 +10984,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectPostNodeProxyWithPathWithHttpInfo(name: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNodeProxyWithPathWithHttpInfo(name, path, path2, observableOptions); return result.toPromise(); } @@ -17915,18 +10996,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectPostNodeProxyWithPath(name: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPostNodeProxyWithPath(name, path, path2, observableOptions); return result.toPromise(); } @@ -17938,18 +11008,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectPutNamespacedPodProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPutNamespacedPodProxyWithHttpInfo(name, namespace, path, observableOptions); return result.toPromise(); } @@ -17961,18 +11020,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to pod. */ public connectPutNamespacedPodProxy(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPutNamespacedPodProxy(name, namespace, path, observableOptions); return result.toPromise(); } @@ -17985,18 +11033,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectPutNamespacedPodProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPutNamespacedPodProxyWithPathWithHttpInfo(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -18009,18 +11046,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to pod. */ public connectPutNamespacedPodProxyWithPath(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPutNamespacedPodProxyWithPath(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -18032,18 +11058,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPutNamespacedServiceProxyWithHttpInfo(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPutNamespacedServiceProxyWithHttpInfo(name, namespace, path, observableOptions); return result.toPromise(); } @@ -18055,18 +11070,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPutNamespacedServiceProxy(name: string, namespace: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPutNamespacedServiceProxy(name, namespace, path, observableOptions); return result.toPromise(); } @@ -18079,18 +11083,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPutNamespacedServiceProxyWithPathWithHttpInfo(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPutNamespacedServiceProxyWithPathWithHttpInfo(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -18103,18 +11096,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ public connectPutNamespacedServiceProxyWithPath(name: string, namespace: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPutNamespacedServiceProxyWithPath(name, namespace, path, path2, observableOptions); return result.toPromise(); } @@ -18125,18 +11107,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectPutNodeProxyWithHttpInfo(name: string, path?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPutNodeProxyWithHttpInfo(name, path, observableOptions); return result.toPromise(); } @@ -18147,18 +11118,7 @@ export class PromiseCoreV1Api { * @param [path] Path is the URL path to use for the current proxy request to node. */ public connectPutNodeProxy(name: string, path?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPutNodeProxy(name, path, observableOptions); return result.toPromise(); } @@ -18170,18 +11130,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectPutNodeProxyWithPathWithHttpInfo(name: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPutNodeProxyWithPathWithHttpInfo(name, path, path2, observableOptions); return result.toPromise(); } @@ -18193,18 +11142,7 @@ export class PromiseCoreV1Api { * @param [path2] Path is the URL path to use for the current proxy request to node. */ public connectPutNodeProxyWithPath(name: string, path: string, path2?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.connectPutNodeProxyWithPath(name, path, path2, observableOptions); return result.toPromise(); } @@ -18218,18 +11156,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespaceWithHttpInfo(body: V1Namespace, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespaceWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18243,18 +11170,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespace(body: V1Namespace, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespace(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18269,18 +11185,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createNamespacedBindingWithHttpInfo(namespace: string, body: V1Binding, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedBindingWithHttpInfo(namespace, body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -18295,18 +11200,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createNamespacedBinding(namespace: string, body: V1Binding, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedBinding(namespace, body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -18321,18 +11215,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedConfigMapWithHttpInfo(namespace: string, body: V1ConfigMap, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedConfigMapWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18347,18 +11230,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedConfigMap(namespace: string, body: V1ConfigMap, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedConfigMap(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18373,18 +11245,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedEndpointsWithHttpInfo(namespace: string, body: V1Endpoints, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedEndpointsWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18399,18 +11260,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedEndpoints(namespace: string, body: V1Endpoints, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedEndpoints(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18425,18 +11275,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedEventWithHttpInfo(namespace: string, body: CoreV1Event, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedEventWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18451,18 +11290,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedEvent(namespace: string, body: CoreV1Event, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18477,18 +11305,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedLimitRangeWithHttpInfo(namespace: string, body: V1LimitRange, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedLimitRangeWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18503,18 +11320,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedLimitRange(namespace: string, body: V1LimitRange, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedLimitRange(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18529,18 +11335,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedPersistentVolumeClaimWithHttpInfo(namespace: string, body: V1PersistentVolumeClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedPersistentVolumeClaimWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18555,18 +11350,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedPersistentVolumeClaim(namespace: string, body: V1PersistentVolumeClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedPersistentVolumeClaim(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18581,18 +11365,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedPodWithHttpInfo(namespace: string, body: V1Pod, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedPodWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18607,18 +11380,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedPod(namespace: string, body: V1Pod, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedPod(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18634,18 +11396,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createNamespacedPodBindingWithHttpInfo(name: string, namespace: string, body: V1Binding, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedPodBindingWithHttpInfo(name, namespace, body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -18661,18 +11412,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createNamespacedPodBinding(name: string, namespace: string, body: V1Binding, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedPodBinding(name, namespace, body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -18688,18 +11428,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createNamespacedPodEvictionWithHttpInfo(name: string, namespace: string, body: V1Eviction, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedPodEvictionWithHttpInfo(name, namespace, body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -18715,18 +11444,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createNamespacedPodEviction(name: string, namespace: string, body: V1Eviction, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedPodEviction(name, namespace, body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -18741,18 +11459,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedPodTemplateWithHttpInfo(namespace: string, body: V1PodTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedPodTemplateWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18767,18 +11474,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedPodTemplate(namespace: string, body: V1PodTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedPodTemplate(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18793,18 +11489,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedReplicationControllerWithHttpInfo(namespace: string, body: V1ReplicationController, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedReplicationControllerWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18819,18 +11504,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedReplicationController(namespace: string, body: V1ReplicationController, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedReplicationController(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18845,18 +11519,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceQuotaWithHttpInfo(namespace: string, body: V1ResourceQuota, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedResourceQuotaWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18871,18 +11534,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceQuota(namespace: string, body: V1ResourceQuota, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedResourceQuota(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18897,18 +11549,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedSecretWithHttpInfo(namespace: string, body: V1Secret, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedSecretWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18923,18 +11564,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedSecret(namespace: string, body: V1Secret, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedSecret(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18949,18 +11579,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedServiceWithHttpInfo(namespace: string, body: V1Service, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedServiceWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -18975,18 +11594,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedService(namespace: string, body: V1Service, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedService(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -19001,18 +11609,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedServiceAccountWithHttpInfo(namespace: string, body: V1ServiceAccount, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedServiceAccountWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -19027,18 +11624,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedServiceAccount(namespace: string, body: V1ServiceAccount, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedServiceAccount(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -19054,18 +11640,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createNamespacedServiceAccountTokenWithHttpInfo(name: string, namespace: string, body: AuthenticationV1TokenRequest, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedServiceAccountTokenWithHttpInfo(name, namespace, body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -19081,18 +11656,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public createNamespacedServiceAccountToken(name: string, namespace: string, body: AuthenticationV1TokenRequest, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedServiceAccountToken(name, namespace, body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -19106,18 +11670,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNodeWithHttpInfo(body: V1Node, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNodeWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -19131,18 +11684,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNode(body: V1Node, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNode(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -19156,18 +11698,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createPersistentVolumeWithHttpInfo(body: V1PersistentVolume, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createPersistentVolumeWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -19181,18 +11712,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createPersistentVolume(body: V1PersistentVolume, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createPersistentVolume(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -19217,18 +11737,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedConfigMapWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedConfigMapWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19253,18 +11762,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedConfigMap(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedConfigMap(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19289,18 +11787,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedEndpointsWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedEndpointsWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19325,18 +11812,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedEndpoints(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedEndpoints(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19361,18 +11837,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedEventWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedEventWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19397,18 +11862,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedEvent(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19433,18 +11887,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedLimitRangeWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedLimitRangeWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19469,18 +11912,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedLimitRange(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedLimitRange(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19505,18 +11937,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedPersistentVolumeClaimWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedPersistentVolumeClaimWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19541,18 +11962,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedPersistentVolumeClaim(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedPersistentVolumeClaim(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19577,18 +11987,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedPodWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedPodWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19613,18 +12012,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedPod(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedPod(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19649,18 +12037,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedPodTemplateWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedPodTemplateWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19685,18 +12062,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedPodTemplate(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedPodTemplate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19721,18 +12087,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedReplicationControllerWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedReplicationControllerWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19757,18 +12112,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedReplicationController(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedReplicationController(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19793,18 +12137,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedResourceQuotaWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedResourceQuotaWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19829,18 +12162,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedResourceQuota(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedResourceQuota(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19865,18 +12187,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedSecretWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedSecretWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19901,18 +12212,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedSecret(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedSecret(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19937,18 +12237,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedServiceWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedServiceWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -19973,18 +12262,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedService(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedService(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -20009,18 +12287,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedServiceAccountWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedServiceAccountWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -20045,18 +12312,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNamespacedServiceAccount(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedServiceAccount(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -20080,18 +12336,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNodeWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNodeWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -20115,18 +12360,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionNode(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -20150,18 +12384,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionPersistentVolumeWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionPersistentVolumeWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -20185,18 +12408,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteCollectionPersistentVolume(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionPersistentVolume(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -20213,18 +12425,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespaceWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespaceWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20241,18 +12442,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespace(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespace(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20270,18 +12460,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedConfigMapWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedConfigMapWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20299,18 +12478,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedConfigMap(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedConfigMap(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20328,18 +12496,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedEndpointsWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedEndpointsWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20357,18 +12514,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedEndpoints(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedEndpoints(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20386,18 +12532,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedEventWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedEventWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20415,18 +12550,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedEvent(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20444,18 +12568,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedLimitRangeWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedLimitRangeWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20473,18 +12586,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedLimitRange(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedLimitRange(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20502,18 +12604,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedPersistentVolumeClaimWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedPersistentVolumeClaimWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20531,18 +12622,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedPersistentVolumeClaim(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedPersistentVolumeClaim(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20560,18 +12640,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedPodWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedPodWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20589,18 +12658,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedPod(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedPod(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20618,18 +12676,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedPodTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedPodTemplateWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20647,18 +12694,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedPodTemplate(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedPodTemplate(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20676,18 +12712,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedReplicationControllerWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedReplicationControllerWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20705,18 +12730,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedReplicationController(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedReplicationController(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20734,18 +12748,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedResourceQuotaWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedResourceQuotaWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20763,18 +12766,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedResourceQuota(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedResourceQuota(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20792,18 +12784,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedSecretWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedSecretWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20821,18 +12802,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedSecret(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedSecret(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20850,18 +12820,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedServiceWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedServiceWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20879,18 +12838,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedService(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedService(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20908,18 +12856,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedServiceAccountWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedServiceAccountWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20937,18 +12874,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNamespacedServiceAccount(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedServiceAccount(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20965,18 +12891,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNodeWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNodeWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -20993,18 +12908,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deleteNode(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNode(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -21021,18 +12925,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deletePersistentVolumeWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deletePersistentVolumeWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -21049,18 +12942,7 @@ export class PromiseCoreV1Api { * @param [body] */ public deletePersistentVolume(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deletePersistentVolume(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -21069,18 +12951,7 @@ export class PromiseCoreV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -21089,18 +12960,7 @@ export class PromiseCoreV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -21120,18 +12980,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listComponentStatusWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listComponentStatusWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21151,18 +13000,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listComponentStatus(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listComponentStatus(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21182,18 +13020,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listConfigMapForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listConfigMapForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21213,18 +13040,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listConfigMapForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listConfigMapForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21244,18 +13060,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listEndpointsForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listEndpointsForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21275,18 +13080,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listEndpointsForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listEndpointsForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21306,18 +13100,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listEventForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listEventForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21337,18 +13120,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listEventForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21368,18 +13140,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listLimitRangeForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listLimitRangeForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21399,18 +13160,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listLimitRangeForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listLimitRangeForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21430,18 +13180,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespaceWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespaceWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21461,18 +13200,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespace(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespace(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21493,18 +13221,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedConfigMapWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedConfigMapWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21525,18 +13242,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedConfigMap(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedConfigMap(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21557,18 +13263,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedEndpointsWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedEndpointsWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21589,18 +13284,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedEndpoints(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedEndpoints(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21621,18 +13305,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedEventWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedEventWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21653,18 +13326,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedEvent(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21685,18 +13347,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedLimitRangeWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedLimitRangeWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21717,18 +13368,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedLimitRange(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedLimitRange(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21749,18 +13389,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedPersistentVolumeClaimWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedPersistentVolumeClaimWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21781,18 +13410,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedPersistentVolumeClaim(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedPersistentVolumeClaim(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21813,18 +13431,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedPodWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedPodWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21845,18 +13452,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedPod(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedPod(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21877,18 +13473,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedPodTemplateWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedPodTemplateWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21909,18 +13494,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedPodTemplate(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedPodTemplate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21941,18 +13515,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedReplicationControllerWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedReplicationControllerWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -21973,18 +13536,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedReplicationController(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedReplicationController(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22005,18 +13557,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceQuotaWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedResourceQuotaWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22037,18 +13578,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceQuota(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedResourceQuota(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22069,18 +13599,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedSecretWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedSecretWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22101,18 +13620,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedSecret(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedSecret(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22133,18 +13641,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedServiceWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedServiceWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22165,18 +13662,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedService(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedService(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22197,18 +13683,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedServiceAccountWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedServiceAccountWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22229,18 +13704,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedServiceAccount(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedServiceAccount(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22260,18 +13724,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNodeWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNodeWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22291,18 +13744,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNode(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22322,18 +13764,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPersistentVolumeWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listPersistentVolumeWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22353,18 +13784,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPersistentVolume(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listPersistentVolume(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22384,18 +13804,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPersistentVolumeClaimForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listPersistentVolumeClaimForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22415,18 +13824,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPersistentVolumeClaimForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listPersistentVolumeClaimForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22446,18 +13844,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPodForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listPodForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22477,18 +13864,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPodForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listPodForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22508,18 +13884,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPodTemplateForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listPodTemplateForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22539,18 +13904,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPodTemplateForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listPodTemplateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22570,18 +13924,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listReplicationControllerForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listReplicationControllerForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22601,18 +13944,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listReplicationControllerForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listReplicationControllerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22632,18 +13964,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceQuotaForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceQuotaForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22663,18 +13984,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceQuotaForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceQuotaForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22694,18 +14004,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listSecretForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listSecretForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22725,18 +14024,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listSecretForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listSecretForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22756,18 +14044,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listServiceAccountForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listServiceAccountForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22787,18 +14064,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listServiceAccountForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listServiceAccountForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22818,18 +14084,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listServiceForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listServiceForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22849,18 +14104,7 @@ export class PromiseCoreV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listServiceForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listServiceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -22876,18 +14120,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespaceWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespaceWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -22903,18 +14136,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespace(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespace(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -22930,18 +14152,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespaceStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespaceStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -22957,18 +14168,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespaceStatus(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespaceStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -22985,18 +14185,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedConfigMapWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedConfigMapWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23013,18 +14202,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedConfigMap(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23041,18 +14219,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedEndpointsWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedEndpointsWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23069,18 +14236,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedEndpoints(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23097,18 +14253,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedEventWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedEventWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23125,18 +14270,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedEvent(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23153,18 +14287,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedLimitRangeWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedLimitRangeWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23181,18 +14304,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedLimitRange(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23209,18 +14321,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPersistentVolumeClaimWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPersistentVolumeClaimWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23237,18 +14338,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPersistentVolumeClaim(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23265,18 +14355,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPersistentVolumeClaimStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPersistentVolumeClaimStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23293,18 +14372,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPersistentVolumeClaimStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23321,18 +14389,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPodWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23349,18 +14406,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPod(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23377,18 +14423,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodEphemeralcontainersWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPodEphemeralcontainersWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23405,18 +14440,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodEphemeralcontainers(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPodEphemeralcontainers(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23433,18 +14457,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodResizeWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPodResizeWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23461,18 +14474,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodResize(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPodResize(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23489,18 +14491,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPodStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23517,18 +14508,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23545,18 +14525,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodTemplateWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPodTemplateWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23573,18 +14542,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodTemplate(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23601,18 +14559,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicationControllerWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedReplicationControllerWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23629,18 +14576,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicationController(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23657,18 +14593,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicationControllerScaleWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedReplicationControllerScaleWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23685,18 +14610,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicationControllerScale(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23713,18 +14627,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicationControllerStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedReplicationControllerStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23741,18 +14644,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedReplicationControllerStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23769,18 +14661,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceQuotaWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceQuotaWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23797,18 +14678,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceQuota(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23825,18 +14695,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceQuotaStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceQuotaStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23853,18 +14712,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceQuotaStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23881,18 +14729,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedSecretWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedSecretWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23909,18 +14746,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedSecret(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23937,18 +14763,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedServiceWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedServiceWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23965,18 +14780,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedService(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -23993,18 +14797,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedServiceAccountWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedServiceAccountWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -24021,18 +14814,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedServiceAccount(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -24049,18 +14831,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedServiceStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedServiceStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -24077,18 +14848,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedServiceStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -24104,18 +14864,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNodeWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNodeWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -24131,18 +14880,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNode(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNode(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -24158,18 +14896,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNodeStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNodeStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -24185,18 +14912,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNodeStatus(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNodeStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -24212,18 +14928,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchPersistentVolumeWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchPersistentVolumeWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -24239,18 +14944,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchPersistentVolume(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchPersistentVolume(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -24266,18 +14960,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchPersistentVolumeStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchPersistentVolumeStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -24293,18 +14976,7 @@ export class PromiseCoreV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchPersistentVolumeStatus(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchPersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -24315,18 +14987,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readComponentStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readComponentStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -24337,18 +14998,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readComponentStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readComponentStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -24359,18 +15009,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespaceWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespaceWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -24381,18 +15020,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespace(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespace(name, pretty, observableOptions); return result.toPromise(); } @@ -24403,18 +15031,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespaceStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespaceStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -24425,18 +15042,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespaceStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespaceStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -24448,18 +15054,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedConfigMapWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedConfigMapWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24471,18 +15066,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedConfigMap(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedConfigMap(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24494,18 +15078,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedEndpointsWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedEndpointsWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24517,18 +15090,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedEndpoints(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedEndpoints(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24540,18 +15102,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedEventWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedEventWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24563,18 +15114,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedEvent(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedEvent(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24586,18 +15126,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedLimitRangeWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedLimitRangeWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24609,18 +15138,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedLimitRange(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedLimitRange(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24632,18 +15150,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPersistentVolumeClaimWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPersistentVolumeClaimWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24655,18 +15162,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPersistentVolumeClaim(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPersistentVolumeClaim(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24678,18 +15174,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPersistentVolumeClaimStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPersistentVolumeClaimStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24701,18 +15186,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPersistentVolumeClaimStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPersistentVolumeClaimStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24724,18 +15198,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPodWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24747,18 +15210,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPod(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPod(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24770,18 +15222,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodEphemeralcontainersWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPodEphemeralcontainersWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24793,18 +15234,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodEphemeralcontainers(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPodEphemeralcontainers(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24825,18 +15255,7 @@ export class PromiseCoreV1Api { * @param [timestamps] If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false. */ public readNamespacedPodLogWithHttpInfo(name: string, namespace: string, container?: string, follow?: boolean, insecureSkipTLSVerifyBackend?: boolean, limitBytes?: number, pretty?: string, previous?: boolean, sinceSeconds?: number, stream?: string, tailLines?: number, timestamps?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPodLogWithHttpInfo(name, namespace, container, follow, insecureSkipTLSVerifyBackend, limitBytes, pretty, previous, sinceSeconds, stream, tailLines, timestamps, observableOptions); return result.toPromise(); } @@ -24857,18 +15276,7 @@ export class PromiseCoreV1Api { * @param [timestamps] If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false. */ public readNamespacedPodLog(name: string, namespace: string, container?: string, follow?: boolean, insecureSkipTLSVerifyBackend?: boolean, limitBytes?: number, pretty?: string, previous?: boolean, sinceSeconds?: number, stream?: string, tailLines?: number, timestamps?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPodLog(name, namespace, container, follow, insecureSkipTLSVerifyBackend, limitBytes, pretty, previous, sinceSeconds, stream, tailLines, timestamps, observableOptions); return result.toPromise(); } @@ -24880,18 +15288,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodResizeWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPodResizeWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24903,18 +15300,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodResize(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPodResize(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24926,18 +15312,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPodStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24949,18 +15324,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPodStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24972,18 +15336,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPodTemplateWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -24995,18 +15348,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodTemplate(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPodTemplate(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25018,18 +15360,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicationControllerWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedReplicationControllerWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25041,18 +15372,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicationController(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedReplicationController(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25064,18 +15384,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicationControllerScaleWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedReplicationControllerScaleWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25087,18 +15396,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicationControllerScale(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedReplicationControllerScale(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25110,18 +15408,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicationControllerStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedReplicationControllerStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25133,18 +15420,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedReplicationControllerStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedReplicationControllerStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25156,18 +15432,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceQuotaWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceQuotaWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25179,18 +15444,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceQuota(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceQuota(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25202,18 +15456,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceQuotaStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceQuotaStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25225,18 +15468,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceQuotaStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceQuotaStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25248,18 +15480,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedSecretWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedSecretWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25271,18 +15492,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedSecret(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedSecret(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25294,18 +15504,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedServiceWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedServiceWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25317,18 +15516,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedService(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedService(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25340,18 +15528,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedServiceAccountWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedServiceAccountWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25363,18 +15540,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedServiceAccount(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedServiceAccount(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25386,18 +15552,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedServiceStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedServiceStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25409,18 +15564,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedServiceStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedServiceStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -25431,18 +15575,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNodeWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNodeWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -25453,18 +15586,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNode(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNode(name, pretty, observableOptions); return result.toPromise(); } @@ -25475,18 +15597,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNodeStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNodeStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -25497,18 +15608,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNodeStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNodeStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -25519,18 +15619,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readPersistentVolumeWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readPersistentVolumeWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -25541,18 +15630,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readPersistentVolume(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readPersistentVolume(name, pretty, observableOptions); return result.toPromise(); } @@ -25563,18 +15641,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readPersistentVolumeStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readPersistentVolumeStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -25585,18 +15652,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readPersistentVolumeStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readPersistentVolumeStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -25611,18 +15667,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespaceWithHttpInfo(name: string, body: V1Namespace, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespaceWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -25637,18 +15682,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespace(name: string, body: V1Namespace, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespace(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -25663,18 +15697,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public replaceNamespaceFinalizeWithHttpInfo(name: string, body: V1Namespace, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespaceFinalizeWithHttpInfo(name, body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -25689,18 +15712,7 @@ export class PromiseCoreV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public replaceNamespaceFinalize(name: string, body: V1Namespace, dryRun?: string, fieldManager?: string, fieldValidation?: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespaceFinalize(name, body, dryRun, fieldManager, fieldValidation, pretty, observableOptions); return result.toPromise(); } @@ -25715,18 +15727,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespaceStatusWithHttpInfo(name: string, body: V1Namespace, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespaceStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -25741,18 +15742,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespaceStatus(name: string, body: V1Namespace, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespaceStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -25768,18 +15758,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedConfigMapWithHttpInfo(name: string, namespace: string, body: V1ConfigMap, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedConfigMapWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -25795,18 +15774,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedConfigMap(name: string, namespace: string, body: V1ConfigMap, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -25822,18 +15790,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedEndpointsWithHttpInfo(name: string, namespace: string, body: V1Endpoints, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedEndpointsWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -25849,18 +15806,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedEndpoints(name: string, namespace: string, body: V1Endpoints, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -25876,18 +15822,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedEventWithHttpInfo(name: string, namespace: string, body: CoreV1Event, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedEventWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -25903,18 +15838,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedEvent(name: string, namespace: string, body: CoreV1Event, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -25930,18 +15854,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedLimitRangeWithHttpInfo(name: string, namespace: string, body: V1LimitRange, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedLimitRangeWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -25957,18 +15870,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedLimitRange(name: string, namespace: string, body: V1LimitRange, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -25984,18 +15886,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPersistentVolumeClaimWithHttpInfo(name: string, namespace: string, body: V1PersistentVolumeClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPersistentVolumeClaimWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26011,18 +15902,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPersistentVolumeClaim(name: string, namespace: string, body: V1PersistentVolumeClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26038,18 +15918,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPersistentVolumeClaimStatusWithHttpInfo(name: string, namespace: string, body: V1PersistentVolumeClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPersistentVolumeClaimStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26065,18 +15934,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPersistentVolumeClaimStatus(name: string, namespace: string, body: V1PersistentVolumeClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26092,18 +15950,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodWithHttpInfo(name: string, namespace: string, body: V1Pod, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPodWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26119,18 +15966,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPod(name: string, namespace: string, body: V1Pod, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26146,18 +15982,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodEphemeralcontainersWithHttpInfo(name: string, namespace: string, body: V1Pod, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPodEphemeralcontainersWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26173,18 +15998,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodEphemeralcontainers(name: string, namespace: string, body: V1Pod, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPodEphemeralcontainers(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26200,18 +16014,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodResizeWithHttpInfo(name: string, namespace: string, body: V1Pod, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPodResizeWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26227,18 +16030,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodResize(name: string, namespace: string, body: V1Pod, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPodResize(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26254,18 +16046,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodStatusWithHttpInfo(name: string, namespace: string, body: V1Pod, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPodStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26281,18 +16062,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodStatus(name: string, namespace: string, body: V1Pod, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26308,18 +16078,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodTemplateWithHttpInfo(name: string, namespace: string, body: V1PodTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPodTemplateWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26335,18 +16094,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodTemplate(name: string, namespace: string, body: V1PodTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26362,18 +16110,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicationControllerWithHttpInfo(name: string, namespace: string, body: V1ReplicationController, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedReplicationControllerWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26389,18 +16126,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicationController(name: string, namespace: string, body: V1ReplicationController, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26416,18 +16142,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicationControllerScaleWithHttpInfo(name: string, namespace: string, body: V1Scale, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedReplicationControllerScaleWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26443,18 +16158,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicationControllerScale(name: string, namespace: string, body: V1Scale, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26470,18 +16174,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicationControllerStatusWithHttpInfo(name: string, namespace: string, body: V1ReplicationController, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedReplicationControllerStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26497,18 +16190,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedReplicationControllerStatus(name: string, namespace: string, body: V1ReplicationController, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26524,18 +16206,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceQuotaWithHttpInfo(name: string, namespace: string, body: V1ResourceQuota, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceQuotaWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26551,18 +16222,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceQuota(name: string, namespace: string, body: V1ResourceQuota, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26578,18 +16238,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceQuotaStatusWithHttpInfo(name: string, namespace: string, body: V1ResourceQuota, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceQuotaStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26605,18 +16254,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceQuotaStatus(name: string, namespace: string, body: V1ResourceQuota, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26632,18 +16270,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedSecretWithHttpInfo(name: string, namespace: string, body: V1Secret, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedSecretWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26659,18 +16286,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedSecret(name: string, namespace: string, body: V1Secret, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26686,18 +16302,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedServiceWithHttpInfo(name: string, namespace: string, body: V1Service, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedServiceWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26713,18 +16318,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedService(name: string, namespace: string, body: V1Service, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26740,18 +16334,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedServiceAccountWithHttpInfo(name: string, namespace: string, body: V1ServiceAccount, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedServiceAccountWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26767,18 +16350,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedServiceAccount(name: string, namespace: string, body: V1ServiceAccount, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26794,18 +16366,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedServiceStatusWithHttpInfo(name: string, namespace: string, body: V1Service, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedServiceStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26821,18 +16382,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedServiceStatus(name: string, namespace: string, body: V1Service, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26847,18 +16397,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNodeWithHttpInfo(name: string, body: V1Node, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNodeWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26873,18 +16412,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNode(name: string, body: V1Node, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNode(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26899,18 +16427,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNodeStatusWithHttpInfo(name: string, body: V1Node, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNodeStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26925,18 +16442,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNodeStatus(name: string, body: V1Node, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNodeStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26951,18 +16457,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replacePersistentVolumeWithHttpInfo(name: string, body: V1PersistentVolume, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replacePersistentVolumeWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -26977,18 +16472,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replacePersistentVolume(name: string, body: V1PersistentVolume, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replacePersistentVolume(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -27003,18 +16487,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replacePersistentVolumeStatusWithHttpInfo(name: string, body: V1PersistentVolume, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replacePersistentVolumeStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -27029,18 +16502,7 @@ export class PromiseCoreV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replacePersistentVolumeStatus(name: string, body: V1PersistentVolume, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replacePersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -27076,18 +16538,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public createClusterCustomObjectWithHttpInfo(group: string, version: string, plural: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createClusterCustomObjectWithHttpInfo(group, version, plural, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -27104,18 +16555,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public createClusterCustomObject(group: string, version: string, plural: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createClusterCustomObject(group, version, plural, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -27133,18 +16573,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public createNamespacedCustomObjectWithHttpInfo(group: string, version: string, namespace: string, plural: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedCustomObjectWithHttpInfo(group, version, namespace, plural, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -27162,18 +16591,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public createNamespacedCustomObject(group: string, version: string, namespace: string, plural: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedCustomObject(group, version, namespace, plural, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -27191,18 +16609,7 @@ export class PromiseCustomObjectsApi { * @param [body] */ public deleteClusterCustomObjectWithHttpInfo(group: string, version: string, plural: string, name: string, gracePeriodSeconds?: number, orphanDependents?: boolean, propagationPolicy?: string, dryRun?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteClusterCustomObjectWithHttpInfo(group, version, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, observableOptions); return result.toPromise(); } @@ -27220,18 +16627,7 @@ export class PromiseCustomObjectsApi { * @param [body] */ public deleteClusterCustomObject(group: string, version: string, plural: string, name: string, gracePeriodSeconds?: number, orphanDependents?: boolean, propagationPolicy?: string, dryRun?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteClusterCustomObject(group, version, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, observableOptions); return result.toPromise(); } @@ -27250,18 +16646,7 @@ export class PromiseCustomObjectsApi { * @param [body] */ public deleteCollectionClusterCustomObjectWithHttpInfo(group: string, version: string, plural: string, pretty?: string, labelSelector?: string, gracePeriodSeconds?: number, orphanDependents?: boolean, propagationPolicy?: string, dryRun?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionClusterCustomObjectWithHttpInfo(group, version, plural, pretty, labelSelector, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, observableOptions); return result.toPromise(); } @@ -27280,18 +16665,7 @@ export class PromiseCustomObjectsApi { * @param [body] */ public deleteCollectionClusterCustomObject(group: string, version: string, plural: string, pretty?: string, labelSelector?: string, gracePeriodSeconds?: number, orphanDependents?: boolean, propagationPolicy?: string, dryRun?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionClusterCustomObject(group, version, plural, pretty, labelSelector, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, observableOptions); return result.toPromise(); } @@ -27312,18 +16686,7 @@ export class PromiseCustomObjectsApi { * @param [body] */ public deleteCollectionNamespacedCustomObjectWithHttpInfo(group: string, version: string, namespace: string, plural: string, pretty?: string, labelSelector?: string, gracePeriodSeconds?: number, orphanDependents?: boolean, propagationPolicy?: string, dryRun?: string, fieldSelector?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedCustomObjectWithHttpInfo(group, version, namespace, plural, pretty, labelSelector, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, fieldSelector, body, observableOptions); return result.toPromise(); } @@ -27344,18 +16707,7 @@ export class PromiseCustomObjectsApi { * @param [body] */ public deleteCollectionNamespacedCustomObject(group: string, version: string, namespace: string, plural: string, pretty?: string, labelSelector?: string, gracePeriodSeconds?: number, orphanDependents?: boolean, propagationPolicy?: string, dryRun?: string, fieldSelector?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedCustomObject(group, version, namespace, plural, pretty, labelSelector, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, fieldSelector, body, observableOptions); return result.toPromise(); } @@ -27374,18 +16726,7 @@ export class PromiseCustomObjectsApi { * @param [body] */ public deleteNamespacedCustomObjectWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, gracePeriodSeconds?: number, orphanDependents?: boolean, propagationPolicy?: string, dryRun?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedCustomObjectWithHttpInfo(group, version, namespace, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, observableOptions); return result.toPromise(); } @@ -27404,18 +16745,7 @@ export class PromiseCustomObjectsApi { * @param [body] */ public deleteNamespacedCustomObject(group: string, version: string, namespace: string, plural: string, name: string, gracePeriodSeconds?: number, orphanDependents?: boolean, propagationPolicy?: string, dryRun?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedCustomObject(group, version, namespace, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, observableOptions); return result.toPromise(); } @@ -27426,18 +16756,7 @@ export class PromiseCustomObjectsApi { * @param version The custom resource\'s version */ public getAPIResourcesWithHttpInfo(group: string, version: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(group, version, observableOptions); return result.toPromise(); } @@ -27448,18 +16767,7 @@ export class PromiseCustomObjectsApi { * @param version The custom resource\'s version */ public getAPIResources(group: string, version: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(group, version, observableOptions); return result.toPromise(); } @@ -27472,18 +16780,7 @@ export class PromiseCustomObjectsApi { * @param name the custom object\'s name */ public getClusterCustomObjectWithHttpInfo(group: string, version: string, plural: string, name: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getClusterCustomObjectWithHttpInfo(group, version, plural, name, observableOptions); return result.toPromise(); } @@ -27496,18 +16793,7 @@ export class PromiseCustomObjectsApi { * @param name the custom object\'s name */ public getClusterCustomObject(group: string, version: string, plural: string, name: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getClusterCustomObject(group, version, plural, name, observableOptions); return result.toPromise(); } @@ -27520,18 +16806,7 @@ export class PromiseCustomObjectsApi { * @param name the custom object\'s name */ public getClusterCustomObjectScaleWithHttpInfo(group: string, version: string, plural: string, name: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getClusterCustomObjectScaleWithHttpInfo(group, version, plural, name, observableOptions); return result.toPromise(); } @@ -27544,18 +16819,7 @@ export class PromiseCustomObjectsApi { * @param name the custom object\'s name */ public getClusterCustomObjectScale(group: string, version: string, plural: string, name: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getClusterCustomObjectScale(group, version, plural, name, observableOptions); return result.toPromise(); } @@ -27568,18 +16832,7 @@ export class PromiseCustomObjectsApi { * @param name the custom object\'s name */ public getClusterCustomObjectStatusWithHttpInfo(group: string, version: string, plural: string, name: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getClusterCustomObjectStatusWithHttpInfo(group, version, plural, name, observableOptions); return result.toPromise(); } @@ -27592,18 +16845,7 @@ export class PromiseCustomObjectsApi { * @param name the custom object\'s name */ public getClusterCustomObjectStatus(group: string, version: string, plural: string, name: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getClusterCustomObjectStatus(group, version, plural, name, observableOptions); return result.toPromise(); } @@ -27617,18 +16859,7 @@ export class PromiseCustomObjectsApi { * @param name the custom object\'s name */ public getNamespacedCustomObjectWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getNamespacedCustomObjectWithHttpInfo(group, version, namespace, plural, name, observableOptions); return result.toPromise(); } @@ -27642,18 +16873,7 @@ export class PromiseCustomObjectsApi { * @param name the custom object\'s name */ public getNamespacedCustomObject(group: string, version: string, namespace: string, plural: string, name: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getNamespacedCustomObject(group, version, namespace, plural, name, observableOptions); return result.toPromise(); } @@ -27667,18 +16887,7 @@ export class PromiseCustomObjectsApi { * @param name the custom object\'s name */ public getNamespacedCustomObjectScaleWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getNamespacedCustomObjectScaleWithHttpInfo(group, version, namespace, plural, name, observableOptions); return result.toPromise(); } @@ -27692,18 +16901,7 @@ export class PromiseCustomObjectsApi { * @param name the custom object\'s name */ public getNamespacedCustomObjectScale(group: string, version: string, namespace: string, plural: string, name: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getNamespacedCustomObjectScale(group, version, namespace, plural, name, observableOptions); return result.toPromise(); } @@ -27717,18 +16915,7 @@ export class PromiseCustomObjectsApi { * @param name the custom object\'s name */ public getNamespacedCustomObjectStatusWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getNamespacedCustomObjectStatusWithHttpInfo(group, version, namespace, plural, name, observableOptions); return result.toPromise(); } @@ -27742,18 +16929,7 @@ export class PromiseCustomObjectsApi { * @param name the custom object\'s name */ public getNamespacedCustomObjectStatus(group: string, version: string, namespace: string, plural: string, name: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getNamespacedCustomObjectStatus(group, version, namespace, plural, name, observableOptions); return result.toPromise(); } @@ -27775,18 +16951,7 @@ export class PromiseCustomObjectsApi { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. */ public listClusterCustomObjectWithHttpInfo(group: string, version: string, plural: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listClusterCustomObjectWithHttpInfo(group, version, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -27808,18 +16973,7 @@ export class PromiseCustomObjectsApi { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. */ public listClusterCustomObject(group: string, version: string, plural: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listClusterCustomObject(group, version, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -27841,18 +16995,7 @@ export class PromiseCustomObjectsApi { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. */ public listCustomObjectForAllNamespacesWithHttpInfo(group: string, version: string, plural: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listCustomObjectForAllNamespacesWithHttpInfo(group, version, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -27874,18 +17017,7 @@ export class PromiseCustomObjectsApi { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. */ public listCustomObjectForAllNamespaces(group: string, version: string, plural: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listCustomObjectForAllNamespaces(group, version, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -27908,18 +17040,7 @@ export class PromiseCustomObjectsApi { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. */ public listNamespacedCustomObjectWithHttpInfo(group: string, version: string, namespace: string, plural: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedCustomObjectWithHttpInfo(group, version, namespace, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -27942,18 +17063,7 @@ export class PromiseCustomObjectsApi { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. */ public listNamespacedCustomObject(group: string, version: string, namespace: string, plural: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedCustomObject(group, version, namespace, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -27971,18 +17081,7 @@ export class PromiseCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterCustomObjectWithHttpInfo(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchClusterCustomObjectWithHttpInfo(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -28000,18 +17099,7 @@ export class PromiseCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterCustomObject(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -28029,18 +17117,7 @@ export class PromiseCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterCustomObjectScaleWithHttpInfo(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchClusterCustomObjectScaleWithHttpInfo(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -28058,18 +17135,7 @@ export class PromiseCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterCustomObjectScale(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -28087,18 +17153,7 @@ export class PromiseCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterCustomObjectStatusWithHttpInfo(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchClusterCustomObjectStatusWithHttpInfo(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -28116,18 +17171,7 @@ export class PromiseCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterCustomObjectStatus(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -28146,18 +17190,7 @@ export class PromiseCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCustomObjectWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedCustomObjectWithHttpInfo(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -28176,18 +17209,7 @@ export class PromiseCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCustomObject(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -28206,18 +17228,7 @@ export class PromiseCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCustomObjectScaleWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedCustomObjectScaleWithHttpInfo(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -28236,18 +17247,7 @@ export class PromiseCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCustomObjectScale(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -28266,18 +17266,7 @@ export class PromiseCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCustomObjectStatusWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedCustomObjectStatusWithHttpInfo(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -28296,18 +17285,7 @@ export class PromiseCustomObjectsApi { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCustomObjectStatus(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -28324,18 +17302,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceClusterCustomObjectWithHttpInfo(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceClusterCustomObjectWithHttpInfo(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -28352,18 +17319,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceClusterCustomObject(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -28380,18 +17336,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceClusterCustomObjectScaleWithHttpInfo(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceClusterCustomObjectScaleWithHttpInfo(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -28408,18 +17353,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceClusterCustomObjectScale(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -28436,18 +17370,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceClusterCustomObjectStatusWithHttpInfo(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceClusterCustomObjectStatusWithHttpInfo(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -28464,18 +17387,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceClusterCustomObjectStatus(group: string, version: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -28493,18 +17405,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceNamespacedCustomObjectWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedCustomObjectWithHttpInfo(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -28522,18 +17423,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceNamespacedCustomObject(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -28551,18 +17441,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceNamespacedCustomObjectScaleWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedCustomObjectScaleWithHttpInfo(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -28580,18 +17459,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceNamespacedCustomObjectScale(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -28609,18 +17477,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceNamespacedCustomObjectStatusWithHttpInfo(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedCustomObjectStatusWithHttpInfo(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -28638,18 +17495,7 @@ export class PromiseCustomObjectsApi { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) */ public replaceNamespacedCustomObjectStatus(group: string, version: string, namespace: string, plural: string, name: string, body: any, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -28677,18 +17523,7 @@ export class PromiseDiscoveryApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -28697,18 +17532,7 @@ export class PromiseDiscoveryApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -28742,18 +17566,7 @@ export class PromiseDiscoveryV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedEndpointSliceWithHttpInfo(namespace: string, body: V1EndpointSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedEndpointSliceWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -28768,18 +17581,7 @@ export class PromiseDiscoveryV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedEndpointSlice(namespace: string, body: V1EndpointSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedEndpointSlice(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -28804,18 +17606,7 @@ export class PromiseDiscoveryV1Api { * @param [body] */ public deleteCollectionNamespacedEndpointSliceWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedEndpointSliceWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -28840,18 +17631,7 @@ export class PromiseDiscoveryV1Api { * @param [body] */ public deleteCollectionNamespacedEndpointSlice(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedEndpointSlice(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -28869,18 +17649,7 @@ export class PromiseDiscoveryV1Api { * @param [body] */ public deleteNamespacedEndpointSliceWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedEndpointSliceWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -28898,18 +17667,7 @@ export class PromiseDiscoveryV1Api { * @param [body] */ public deleteNamespacedEndpointSlice(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedEndpointSlice(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -28918,18 +17676,7 @@ export class PromiseDiscoveryV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -28938,18 +17685,7 @@ export class PromiseDiscoveryV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -28969,18 +17705,7 @@ export class PromiseDiscoveryV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listEndpointSliceForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listEndpointSliceForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -29000,18 +17725,7 @@ export class PromiseDiscoveryV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listEndpointSliceForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listEndpointSliceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -29032,18 +17746,7 @@ export class PromiseDiscoveryV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedEndpointSliceWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedEndpointSliceWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -29064,18 +17767,7 @@ export class PromiseDiscoveryV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedEndpointSlice(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedEndpointSlice(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -29092,18 +17784,7 @@ export class PromiseDiscoveryV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedEndpointSliceWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedEndpointSliceWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -29120,18 +17801,7 @@ export class PromiseDiscoveryV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedEndpointSlice(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -29143,18 +17813,7 @@ export class PromiseDiscoveryV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedEndpointSliceWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedEndpointSliceWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -29166,18 +17825,7 @@ export class PromiseDiscoveryV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedEndpointSlice(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedEndpointSlice(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -29193,18 +17841,7 @@ export class PromiseDiscoveryV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedEndpointSliceWithHttpInfo(name: string, namespace: string, body: V1EndpointSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedEndpointSliceWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -29220,18 +17857,7 @@ export class PromiseDiscoveryV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedEndpointSlice(name: string, namespace: string, body: V1EndpointSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -29259,18 +17885,7 @@ export class PromiseEventsApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -29279,18 +17894,7 @@ export class PromiseEventsApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -29324,18 +17928,7 @@ export class PromiseEventsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedEventWithHttpInfo(namespace: string, body: EventsV1Event, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedEventWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -29350,18 +17943,7 @@ export class PromiseEventsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedEvent(namespace: string, body: EventsV1Event, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -29386,18 +17968,7 @@ export class PromiseEventsV1Api { * @param [body] */ public deleteCollectionNamespacedEventWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedEventWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -29422,18 +17993,7 @@ export class PromiseEventsV1Api { * @param [body] */ public deleteCollectionNamespacedEvent(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -29451,18 +18011,7 @@ export class PromiseEventsV1Api { * @param [body] */ public deleteNamespacedEventWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedEventWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -29480,18 +18029,7 @@ export class PromiseEventsV1Api { * @param [body] */ public deleteNamespacedEvent(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -29500,18 +18038,7 @@ export class PromiseEventsV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -29520,18 +18047,7 @@ export class PromiseEventsV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -29551,18 +18067,7 @@ export class PromiseEventsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listEventForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listEventForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -29582,18 +18087,7 @@ export class PromiseEventsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listEventForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -29614,18 +18108,7 @@ export class PromiseEventsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedEventWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedEventWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -29646,18 +18129,7 @@ export class PromiseEventsV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedEvent(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -29674,18 +18146,7 @@ export class PromiseEventsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedEventWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedEventWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -29702,18 +18163,7 @@ export class PromiseEventsV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedEvent(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -29725,18 +18175,7 @@ export class PromiseEventsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedEventWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedEventWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -29748,18 +18187,7 @@ export class PromiseEventsV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedEvent(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedEvent(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -29775,18 +18203,7 @@ export class PromiseEventsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedEventWithHttpInfo(name: string, namespace: string, body: EventsV1Event, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedEventWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -29802,18 +18219,7 @@ export class PromiseEventsV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedEvent(name: string, namespace: string, body: EventsV1Event, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -29841,18 +18247,7 @@ export class PromiseFlowcontrolApiserverApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -29861,18 +18256,7 @@ export class PromiseFlowcontrolApiserverApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -29905,18 +18289,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createFlowSchemaWithHttpInfo(body: V1FlowSchema, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createFlowSchemaWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -29930,18 +18303,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createFlowSchema(body: V1FlowSchema, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createFlowSchema(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -29955,18 +18317,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createPriorityLevelConfigurationWithHttpInfo(body: V1PriorityLevelConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createPriorityLevelConfigurationWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -29980,18 +18331,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createPriorityLevelConfiguration(body: V1PriorityLevelConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createPriorityLevelConfiguration(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -30015,18 +18355,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [body] */ public deleteCollectionFlowSchemaWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionFlowSchemaWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -30050,18 +18379,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [body] */ public deleteCollectionFlowSchema(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionFlowSchema(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -30085,18 +18403,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [body] */ public deleteCollectionPriorityLevelConfigurationWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionPriorityLevelConfigurationWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -30120,18 +18427,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [body] */ public deleteCollectionPriorityLevelConfiguration(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionPriorityLevelConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -30148,18 +18444,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [body] */ public deleteFlowSchemaWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteFlowSchemaWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -30176,18 +18461,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [body] */ public deleteFlowSchema(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteFlowSchema(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -30204,18 +18478,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [body] */ public deletePriorityLevelConfigurationWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deletePriorityLevelConfigurationWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -30232,18 +18495,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [body] */ public deletePriorityLevelConfiguration(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deletePriorityLevelConfiguration(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -30252,18 +18504,7 @@ export class PromiseFlowcontrolApiserverV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -30272,18 +18513,7 @@ export class PromiseFlowcontrolApiserverV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -30303,18 +18533,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listFlowSchemaWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listFlowSchemaWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -30334,18 +18553,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listFlowSchema(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listFlowSchema(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -30365,18 +18573,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPriorityLevelConfigurationWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listPriorityLevelConfigurationWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -30396,18 +18593,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPriorityLevelConfiguration(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listPriorityLevelConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -30423,18 +18609,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchFlowSchemaWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchFlowSchemaWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -30450,18 +18625,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchFlowSchema(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchFlowSchema(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -30477,18 +18641,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchFlowSchemaStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchFlowSchemaStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -30504,18 +18657,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchFlowSchemaStatus(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -30531,18 +18673,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchPriorityLevelConfigurationWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchPriorityLevelConfigurationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -30558,18 +18689,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchPriorityLevelConfiguration(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchPriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -30585,18 +18705,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchPriorityLevelConfigurationStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchPriorityLevelConfigurationStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -30612,18 +18721,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchPriorityLevelConfigurationStatus(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchPriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -30634,18 +18732,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readFlowSchemaWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readFlowSchemaWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -30656,18 +18743,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readFlowSchema(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readFlowSchema(name, pretty, observableOptions); return result.toPromise(); } @@ -30678,18 +18754,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readFlowSchemaStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readFlowSchemaStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -30700,18 +18765,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readFlowSchemaStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readFlowSchemaStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -30722,18 +18776,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readPriorityLevelConfigurationWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readPriorityLevelConfigurationWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -30744,18 +18787,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readPriorityLevelConfiguration(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readPriorityLevelConfiguration(name, pretty, observableOptions); return result.toPromise(); } @@ -30766,18 +18798,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readPriorityLevelConfigurationStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readPriorityLevelConfigurationStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -30788,18 +18809,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readPriorityLevelConfigurationStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readPriorityLevelConfigurationStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -30814,18 +18824,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceFlowSchemaWithHttpInfo(name: string, body: V1FlowSchema, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceFlowSchemaWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -30840,18 +18839,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceFlowSchema(name: string, body: V1FlowSchema, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceFlowSchema(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -30866,18 +18854,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceFlowSchemaStatusWithHttpInfo(name: string, body: V1FlowSchema, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceFlowSchemaStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -30892,18 +18869,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceFlowSchemaStatus(name: string, body: V1FlowSchema, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -30918,18 +18884,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replacePriorityLevelConfigurationWithHttpInfo(name: string, body: V1PriorityLevelConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replacePriorityLevelConfigurationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -30944,18 +18899,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replacePriorityLevelConfiguration(name: string, body: V1PriorityLevelConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replacePriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -30970,18 +18914,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replacePriorityLevelConfigurationStatusWithHttpInfo(name: string, body: V1PriorityLevelConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replacePriorityLevelConfigurationStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -30996,18 +18929,7 @@ export class PromiseFlowcontrolApiserverV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replacePriorityLevelConfigurationStatus(name: string, body: V1PriorityLevelConfiguration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replacePriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -31035,18 +18957,7 @@ export class PromiseInternalApiserverApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -31055,18 +18966,7 @@ export class PromiseInternalApiserverApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -31099,18 +18999,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createStorageVersionWithHttpInfo(body: V1alpha1StorageVersion, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createStorageVersionWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -31124,18 +19013,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createStorageVersion(body: V1alpha1StorageVersion, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createStorageVersion(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -31159,18 +19037,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [body] */ public deleteCollectionStorageVersionWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionStorageVersionWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -31194,18 +19061,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [body] */ public deleteCollectionStorageVersion(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionStorageVersion(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -31222,18 +19078,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [body] */ public deleteStorageVersionWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteStorageVersionWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -31250,18 +19095,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [body] */ public deleteStorageVersion(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteStorageVersion(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -31270,18 +19104,7 @@ export class PromiseInternalApiserverV1alpha1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -31290,18 +19113,7 @@ export class PromiseInternalApiserverV1alpha1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -31321,18 +19133,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listStorageVersionWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listStorageVersionWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -31352,18 +19153,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listStorageVersion(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listStorageVersion(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -31379,18 +19169,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchStorageVersionWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchStorageVersionWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -31406,18 +19185,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchStorageVersion(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchStorageVersion(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -31433,18 +19201,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchStorageVersionStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchStorageVersionStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -31460,18 +19217,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchStorageVersionStatus(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchStorageVersionStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -31482,18 +19228,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readStorageVersionWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readStorageVersionWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -31504,18 +19239,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readStorageVersion(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readStorageVersion(name, pretty, observableOptions); return result.toPromise(); } @@ -31526,18 +19250,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readStorageVersionStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readStorageVersionStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -31548,18 +19261,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readStorageVersionStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readStorageVersionStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -31574,18 +19276,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceStorageVersionWithHttpInfo(name: string, body: V1alpha1StorageVersion, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceStorageVersionWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -31600,18 +19291,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceStorageVersion(name: string, body: V1alpha1StorageVersion, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceStorageVersion(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -31626,18 +19306,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceStorageVersionStatusWithHttpInfo(name: string, body: V1alpha1StorageVersion, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceStorageVersionStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -31652,18 +19321,7 @@ export class PromiseInternalApiserverV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceStorageVersionStatus(name: string, body: V1alpha1StorageVersion, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceStorageVersionStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -31691,18 +19349,7 @@ export class PromiseLogsApi { * @param logpath path to the log */ public logFileHandlerWithHttpInfo(logpath: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.logFileHandlerWithHttpInfo(logpath, observableOptions); return result.toPromise(); } @@ -31711,18 +19358,7 @@ export class PromiseLogsApi { * @param logpath path to the log */ public logFileHandler(logpath: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.logFileHandler(logpath, observableOptions); return result.toPromise(); } @@ -31730,18 +19366,7 @@ export class PromiseLogsApi { /** */ public logFileListHandlerWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.logFileListHandlerWithHttpInfo(observableOptions); return result.toPromise(); } @@ -31749,18 +19374,7 @@ export class PromiseLogsApi { /** */ public logFileListHandler(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.logFileListHandler(observableOptions); return result.toPromise(); } @@ -31788,18 +19402,7 @@ export class PromiseNetworkingApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -31808,18 +19411,7 @@ export class PromiseNetworkingApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -31852,18 +19444,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createIPAddressWithHttpInfo(body: V1IPAddress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createIPAddressWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -31877,18 +19458,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createIPAddress(body: V1IPAddress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createIPAddress(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -31902,18 +19472,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createIngressClassWithHttpInfo(body: V1IngressClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createIngressClassWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -31927,18 +19486,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createIngressClass(body: V1IngressClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createIngressClass(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -31953,18 +19501,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedIngressWithHttpInfo(namespace: string, body: V1Ingress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedIngressWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -31979,18 +19516,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedIngress(namespace: string, body: V1Ingress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedIngress(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -32005,18 +19531,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedNetworkPolicyWithHttpInfo(namespace: string, body: V1NetworkPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedNetworkPolicyWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -32031,18 +19546,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedNetworkPolicy(namespace: string, body: V1NetworkPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedNetworkPolicy(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -32056,18 +19560,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createServiceCIDRWithHttpInfo(body: V1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createServiceCIDRWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -32081,18 +19574,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createServiceCIDR(body: V1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createServiceCIDR(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -32116,18 +19598,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteCollectionIPAddressWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionIPAddressWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -32151,18 +19622,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteCollectionIPAddress(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionIPAddress(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -32186,18 +19646,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteCollectionIngressClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionIngressClassWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -32221,18 +19670,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteCollectionIngressClass(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionIngressClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -32257,18 +19695,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteCollectionNamespacedIngressWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedIngressWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -32293,18 +19720,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteCollectionNamespacedIngress(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedIngress(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -32329,18 +19745,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteCollectionNamespacedNetworkPolicyWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedNetworkPolicyWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -32365,18 +19770,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteCollectionNamespacedNetworkPolicy(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedNetworkPolicy(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -32400,18 +19794,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteCollectionServiceCIDRWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionServiceCIDRWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -32435,18 +19818,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteCollectionServiceCIDR(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionServiceCIDR(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -32463,18 +19835,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteIPAddressWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteIPAddressWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -32491,18 +19852,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteIPAddress(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteIPAddress(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -32519,18 +19869,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteIngressClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteIngressClassWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -32547,18 +19886,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteIngressClass(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteIngressClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -32576,18 +19904,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteNamespacedIngressWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedIngressWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -32605,18 +19922,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteNamespacedIngress(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedIngress(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -32634,18 +19940,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteNamespacedNetworkPolicyWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedNetworkPolicyWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -32663,18 +19958,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteNamespacedNetworkPolicy(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedNetworkPolicy(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -32691,18 +19975,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteServiceCIDRWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteServiceCIDRWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -32719,18 +19992,7 @@ export class PromiseNetworkingV1Api { * @param [body] */ public deleteServiceCIDR(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteServiceCIDR(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -32739,18 +20001,7 @@ export class PromiseNetworkingV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -32759,18 +20010,7 @@ export class PromiseNetworkingV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -32790,18 +20030,7 @@ export class PromiseNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listIPAddressWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listIPAddressWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -32821,18 +20050,7 @@ export class PromiseNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listIPAddress(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listIPAddress(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -32852,18 +20070,7 @@ export class PromiseNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listIngressClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listIngressClassWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -32883,18 +20090,7 @@ export class PromiseNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listIngressClass(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listIngressClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -32914,18 +20110,7 @@ export class PromiseNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listIngressForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listIngressForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -32945,18 +20130,7 @@ export class PromiseNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listIngressForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listIngressForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -32977,18 +20151,7 @@ export class PromiseNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedIngressWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedIngressWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -33009,18 +20172,7 @@ export class PromiseNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedIngress(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedIngress(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -33041,18 +20193,7 @@ export class PromiseNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedNetworkPolicyWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedNetworkPolicyWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -33073,18 +20214,7 @@ export class PromiseNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedNetworkPolicy(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedNetworkPolicy(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -33104,18 +20234,7 @@ export class PromiseNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNetworkPolicyForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNetworkPolicyForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -33135,18 +20254,7 @@ export class PromiseNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNetworkPolicyForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNetworkPolicyForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -33166,18 +20274,7 @@ export class PromiseNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listServiceCIDRWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listServiceCIDRWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -33197,18 +20294,7 @@ export class PromiseNetworkingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listServiceCIDR(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listServiceCIDR(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -33224,18 +20310,7 @@ export class PromiseNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchIPAddressWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchIPAddressWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -33251,18 +20326,7 @@ export class PromiseNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchIPAddress(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchIPAddress(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -33278,18 +20342,7 @@ export class PromiseNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchIngressClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchIngressClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -33305,18 +20358,7 @@ export class PromiseNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchIngressClass(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchIngressClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -33333,18 +20375,7 @@ export class PromiseNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedIngressWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedIngressWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -33361,18 +20392,7 @@ export class PromiseNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedIngress(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -33389,18 +20409,7 @@ export class PromiseNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedIngressStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedIngressStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -33417,18 +20426,7 @@ export class PromiseNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedIngressStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -33445,18 +20443,7 @@ export class PromiseNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedNetworkPolicyWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedNetworkPolicyWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -33473,18 +20460,7 @@ export class PromiseNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedNetworkPolicy(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -33500,18 +20476,7 @@ export class PromiseNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchServiceCIDRWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchServiceCIDRWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -33527,18 +20492,7 @@ export class PromiseNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchServiceCIDR(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchServiceCIDR(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -33554,18 +20508,7 @@ export class PromiseNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchServiceCIDRStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchServiceCIDRStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -33581,18 +20524,7 @@ export class PromiseNetworkingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchServiceCIDRStatus(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchServiceCIDRStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -33603,18 +20535,7 @@ export class PromiseNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readIPAddressWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readIPAddressWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -33625,18 +20546,7 @@ export class PromiseNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readIPAddress(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readIPAddress(name, pretty, observableOptions); return result.toPromise(); } @@ -33647,18 +20557,7 @@ export class PromiseNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readIngressClassWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readIngressClassWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -33669,18 +20568,7 @@ export class PromiseNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readIngressClass(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readIngressClass(name, pretty, observableOptions); return result.toPromise(); } @@ -33692,18 +20580,7 @@ export class PromiseNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedIngressWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedIngressWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -33715,18 +20592,7 @@ export class PromiseNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedIngress(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedIngress(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -33738,18 +20604,7 @@ export class PromiseNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedIngressStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedIngressStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -33761,18 +20616,7 @@ export class PromiseNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedIngressStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedIngressStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -33784,18 +20628,7 @@ export class PromiseNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedNetworkPolicyWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedNetworkPolicyWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -33807,18 +20640,7 @@ export class PromiseNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedNetworkPolicy(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedNetworkPolicy(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -33829,18 +20651,7 @@ export class PromiseNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readServiceCIDRWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readServiceCIDRWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -33851,18 +20662,7 @@ export class PromiseNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readServiceCIDR(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readServiceCIDR(name, pretty, observableOptions); return result.toPromise(); } @@ -33873,18 +20673,7 @@ export class PromiseNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readServiceCIDRStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readServiceCIDRStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -33895,18 +20684,7 @@ export class PromiseNetworkingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readServiceCIDRStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readServiceCIDRStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -33921,18 +20699,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceIPAddressWithHttpInfo(name: string, body: V1IPAddress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceIPAddressWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -33947,18 +20714,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceIPAddress(name: string, body: V1IPAddress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceIPAddress(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -33973,18 +20729,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceIngressClassWithHttpInfo(name: string, body: V1IngressClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceIngressClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -33999,18 +20744,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceIngressClass(name: string, body: V1IngressClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceIngressClass(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -34026,18 +20760,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedIngressWithHttpInfo(name: string, namespace: string, body: V1Ingress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedIngressWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -34053,18 +20776,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedIngress(name: string, namespace: string, body: V1Ingress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -34080,18 +20792,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedIngressStatusWithHttpInfo(name: string, namespace: string, body: V1Ingress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedIngressStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -34107,18 +20808,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedIngressStatus(name: string, namespace: string, body: V1Ingress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -34134,18 +20824,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedNetworkPolicyWithHttpInfo(name: string, namespace: string, body: V1NetworkPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedNetworkPolicyWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -34161,18 +20840,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedNetworkPolicy(name: string, namespace: string, body: V1NetworkPolicy, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -34187,18 +20855,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceServiceCIDRWithHttpInfo(name: string, body: V1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceServiceCIDRWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -34213,18 +20870,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceServiceCIDR(name: string, body: V1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceServiceCIDR(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -34239,18 +20885,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceServiceCIDRStatusWithHttpInfo(name: string, body: V1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceServiceCIDRStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -34265,18 +20900,7 @@ export class PromiseNetworkingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceServiceCIDRStatus(name: string, body: V1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceServiceCIDRStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -34309,18 +20933,7 @@ export class PromiseNetworkingV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createIPAddressWithHttpInfo(body: V1beta1IPAddress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createIPAddressWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -34334,18 +20947,7 @@ export class PromiseNetworkingV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createIPAddress(body: V1beta1IPAddress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createIPAddress(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -34359,18 +20961,7 @@ export class PromiseNetworkingV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createServiceCIDRWithHttpInfo(body: V1beta1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createServiceCIDRWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -34384,18 +20975,7 @@ export class PromiseNetworkingV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createServiceCIDR(body: V1beta1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createServiceCIDR(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -34419,18 +20999,7 @@ export class PromiseNetworkingV1beta1Api { * @param [body] */ public deleteCollectionIPAddressWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionIPAddressWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -34454,18 +21023,7 @@ export class PromiseNetworkingV1beta1Api { * @param [body] */ public deleteCollectionIPAddress(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionIPAddress(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -34489,18 +21047,7 @@ export class PromiseNetworkingV1beta1Api { * @param [body] */ public deleteCollectionServiceCIDRWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionServiceCIDRWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -34524,18 +21071,7 @@ export class PromiseNetworkingV1beta1Api { * @param [body] */ public deleteCollectionServiceCIDR(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionServiceCIDR(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -34552,18 +21088,7 @@ export class PromiseNetworkingV1beta1Api { * @param [body] */ public deleteIPAddressWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteIPAddressWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -34580,18 +21105,7 @@ export class PromiseNetworkingV1beta1Api { * @param [body] */ public deleteIPAddress(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteIPAddress(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -34608,18 +21122,7 @@ export class PromiseNetworkingV1beta1Api { * @param [body] */ public deleteServiceCIDRWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteServiceCIDRWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -34636,18 +21139,7 @@ export class PromiseNetworkingV1beta1Api { * @param [body] */ public deleteServiceCIDR(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteServiceCIDR(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -34656,18 +21148,7 @@ export class PromiseNetworkingV1beta1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -34676,18 +21157,7 @@ export class PromiseNetworkingV1beta1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -34707,18 +21177,7 @@ export class PromiseNetworkingV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listIPAddressWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listIPAddressWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -34738,18 +21197,7 @@ export class PromiseNetworkingV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listIPAddress(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listIPAddress(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -34769,18 +21217,7 @@ export class PromiseNetworkingV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listServiceCIDRWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listServiceCIDRWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -34800,18 +21237,7 @@ export class PromiseNetworkingV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listServiceCIDR(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listServiceCIDR(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -34827,18 +21253,7 @@ export class PromiseNetworkingV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchIPAddressWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchIPAddressWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -34854,18 +21269,7 @@ export class PromiseNetworkingV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchIPAddress(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchIPAddress(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -34881,18 +21285,7 @@ export class PromiseNetworkingV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchServiceCIDRWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchServiceCIDRWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -34908,18 +21301,7 @@ export class PromiseNetworkingV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchServiceCIDR(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchServiceCIDR(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -34935,18 +21317,7 @@ export class PromiseNetworkingV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchServiceCIDRStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchServiceCIDRStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -34962,18 +21333,7 @@ export class PromiseNetworkingV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchServiceCIDRStatus(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchServiceCIDRStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -34984,18 +21344,7 @@ export class PromiseNetworkingV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readIPAddressWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readIPAddressWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -35006,18 +21355,7 @@ export class PromiseNetworkingV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readIPAddress(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readIPAddress(name, pretty, observableOptions); return result.toPromise(); } @@ -35028,18 +21366,7 @@ export class PromiseNetworkingV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readServiceCIDRWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readServiceCIDRWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -35050,18 +21377,7 @@ export class PromiseNetworkingV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readServiceCIDR(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readServiceCIDR(name, pretty, observableOptions); return result.toPromise(); } @@ -35072,18 +21388,7 @@ export class PromiseNetworkingV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readServiceCIDRStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readServiceCIDRStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -35094,18 +21399,7 @@ export class PromiseNetworkingV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readServiceCIDRStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readServiceCIDRStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -35120,18 +21414,7 @@ export class PromiseNetworkingV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceIPAddressWithHttpInfo(name: string, body: V1beta1IPAddress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceIPAddressWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -35146,18 +21429,7 @@ export class PromiseNetworkingV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceIPAddress(name: string, body: V1beta1IPAddress, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceIPAddress(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -35172,18 +21444,7 @@ export class PromiseNetworkingV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceServiceCIDRWithHttpInfo(name: string, body: V1beta1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceServiceCIDRWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -35198,18 +21459,7 @@ export class PromiseNetworkingV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceServiceCIDR(name: string, body: V1beta1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceServiceCIDR(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -35224,18 +21474,7 @@ export class PromiseNetworkingV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceServiceCIDRStatusWithHttpInfo(name: string, body: V1beta1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceServiceCIDRStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -35250,18 +21489,7 @@ export class PromiseNetworkingV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceServiceCIDRStatus(name: string, body: V1beta1ServiceCIDR, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceServiceCIDRStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -35289,18 +21517,7 @@ export class PromiseNodeApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -35309,18 +21526,7 @@ export class PromiseNodeApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -35353,18 +21559,7 @@ export class PromiseNodeV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createRuntimeClassWithHttpInfo(body: V1RuntimeClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createRuntimeClassWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -35378,18 +21573,7 @@ export class PromiseNodeV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createRuntimeClass(body: V1RuntimeClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createRuntimeClass(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -35413,18 +21597,7 @@ export class PromiseNodeV1Api { * @param [body] */ public deleteCollectionRuntimeClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionRuntimeClassWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -35448,18 +21621,7 @@ export class PromiseNodeV1Api { * @param [body] */ public deleteCollectionRuntimeClass(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -35476,18 +21638,7 @@ export class PromiseNodeV1Api { * @param [body] */ public deleteRuntimeClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteRuntimeClassWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -35504,18 +21655,7 @@ export class PromiseNodeV1Api { * @param [body] */ public deleteRuntimeClass(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -35524,18 +21664,7 @@ export class PromiseNodeV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -35544,18 +21673,7 @@ export class PromiseNodeV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -35575,18 +21693,7 @@ export class PromiseNodeV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listRuntimeClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listRuntimeClassWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -35606,18 +21713,7 @@ export class PromiseNodeV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listRuntimeClass(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -35633,18 +21729,7 @@ export class PromiseNodeV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchRuntimeClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchRuntimeClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -35660,18 +21745,7 @@ export class PromiseNodeV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchRuntimeClass(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchRuntimeClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -35682,18 +21756,7 @@ export class PromiseNodeV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readRuntimeClassWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readRuntimeClassWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -35704,18 +21767,7 @@ export class PromiseNodeV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readRuntimeClass(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readRuntimeClass(name, pretty, observableOptions); return result.toPromise(); } @@ -35730,18 +21782,7 @@ export class PromiseNodeV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceRuntimeClassWithHttpInfo(name: string, body: V1RuntimeClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceRuntimeClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -35756,18 +21797,7 @@ export class PromiseNodeV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceRuntimeClass(name: string, body: V1RuntimeClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -35795,18 +21825,7 @@ export class PromiseOpenidApi { * get service account issuer OpenID JSON Web Key Set (contains public token verification keys) */ public getServiceAccountIssuerOpenIDKeysetWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getServiceAccountIssuerOpenIDKeysetWithHttpInfo(observableOptions); return result.toPromise(); } @@ -35815,18 +21834,7 @@ export class PromiseOpenidApi { * get service account issuer OpenID JSON Web Key Set (contains public token verification keys) */ public getServiceAccountIssuerOpenIDKeyset(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getServiceAccountIssuerOpenIDKeyset(observableOptions); return result.toPromise(); } @@ -35854,18 +21862,7 @@ export class PromisePolicyApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -35874,18 +21871,7 @@ export class PromisePolicyApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -35919,18 +21905,7 @@ export class PromisePolicyV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedPodDisruptionBudgetWithHttpInfo(namespace: string, body: V1PodDisruptionBudget, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedPodDisruptionBudgetWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -35945,18 +21920,7 @@ export class PromisePolicyV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedPodDisruptionBudget(namespace: string, body: V1PodDisruptionBudget, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedPodDisruptionBudget(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -35981,18 +21945,7 @@ export class PromisePolicyV1Api { * @param [body] */ public deleteCollectionNamespacedPodDisruptionBudgetWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedPodDisruptionBudgetWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -36017,18 +21970,7 @@ export class PromisePolicyV1Api { * @param [body] */ public deleteCollectionNamespacedPodDisruptionBudget(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedPodDisruptionBudget(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -36046,18 +21988,7 @@ export class PromisePolicyV1Api { * @param [body] */ public deleteNamespacedPodDisruptionBudgetWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedPodDisruptionBudgetWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -36075,18 +22006,7 @@ export class PromisePolicyV1Api { * @param [body] */ public deleteNamespacedPodDisruptionBudget(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedPodDisruptionBudget(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -36095,18 +22015,7 @@ export class PromisePolicyV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -36115,18 +22024,7 @@ export class PromisePolicyV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -36147,18 +22045,7 @@ export class PromisePolicyV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedPodDisruptionBudgetWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedPodDisruptionBudgetWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -36179,18 +22066,7 @@ export class PromisePolicyV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedPodDisruptionBudget(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedPodDisruptionBudget(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -36210,18 +22086,7 @@ export class PromisePolicyV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPodDisruptionBudgetForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listPodDisruptionBudgetForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -36241,18 +22106,7 @@ export class PromisePolicyV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPodDisruptionBudgetForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listPodDisruptionBudgetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -36269,18 +22123,7 @@ export class PromisePolicyV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodDisruptionBudgetWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPodDisruptionBudgetWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -36297,18 +22140,7 @@ export class PromisePolicyV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodDisruptionBudget(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -36325,18 +22157,7 @@ export class PromisePolicyV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodDisruptionBudgetStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPodDisruptionBudgetStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -36353,18 +22174,7 @@ export class PromisePolicyV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedPodDisruptionBudgetStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -36376,18 +22186,7 @@ export class PromisePolicyV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodDisruptionBudgetWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPodDisruptionBudgetWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -36399,18 +22198,7 @@ export class PromisePolicyV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodDisruptionBudget(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPodDisruptionBudget(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -36422,18 +22210,7 @@ export class PromisePolicyV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodDisruptionBudgetStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPodDisruptionBudgetStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -36445,18 +22222,7 @@ export class PromisePolicyV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedPodDisruptionBudgetStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedPodDisruptionBudgetStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -36472,18 +22238,7 @@ export class PromisePolicyV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodDisruptionBudgetWithHttpInfo(name: string, namespace: string, body: V1PodDisruptionBudget, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPodDisruptionBudgetWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -36499,18 +22254,7 @@ export class PromisePolicyV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodDisruptionBudget(name: string, namespace: string, body: V1PodDisruptionBudget, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -36526,18 +22270,7 @@ export class PromisePolicyV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodDisruptionBudgetStatusWithHttpInfo(name: string, namespace: string, body: V1PodDisruptionBudget, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPodDisruptionBudgetStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -36553,18 +22286,7 @@ export class PromisePolicyV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedPodDisruptionBudgetStatus(name: string, namespace: string, body: V1PodDisruptionBudget, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -36592,18 +22314,7 @@ export class PromiseRbacAuthorizationApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -36612,18 +22323,7 @@ export class PromiseRbacAuthorizationApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -36656,18 +22356,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createClusterRoleWithHttpInfo(body: V1ClusterRole, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createClusterRoleWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -36681,18 +22370,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createClusterRole(body: V1ClusterRole, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createClusterRole(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -36706,18 +22384,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createClusterRoleBindingWithHttpInfo(body: V1ClusterRoleBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createClusterRoleBindingWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -36731,18 +22398,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createClusterRoleBinding(body: V1ClusterRoleBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createClusterRoleBinding(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -36757,18 +22413,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedRoleWithHttpInfo(namespace: string, body: V1Role, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedRoleWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -36783,18 +22428,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedRole(namespace: string, body: V1Role, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -36809,18 +22443,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedRoleBindingWithHttpInfo(namespace: string, body: V1RoleBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedRoleBindingWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -36835,18 +22458,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedRoleBinding(namespace: string, body: V1RoleBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -36863,18 +22475,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteClusterRoleWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteClusterRoleWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -36891,18 +22492,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteClusterRole(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -36919,18 +22509,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteClusterRoleBindingWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteClusterRoleBindingWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -36947,18 +22526,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteClusterRoleBinding(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -36982,18 +22550,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteCollectionClusterRoleWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionClusterRoleWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -37017,18 +22574,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteCollectionClusterRole(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -37052,18 +22598,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteCollectionClusterRoleBindingWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionClusterRoleBindingWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -37087,18 +22622,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteCollectionClusterRoleBinding(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -37123,18 +22647,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteCollectionNamespacedRoleWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedRoleWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -37159,18 +22672,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteCollectionNamespacedRole(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -37195,18 +22697,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteCollectionNamespacedRoleBindingWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedRoleBindingWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -37231,18 +22722,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteCollectionNamespacedRoleBinding(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -37260,18 +22740,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteNamespacedRoleWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedRoleWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -37289,18 +22758,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteNamespacedRole(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -37318,18 +22776,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteNamespacedRoleBindingWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedRoleBindingWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -37347,18 +22794,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [body] */ public deleteNamespacedRoleBinding(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -37367,18 +22803,7 @@ export class PromiseRbacAuthorizationV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -37387,18 +22812,7 @@ export class PromiseRbacAuthorizationV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -37418,18 +22832,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listClusterRoleWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listClusterRoleWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -37449,18 +22852,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listClusterRole(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -37480,18 +22872,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listClusterRoleBindingWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listClusterRoleBindingWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -37511,18 +22892,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listClusterRoleBinding(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -37543,18 +22913,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedRoleWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedRoleWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -37575,18 +22934,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedRole(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -37607,18 +22955,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedRoleBindingWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedRoleBindingWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -37639,18 +22976,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedRoleBinding(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -37670,18 +22996,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listRoleBindingForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listRoleBindingForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -37701,18 +23016,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listRoleBindingForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -37732,18 +23036,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listRoleForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listRoleForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -37763,18 +23056,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listRoleForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -37790,18 +23072,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterRoleWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchClusterRoleWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -37817,18 +23088,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterRole(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchClusterRole(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -37844,18 +23104,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterRoleBindingWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchClusterRoleBindingWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -37871,18 +23120,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchClusterRoleBinding(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -37899,18 +23137,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedRoleWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedRoleWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -37927,18 +23154,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedRole(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -37955,18 +23171,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedRoleBindingWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedRoleBindingWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -37983,18 +23188,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedRoleBinding(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -38005,18 +23199,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readClusterRoleWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readClusterRoleWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -38027,18 +23210,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readClusterRole(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readClusterRole(name, pretty, observableOptions); return result.toPromise(); } @@ -38049,18 +23221,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readClusterRoleBindingWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readClusterRoleBindingWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -38071,18 +23232,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readClusterRoleBinding(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readClusterRoleBinding(name, pretty, observableOptions); return result.toPromise(); } @@ -38094,18 +23244,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedRoleWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedRoleWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -38117,18 +23256,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedRole(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedRole(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -38140,18 +23268,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedRoleBindingWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedRoleBindingWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -38163,18 +23280,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedRoleBinding(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedRoleBinding(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -38189,18 +23295,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceClusterRoleWithHttpInfo(name: string, body: V1ClusterRole, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceClusterRoleWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38215,18 +23310,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceClusterRole(name: string, body: V1ClusterRole, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceClusterRole(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38241,18 +23325,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceClusterRoleBindingWithHttpInfo(name: string, body: V1ClusterRoleBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceClusterRoleBindingWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38267,18 +23340,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceClusterRoleBinding(name: string, body: V1ClusterRoleBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38294,18 +23356,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedRoleWithHttpInfo(name: string, namespace: string, body: V1Role, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedRoleWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38321,18 +23372,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedRole(name: string, namespace: string, body: V1Role, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38348,18 +23388,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedRoleBindingWithHttpInfo(name: string, namespace: string, body: V1RoleBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedRoleBindingWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38375,18 +23404,7 @@ export class PromiseRbacAuthorizationV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedRoleBinding(name: string, namespace: string, body: V1RoleBinding, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38414,18 +23432,7 @@ export class PromiseResourceApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -38434,18 +23441,7 @@ export class PromiseResourceApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -38478,18 +23474,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createDeviceClassWithHttpInfo(body: V1alpha3DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createDeviceClassWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38503,18 +23488,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createDeviceClass(body: V1alpha3DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createDeviceClass(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38528,18 +23502,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createDeviceTaintRuleWithHttpInfo(body: V1alpha3DeviceTaintRule, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createDeviceTaintRuleWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38553,18 +23516,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createDeviceTaintRule(body: V1alpha3DeviceTaintRule, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createDeviceTaintRule(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38579,18 +23531,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaimWithHttpInfo(namespace: string, body: V1alpha3ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedResourceClaimWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38605,18 +23546,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaim(namespace: string, body: V1alpha3ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedResourceClaim(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38631,18 +23561,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, body: V1alpha3ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedResourceClaimTemplateWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38657,18 +23576,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaimTemplate(namespace: string, body: V1alpha3ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedResourceClaimTemplate(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38682,18 +23590,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createResourceSliceWithHttpInfo(body: V1alpha3ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createResourceSliceWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38707,18 +23604,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createResourceSlice(body: V1alpha3ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createResourceSlice(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -38742,18 +23628,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteCollectionDeviceClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionDeviceClassWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -38777,18 +23652,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteCollectionDeviceClass(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionDeviceClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -38812,18 +23676,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteCollectionDeviceTaintRuleWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionDeviceTaintRuleWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -38847,18 +23700,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteCollectionDeviceTaintRule(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionDeviceTaintRule(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -38883,18 +23725,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteCollectionNamespacedResourceClaimWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedResourceClaimWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -38919,18 +23750,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteCollectionNamespacedResourceClaim(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedResourceClaim(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -38955,18 +23775,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteCollectionNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedResourceClaimTemplateWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -38991,18 +23800,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteCollectionNamespacedResourceClaimTemplate(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedResourceClaimTemplate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -39026,18 +23824,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteCollectionResourceSliceWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionResourceSliceWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -39061,18 +23848,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteCollectionResourceSlice(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionResourceSlice(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -39089,18 +23865,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteDeviceClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteDeviceClassWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -39117,18 +23882,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteDeviceClass(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteDeviceClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -39145,18 +23899,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteDeviceTaintRuleWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteDeviceTaintRuleWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -39173,18 +23916,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteDeviceTaintRule(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteDeviceTaintRule(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -39202,18 +23934,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedResourceClaimWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -39231,18 +23952,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteNamespacedResourceClaim(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedResourceClaim(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -39260,18 +23970,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedResourceClaimTemplateWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -39289,18 +23988,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteNamespacedResourceClaimTemplate(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedResourceClaimTemplate(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -39317,18 +24005,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteResourceSliceWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteResourceSliceWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -39345,18 +24022,7 @@ export class PromiseResourceV1alpha3Api { * @param [body] */ public deleteResourceSlice(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteResourceSlice(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -39365,18 +24031,7 @@ export class PromiseResourceV1alpha3Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -39385,18 +24040,7 @@ export class PromiseResourceV1alpha3Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -39416,18 +24060,7 @@ export class PromiseResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDeviceClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listDeviceClassWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -39447,18 +24080,7 @@ export class PromiseResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDeviceClass(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listDeviceClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -39478,18 +24100,7 @@ export class PromiseResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDeviceTaintRuleWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listDeviceTaintRuleWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -39509,18 +24120,7 @@ export class PromiseResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDeviceTaintRule(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listDeviceTaintRule(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -39541,18 +24141,7 @@ export class PromiseResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaimWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedResourceClaimWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -39573,18 +24162,7 @@ export class PromiseResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaim(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedResourceClaim(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -39605,18 +24183,7 @@ export class PromiseResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedResourceClaimTemplateWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -39637,18 +24204,7 @@ export class PromiseResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaimTemplate(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedResourceClaimTemplate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -39668,18 +24224,7 @@ export class PromiseResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceClaimForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -39699,18 +24244,7 @@ export class PromiseResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceClaimForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -39730,18 +24264,7 @@ export class PromiseResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimTemplateForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceClaimTemplateForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -39761,18 +24284,7 @@ export class PromiseResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimTemplateForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceClaimTemplateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -39792,18 +24304,7 @@ export class PromiseResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceSliceWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceSliceWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -39823,18 +24324,7 @@ export class PromiseResourceV1alpha3Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceSlice(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceSlice(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -39850,18 +24340,7 @@ export class PromiseResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchDeviceClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchDeviceClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -39877,18 +24356,7 @@ export class PromiseResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchDeviceClass(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchDeviceClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -39904,18 +24372,7 @@ export class PromiseResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchDeviceTaintRuleWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchDeviceTaintRuleWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -39931,18 +24388,7 @@ export class PromiseResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchDeviceTaintRule(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchDeviceTaintRule(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -39959,18 +24405,7 @@ export class PromiseResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaimWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -39987,18 +24422,7 @@ export class PromiseResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaim(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -40015,18 +24439,7 @@ export class PromiseResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaimStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -40043,18 +24456,7 @@ export class PromiseResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -40071,18 +24473,7 @@ export class PromiseResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaimTemplateWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -40099,18 +24490,7 @@ export class PromiseResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimTemplate(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaimTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -40126,18 +24506,7 @@ export class PromiseResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchResourceSliceWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchResourceSliceWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -40153,18 +24522,7 @@ export class PromiseResourceV1alpha3Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchResourceSlice(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchResourceSlice(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -40175,18 +24533,7 @@ export class PromiseResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readDeviceClassWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readDeviceClassWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -40197,18 +24544,7 @@ export class PromiseResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readDeviceClass(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readDeviceClass(name, pretty, observableOptions); return result.toPromise(); } @@ -40219,18 +24555,7 @@ export class PromiseResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readDeviceTaintRuleWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readDeviceTaintRuleWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -40241,18 +24566,7 @@ export class PromiseResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readDeviceTaintRule(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readDeviceTaintRule(name, pretty, observableOptions); return result.toPromise(); } @@ -40264,18 +24578,7 @@ export class PromiseResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaimWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -40287,18 +24590,7 @@ export class PromiseResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaim(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaim(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -40310,18 +24602,7 @@ export class PromiseResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaimStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -40333,18 +24614,7 @@ export class PromiseResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaimStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -40356,18 +24626,7 @@ export class PromiseResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaimTemplateWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -40379,18 +24638,7 @@ export class PromiseResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimTemplate(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaimTemplate(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -40401,18 +24649,7 @@ export class PromiseResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readResourceSliceWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readResourceSliceWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -40423,18 +24660,7 @@ export class PromiseResourceV1alpha3Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readResourceSlice(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readResourceSlice(name, pretty, observableOptions); return result.toPromise(); } @@ -40449,18 +24675,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceDeviceClassWithHttpInfo(name: string, body: V1alpha3DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceDeviceClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40475,18 +24690,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceDeviceClass(name: string, body: V1alpha3DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceDeviceClass(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40501,18 +24705,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceDeviceTaintRuleWithHttpInfo(name: string, body: V1alpha3DeviceTaintRule, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceDeviceTaintRuleWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40527,18 +24720,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceDeviceTaintRule(name: string, body: V1alpha3DeviceTaintRule, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceDeviceTaintRule(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40554,18 +24736,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, body: V1alpha3ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaimWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40581,18 +24752,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaim(name: string, namespace: string, body: V1alpha3ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40608,18 +24768,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, body: V1alpha3ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaimStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40635,18 +24784,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimStatus(name: string, namespace: string, body: V1alpha3ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40662,18 +24800,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, body: V1alpha3ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaimTemplateWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40689,18 +24816,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimTemplate(name: string, namespace: string, body: V1alpha3ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaimTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40715,18 +24831,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceResourceSliceWithHttpInfo(name: string, body: V1alpha3ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceResourceSliceWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40741,18 +24846,7 @@ export class PromiseResourceV1alpha3Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceResourceSlice(name: string, body: V1alpha3ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceResourceSlice(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40785,18 +24879,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createDeviceClassWithHttpInfo(body: V1beta1DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createDeviceClassWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40810,18 +24893,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createDeviceClass(body: V1beta1DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createDeviceClass(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40836,18 +24908,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaimWithHttpInfo(namespace: string, body: V1beta1ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedResourceClaimWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40862,18 +24923,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaim(namespace: string, body: V1beta1ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedResourceClaim(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40888,18 +24938,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, body: V1beta1ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedResourceClaimTemplateWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40914,18 +24953,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaimTemplate(namespace: string, body: V1beta1ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedResourceClaimTemplate(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40939,18 +24967,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createResourceSliceWithHttpInfo(body: V1beta1ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createResourceSliceWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40964,18 +24981,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createResourceSlice(body: V1beta1ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createResourceSlice(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -40999,18 +25005,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteCollectionDeviceClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionDeviceClassWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -41034,18 +25029,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteCollectionDeviceClass(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionDeviceClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -41070,18 +25054,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteCollectionNamespacedResourceClaimWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedResourceClaimWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -41106,18 +25079,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteCollectionNamespacedResourceClaim(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedResourceClaim(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -41142,18 +25104,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteCollectionNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedResourceClaimTemplateWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -41178,18 +25129,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteCollectionNamespacedResourceClaimTemplate(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedResourceClaimTemplate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -41213,18 +25153,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteCollectionResourceSliceWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionResourceSliceWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -41248,18 +25177,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteCollectionResourceSlice(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionResourceSlice(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -41276,18 +25194,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteDeviceClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteDeviceClassWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -41304,18 +25211,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteDeviceClass(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteDeviceClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -41333,18 +25229,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedResourceClaimWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -41362,18 +25247,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteNamespacedResourceClaim(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedResourceClaim(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -41391,18 +25265,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedResourceClaimTemplateWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -41420,18 +25283,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteNamespacedResourceClaimTemplate(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedResourceClaimTemplate(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -41448,18 +25300,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteResourceSliceWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteResourceSliceWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -41476,18 +25317,7 @@ export class PromiseResourceV1beta1Api { * @param [body] */ public deleteResourceSlice(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteResourceSlice(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -41496,18 +25326,7 @@ export class PromiseResourceV1beta1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -41516,18 +25335,7 @@ export class PromiseResourceV1beta1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -41547,18 +25355,7 @@ export class PromiseResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDeviceClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listDeviceClassWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -41578,18 +25375,7 @@ export class PromiseResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDeviceClass(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listDeviceClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -41610,18 +25396,7 @@ export class PromiseResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaimWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedResourceClaimWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -41642,18 +25417,7 @@ export class PromiseResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaim(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedResourceClaim(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -41674,18 +25438,7 @@ export class PromiseResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedResourceClaimTemplateWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -41706,18 +25459,7 @@ export class PromiseResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaimTemplate(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedResourceClaimTemplate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -41737,18 +25479,7 @@ export class PromiseResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceClaimForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -41768,18 +25499,7 @@ export class PromiseResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceClaimForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -41799,18 +25519,7 @@ export class PromiseResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimTemplateForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceClaimTemplateForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -41830,18 +25539,7 @@ export class PromiseResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimTemplateForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceClaimTemplateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -41861,18 +25559,7 @@ export class PromiseResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceSliceWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceSliceWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -41892,18 +25579,7 @@ export class PromiseResourceV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceSlice(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceSlice(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -41919,18 +25595,7 @@ export class PromiseResourceV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchDeviceClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchDeviceClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -41946,18 +25611,7 @@ export class PromiseResourceV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchDeviceClass(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchDeviceClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -41974,18 +25628,7 @@ export class PromiseResourceV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaimWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -42002,18 +25645,7 @@ export class PromiseResourceV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaim(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -42030,18 +25662,7 @@ export class PromiseResourceV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaimStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -42058,18 +25679,7 @@ export class PromiseResourceV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -42086,18 +25696,7 @@ export class PromiseResourceV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaimTemplateWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -42114,18 +25713,7 @@ export class PromiseResourceV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimTemplate(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaimTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -42141,18 +25729,7 @@ export class PromiseResourceV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchResourceSliceWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchResourceSliceWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -42168,18 +25745,7 @@ export class PromiseResourceV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchResourceSlice(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchResourceSlice(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -42190,18 +25756,7 @@ export class PromiseResourceV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readDeviceClassWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readDeviceClassWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -42212,18 +25767,7 @@ export class PromiseResourceV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readDeviceClass(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readDeviceClass(name, pretty, observableOptions); return result.toPromise(); } @@ -42235,18 +25779,7 @@ export class PromiseResourceV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaimWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -42258,18 +25791,7 @@ export class PromiseResourceV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaim(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaim(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -42281,18 +25803,7 @@ export class PromiseResourceV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaimStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -42304,18 +25815,7 @@ export class PromiseResourceV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaimStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -42327,18 +25827,7 @@ export class PromiseResourceV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaimTemplateWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -42350,18 +25839,7 @@ export class PromiseResourceV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimTemplate(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaimTemplate(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -42372,18 +25850,7 @@ export class PromiseResourceV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readResourceSliceWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readResourceSliceWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -42394,18 +25861,7 @@ export class PromiseResourceV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readResourceSlice(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readResourceSlice(name, pretty, observableOptions); return result.toPromise(); } @@ -42420,18 +25876,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceDeviceClassWithHttpInfo(name: string, body: V1beta1DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceDeviceClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42446,18 +25891,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceDeviceClass(name: string, body: V1beta1DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceDeviceClass(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42473,18 +25907,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, body: V1beta1ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaimWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42500,18 +25923,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaim(name: string, namespace: string, body: V1beta1ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42527,18 +25939,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, body: V1beta1ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaimStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42554,18 +25955,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimStatus(name: string, namespace: string, body: V1beta1ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42581,18 +25971,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, body: V1beta1ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaimTemplateWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42608,18 +25987,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimTemplate(name: string, namespace: string, body: V1beta1ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaimTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42634,18 +26002,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceResourceSliceWithHttpInfo(name: string, body: V1beta1ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceResourceSliceWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42660,18 +26017,7 @@ export class PromiseResourceV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceResourceSlice(name: string, body: V1beta1ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceResourceSlice(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42704,18 +26050,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createDeviceClassWithHttpInfo(body: V1beta2DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createDeviceClassWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42729,18 +26064,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createDeviceClass(body: V1beta2DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createDeviceClass(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42755,18 +26079,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaimWithHttpInfo(namespace: string, body: V1beta2ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedResourceClaimWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42781,18 +26094,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaim(namespace: string, body: V1beta2ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedResourceClaim(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42807,18 +26109,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, body: V1beta2ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedResourceClaimTemplateWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42833,18 +26124,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedResourceClaimTemplate(namespace: string, body: V1beta2ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedResourceClaimTemplate(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42858,18 +26138,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createResourceSliceWithHttpInfo(body: V1beta2ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createResourceSliceWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42883,18 +26152,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createResourceSlice(body: V1beta2ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createResourceSlice(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -42918,18 +26176,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteCollectionDeviceClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionDeviceClassWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -42953,18 +26200,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteCollectionDeviceClass(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionDeviceClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -42989,18 +26225,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteCollectionNamespacedResourceClaimWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedResourceClaimWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -43025,18 +26250,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteCollectionNamespacedResourceClaim(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedResourceClaim(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -43061,18 +26275,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteCollectionNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedResourceClaimTemplateWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -43097,18 +26300,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteCollectionNamespacedResourceClaimTemplate(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedResourceClaimTemplate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -43132,18 +26324,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteCollectionResourceSliceWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionResourceSliceWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -43167,18 +26348,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteCollectionResourceSlice(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionResourceSlice(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -43195,18 +26365,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteDeviceClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteDeviceClassWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -43223,18 +26382,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteDeviceClass(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteDeviceClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -43252,18 +26400,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedResourceClaimWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -43281,18 +26418,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteNamespacedResourceClaim(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedResourceClaim(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -43310,18 +26436,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedResourceClaimTemplateWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -43339,18 +26454,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteNamespacedResourceClaimTemplate(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedResourceClaimTemplate(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -43367,18 +26471,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteResourceSliceWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteResourceSliceWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -43395,18 +26488,7 @@ export class PromiseResourceV1beta2Api { * @param [body] */ public deleteResourceSlice(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteResourceSlice(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -43415,18 +26497,7 @@ export class PromiseResourceV1beta2Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -43435,18 +26506,7 @@ export class PromiseResourceV1beta2Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -43466,18 +26526,7 @@ export class PromiseResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDeviceClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listDeviceClassWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -43497,18 +26546,7 @@ export class PromiseResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listDeviceClass(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listDeviceClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -43529,18 +26567,7 @@ export class PromiseResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaimWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedResourceClaimWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -43561,18 +26588,7 @@ export class PromiseResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaim(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedResourceClaim(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -43593,18 +26609,7 @@ export class PromiseResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaimTemplateWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedResourceClaimTemplateWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -43625,18 +26630,7 @@ export class PromiseResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedResourceClaimTemplate(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedResourceClaimTemplate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -43656,18 +26650,7 @@ export class PromiseResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceClaimForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -43687,18 +26670,7 @@ export class PromiseResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceClaimForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -43718,18 +26690,7 @@ export class PromiseResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimTemplateForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceClaimTemplateForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -43749,18 +26710,7 @@ export class PromiseResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceClaimTemplateForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceClaimTemplateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -43780,18 +26730,7 @@ export class PromiseResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceSliceWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceSliceWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -43811,18 +26750,7 @@ export class PromiseResourceV1beta2Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listResourceSlice(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listResourceSlice(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -43838,18 +26766,7 @@ export class PromiseResourceV1beta2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchDeviceClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchDeviceClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -43865,18 +26782,7 @@ export class PromiseResourceV1beta2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchDeviceClass(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchDeviceClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -43893,18 +26799,7 @@ export class PromiseResourceV1beta2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaimWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -43921,18 +26816,7 @@ export class PromiseResourceV1beta2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaim(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -43949,18 +26833,7 @@ export class PromiseResourceV1beta2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaimStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -43977,18 +26850,7 @@ export class PromiseResourceV1beta2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimStatus(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -44005,18 +26867,7 @@ export class PromiseResourceV1beta2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaimTemplateWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -44033,18 +26884,7 @@ export class PromiseResourceV1beta2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedResourceClaimTemplate(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedResourceClaimTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -44060,18 +26900,7 @@ export class PromiseResourceV1beta2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchResourceSliceWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchResourceSliceWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -44087,18 +26916,7 @@ export class PromiseResourceV1beta2Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchResourceSlice(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchResourceSlice(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -44109,18 +26927,7 @@ export class PromiseResourceV1beta2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readDeviceClassWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readDeviceClassWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -44131,18 +26938,7 @@ export class PromiseResourceV1beta2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readDeviceClass(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readDeviceClass(name, pretty, observableOptions); return result.toPromise(); } @@ -44154,18 +26950,7 @@ export class PromiseResourceV1beta2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaimWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -44177,18 +26962,7 @@ export class PromiseResourceV1beta2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaim(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaim(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -44200,18 +26974,7 @@ export class PromiseResourceV1beta2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaimStatusWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -44223,18 +26986,7 @@ export class PromiseResourceV1beta2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimStatus(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaimStatus(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -44246,18 +26998,7 @@ export class PromiseResourceV1beta2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaimTemplateWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -44269,18 +27010,7 @@ export class PromiseResourceV1beta2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedResourceClaimTemplate(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedResourceClaimTemplate(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -44291,18 +27021,7 @@ export class PromiseResourceV1beta2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readResourceSliceWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readResourceSliceWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -44313,18 +27032,7 @@ export class PromiseResourceV1beta2Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readResourceSlice(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readResourceSlice(name, pretty, observableOptions); return result.toPromise(); } @@ -44339,18 +27047,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceDeviceClassWithHttpInfo(name: string, body: V1beta2DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceDeviceClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -44365,18 +27062,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceDeviceClass(name: string, body: V1beta2DeviceClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceDeviceClass(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -44392,18 +27078,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimWithHttpInfo(name: string, namespace: string, body: V1beta2ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaimWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -44419,18 +27094,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaim(name: string, namespace: string, body: V1beta2ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -44446,18 +27110,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimStatusWithHttpInfo(name: string, namespace: string, body: V1beta2ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaimStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -44473,18 +27126,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimStatus(name: string, namespace: string, body: V1beta2ResourceClaim, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -44500,18 +27142,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimTemplateWithHttpInfo(name: string, namespace: string, body: V1beta2ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaimTemplateWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -44527,18 +27158,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedResourceClaimTemplate(name: string, namespace: string, body: V1beta2ResourceClaimTemplate, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedResourceClaimTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -44553,18 +27173,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceResourceSliceWithHttpInfo(name: string, body: V1beta2ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceResourceSliceWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -44579,18 +27188,7 @@ export class PromiseResourceV1beta2Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceResourceSlice(name: string, body: V1beta2ResourceSlice, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceResourceSlice(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -44618,18 +27216,7 @@ export class PromiseSchedulingApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -44638,18 +27225,7 @@ export class PromiseSchedulingApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -44682,18 +27258,7 @@ export class PromiseSchedulingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createPriorityClassWithHttpInfo(body: V1PriorityClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createPriorityClassWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -44707,18 +27272,7 @@ export class PromiseSchedulingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createPriorityClass(body: V1PriorityClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createPriorityClass(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -44742,18 +27296,7 @@ export class PromiseSchedulingV1Api { * @param [body] */ public deleteCollectionPriorityClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionPriorityClassWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -44777,18 +27320,7 @@ export class PromiseSchedulingV1Api { * @param [body] */ public deleteCollectionPriorityClass(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -44805,18 +27337,7 @@ export class PromiseSchedulingV1Api { * @param [body] */ public deletePriorityClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deletePriorityClassWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -44833,18 +27354,7 @@ export class PromiseSchedulingV1Api { * @param [body] */ public deletePriorityClass(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -44853,18 +27363,7 @@ export class PromiseSchedulingV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -44873,18 +27372,7 @@ export class PromiseSchedulingV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -44904,18 +27392,7 @@ export class PromiseSchedulingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPriorityClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listPriorityClassWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -44935,18 +27412,7 @@ export class PromiseSchedulingV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listPriorityClass(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -44962,18 +27428,7 @@ export class PromiseSchedulingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchPriorityClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchPriorityClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -44989,18 +27444,7 @@ export class PromiseSchedulingV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchPriorityClass(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchPriorityClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -45011,18 +27455,7 @@ export class PromiseSchedulingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readPriorityClassWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readPriorityClassWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -45033,18 +27466,7 @@ export class PromiseSchedulingV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readPriorityClass(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readPriorityClass(name, pretty, observableOptions); return result.toPromise(); } @@ -45059,18 +27481,7 @@ export class PromiseSchedulingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replacePriorityClassWithHttpInfo(name: string, body: V1PriorityClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replacePriorityClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -45085,18 +27496,7 @@ export class PromiseSchedulingV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replacePriorityClass(name: string, body: V1PriorityClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replacePriorityClass(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -45124,18 +27524,7 @@ export class PromiseStorageApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -45144,18 +27533,7 @@ export class PromiseStorageApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -45188,18 +27566,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createCSIDriverWithHttpInfo(body: V1CSIDriver, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createCSIDriverWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -45213,18 +27580,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createCSIDriver(body: V1CSIDriver, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createCSIDriver(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -45238,18 +27594,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createCSINodeWithHttpInfo(body: V1CSINode, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createCSINodeWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -45263,18 +27608,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createCSINode(body: V1CSINode, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createCSINode(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -45289,18 +27623,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedCSIStorageCapacityWithHttpInfo(namespace: string, body: V1CSIStorageCapacity, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedCSIStorageCapacityWithHttpInfo(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -45315,18 +27638,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createNamespacedCSIStorageCapacity(namespace: string, body: V1CSIStorageCapacity, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createNamespacedCSIStorageCapacity(namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -45340,18 +27652,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createStorageClassWithHttpInfo(body: V1StorageClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createStorageClassWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -45365,18 +27666,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createStorageClass(body: V1StorageClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createStorageClass(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -45390,18 +27680,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createVolumeAttachmentWithHttpInfo(body: V1VolumeAttachment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createVolumeAttachmentWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -45415,18 +27694,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createVolumeAttachment(body: V1VolumeAttachment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createVolumeAttachment(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -45443,18 +27711,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteCSIDriverWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCSIDriverWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -45471,18 +27728,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteCSIDriver(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCSIDriver(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -45499,18 +27745,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteCSINodeWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCSINodeWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -45527,18 +27762,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteCSINode(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCSINode(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -45562,18 +27786,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteCollectionCSIDriverWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionCSIDriverWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -45597,18 +27810,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteCollectionCSIDriver(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionCSIDriver(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -45632,18 +27834,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteCollectionCSINodeWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionCSINodeWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -45667,18 +27858,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteCollectionCSINode(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionCSINode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -45703,18 +27883,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteCollectionNamespacedCSIStorageCapacityWithHttpInfo(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedCSIStorageCapacityWithHttpInfo(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -45739,18 +27908,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteCollectionNamespacedCSIStorageCapacity(namespace: string, pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionNamespacedCSIStorageCapacity(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -45774,18 +27932,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteCollectionStorageClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionStorageClassWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -45809,18 +27956,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteCollectionStorageClass(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionStorageClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -45844,18 +27980,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteCollectionVolumeAttachmentWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionVolumeAttachmentWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -45879,18 +28004,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteCollectionVolumeAttachment(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -45908,18 +28022,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteNamespacedCSIStorageCapacityWithHttpInfo(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedCSIStorageCapacityWithHttpInfo(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -45937,18 +28040,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteNamespacedCSIStorageCapacity(name: string, namespace: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteNamespacedCSIStorageCapacity(name, namespace, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -45965,18 +28057,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteStorageClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteStorageClassWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -45993,18 +28074,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteStorageClass(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteStorageClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -46021,18 +28091,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteVolumeAttachmentWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteVolumeAttachmentWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -46049,18 +28108,7 @@ export class PromiseStorageV1Api { * @param [body] */ public deleteVolumeAttachment(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -46069,18 +28117,7 @@ export class PromiseStorageV1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -46089,18 +28126,7 @@ export class PromiseStorageV1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -46120,18 +28146,7 @@ export class PromiseStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCSIDriverWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listCSIDriverWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -46151,18 +28166,7 @@ export class PromiseStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCSIDriver(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listCSIDriver(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -46182,18 +28186,7 @@ export class PromiseStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCSINodeWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listCSINodeWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -46213,18 +28206,7 @@ export class PromiseStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCSINode(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listCSINode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -46244,18 +28226,7 @@ export class PromiseStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCSIStorageCapacityForAllNamespacesWithHttpInfo(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listCSIStorageCapacityForAllNamespacesWithHttpInfo(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -46275,18 +28246,7 @@ export class PromiseStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listCSIStorageCapacityForAllNamespaces(allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, pretty?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listCSIStorageCapacityForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -46307,18 +28267,7 @@ export class PromiseStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedCSIStorageCapacityWithHttpInfo(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedCSIStorageCapacityWithHttpInfo(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -46339,18 +28288,7 @@ export class PromiseStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listNamespacedCSIStorageCapacity(namespace: string, pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listNamespacedCSIStorageCapacity(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -46370,18 +28308,7 @@ export class PromiseStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listStorageClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listStorageClassWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -46401,18 +28328,7 @@ export class PromiseStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listStorageClass(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listStorageClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -46432,18 +28348,7 @@ export class PromiseStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listVolumeAttachmentWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listVolumeAttachmentWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -46463,18 +28368,7 @@ export class PromiseStorageV1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listVolumeAttachment(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -46490,18 +28384,7 @@ export class PromiseStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCSIDriverWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchCSIDriverWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -46517,18 +28400,7 @@ export class PromiseStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCSIDriver(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchCSIDriver(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -46544,18 +28416,7 @@ export class PromiseStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCSINodeWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchCSINodeWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -46571,18 +28432,7 @@ export class PromiseStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchCSINode(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchCSINode(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -46599,18 +28449,7 @@ export class PromiseStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCSIStorageCapacityWithHttpInfo(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedCSIStorageCapacityWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -46627,18 +28466,7 @@ export class PromiseStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchNamespacedCSIStorageCapacity(name: string, namespace: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -46654,18 +28482,7 @@ export class PromiseStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchStorageClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchStorageClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -46681,18 +28498,7 @@ export class PromiseStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchStorageClass(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchStorageClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -46708,18 +28514,7 @@ export class PromiseStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchVolumeAttachmentWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchVolumeAttachmentWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -46735,18 +28530,7 @@ export class PromiseStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchVolumeAttachment(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -46762,18 +28546,7 @@ export class PromiseStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchVolumeAttachmentStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchVolumeAttachmentStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -46789,18 +28562,7 @@ export class PromiseStorageV1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchVolumeAttachmentStatus(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -46811,18 +28573,7 @@ export class PromiseStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCSIDriverWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readCSIDriverWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -46833,18 +28584,7 @@ export class PromiseStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCSIDriver(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readCSIDriver(name, pretty, observableOptions); return result.toPromise(); } @@ -46855,18 +28595,7 @@ export class PromiseStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCSINodeWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readCSINodeWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -46877,18 +28606,7 @@ export class PromiseStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readCSINode(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readCSINode(name, pretty, observableOptions); return result.toPromise(); } @@ -46900,18 +28618,7 @@ export class PromiseStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedCSIStorageCapacityWithHttpInfo(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedCSIStorageCapacityWithHttpInfo(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -46923,18 +28630,7 @@ export class PromiseStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readNamespacedCSIStorageCapacity(name: string, namespace: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readNamespacedCSIStorageCapacity(name, namespace, pretty, observableOptions); return result.toPromise(); } @@ -46945,18 +28641,7 @@ export class PromiseStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readStorageClassWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readStorageClassWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -46967,18 +28652,7 @@ export class PromiseStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readStorageClass(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readStorageClass(name, pretty, observableOptions); return result.toPromise(); } @@ -46989,18 +28663,7 @@ export class PromiseStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readVolumeAttachmentWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readVolumeAttachmentWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -47011,18 +28674,7 @@ export class PromiseStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readVolumeAttachment(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readVolumeAttachment(name, pretty, observableOptions); return result.toPromise(); } @@ -47033,18 +28685,7 @@ export class PromiseStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readVolumeAttachmentStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readVolumeAttachmentStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -47055,18 +28696,7 @@ export class PromiseStorageV1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readVolumeAttachmentStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readVolumeAttachmentStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -47081,18 +28711,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCSIDriverWithHttpInfo(name: string, body: V1CSIDriver, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceCSIDriverWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47107,18 +28726,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCSIDriver(name: string, body: V1CSIDriver, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceCSIDriver(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47133,18 +28741,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCSINodeWithHttpInfo(name: string, body: V1CSINode, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceCSINodeWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47159,18 +28756,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceCSINode(name: string, body: V1CSINode, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceCSINode(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47186,18 +28772,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedCSIStorageCapacityWithHttpInfo(name: string, namespace: string, body: V1CSIStorageCapacity, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedCSIStorageCapacityWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47213,18 +28788,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceNamespacedCSIStorageCapacity(name: string, namespace: string, body: V1CSIStorageCapacity, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47239,18 +28803,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceStorageClassWithHttpInfo(name: string, body: V1StorageClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceStorageClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47265,18 +28818,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceStorageClass(name: string, body: V1StorageClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceStorageClass(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47291,18 +28833,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceVolumeAttachmentWithHttpInfo(name: string, body: V1VolumeAttachment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceVolumeAttachmentWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47317,18 +28848,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceVolumeAttachment(name: string, body: V1VolumeAttachment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47343,18 +28863,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceVolumeAttachmentStatusWithHttpInfo(name: string, body: V1VolumeAttachment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceVolumeAttachmentStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47369,18 +28878,7 @@ export class PromiseStorageV1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceVolumeAttachmentStatus(name: string, body: V1VolumeAttachment, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47413,18 +28911,7 @@ export class PromiseStorageV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createVolumeAttributesClassWithHttpInfo(body: V1alpha1VolumeAttributesClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createVolumeAttributesClassWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47438,18 +28925,7 @@ export class PromiseStorageV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createVolumeAttributesClass(body: V1alpha1VolumeAttributesClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createVolumeAttributesClass(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47473,18 +28949,7 @@ export class PromiseStorageV1alpha1Api { * @param [body] */ public deleteCollectionVolumeAttributesClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionVolumeAttributesClassWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -47508,18 +28973,7 @@ export class PromiseStorageV1alpha1Api { * @param [body] */ public deleteCollectionVolumeAttributesClass(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionVolumeAttributesClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -47536,18 +28990,7 @@ export class PromiseStorageV1alpha1Api { * @param [body] */ public deleteVolumeAttributesClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteVolumeAttributesClassWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -47564,18 +29007,7 @@ export class PromiseStorageV1alpha1Api { * @param [body] */ public deleteVolumeAttributesClass(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteVolumeAttributesClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -47584,18 +29016,7 @@ export class PromiseStorageV1alpha1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -47604,18 +29025,7 @@ export class PromiseStorageV1alpha1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -47635,18 +29045,7 @@ export class PromiseStorageV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listVolumeAttributesClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listVolumeAttributesClassWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -47666,18 +29065,7 @@ export class PromiseStorageV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listVolumeAttributesClass(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listVolumeAttributesClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -47693,18 +29081,7 @@ export class PromiseStorageV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchVolumeAttributesClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchVolumeAttributesClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -47720,18 +29097,7 @@ export class PromiseStorageV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchVolumeAttributesClass(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchVolumeAttributesClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -47742,18 +29108,7 @@ export class PromiseStorageV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readVolumeAttributesClassWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readVolumeAttributesClassWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -47764,18 +29119,7 @@ export class PromiseStorageV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readVolumeAttributesClass(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readVolumeAttributesClass(name, pretty, observableOptions); return result.toPromise(); } @@ -47790,18 +29134,7 @@ export class PromiseStorageV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceVolumeAttributesClassWithHttpInfo(name: string, body: V1alpha1VolumeAttributesClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceVolumeAttributesClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47816,18 +29149,7 @@ export class PromiseStorageV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceVolumeAttributesClass(name: string, body: V1alpha1VolumeAttributesClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceVolumeAttributesClass(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47860,18 +29182,7 @@ export class PromiseStorageV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createVolumeAttributesClassWithHttpInfo(body: V1beta1VolumeAttributesClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createVolumeAttributesClassWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47885,18 +29196,7 @@ export class PromiseStorageV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createVolumeAttributesClass(body: V1beta1VolumeAttributesClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createVolumeAttributesClass(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -47920,18 +29220,7 @@ export class PromiseStorageV1beta1Api { * @param [body] */ public deleteCollectionVolumeAttributesClassWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionVolumeAttributesClassWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -47955,18 +29244,7 @@ export class PromiseStorageV1beta1Api { * @param [body] */ public deleteCollectionVolumeAttributesClass(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionVolumeAttributesClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -47983,18 +29261,7 @@ export class PromiseStorageV1beta1Api { * @param [body] */ public deleteVolumeAttributesClassWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteVolumeAttributesClassWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -48011,18 +29278,7 @@ export class PromiseStorageV1beta1Api { * @param [body] */ public deleteVolumeAttributesClass(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteVolumeAttributesClass(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -48031,18 +29287,7 @@ export class PromiseStorageV1beta1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -48051,18 +29296,7 @@ export class PromiseStorageV1beta1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -48082,18 +29316,7 @@ export class PromiseStorageV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listVolumeAttributesClassWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listVolumeAttributesClassWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -48113,18 +29336,7 @@ export class PromiseStorageV1beta1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listVolumeAttributesClass(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listVolumeAttributesClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -48140,18 +29352,7 @@ export class PromiseStorageV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchVolumeAttributesClassWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchVolumeAttributesClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -48167,18 +29368,7 @@ export class PromiseStorageV1beta1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchVolumeAttributesClass(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchVolumeAttributesClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -48189,18 +29379,7 @@ export class PromiseStorageV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readVolumeAttributesClassWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readVolumeAttributesClassWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -48211,18 +29390,7 @@ export class PromiseStorageV1beta1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readVolumeAttributesClass(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readVolumeAttributesClass(name, pretty, observableOptions); return result.toPromise(); } @@ -48237,18 +29405,7 @@ export class PromiseStorageV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceVolumeAttributesClassWithHttpInfo(name: string, body: V1beta1VolumeAttributesClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceVolumeAttributesClassWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -48263,18 +29420,7 @@ export class PromiseStorageV1beta1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceVolumeAttributesClass(name: string, body: V1beta1VolumeAttributesClass, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceVolumeAttributesClass(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -48302,18 +29448,7 @@ export class PromiseStoragemigrationApi { * get information of a group */ public getAPIGroupWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroupWithHttpInfo(observableOptions); return result.toPromise(); } @@ -48322,18 +29457,7 @@ export class PromiseStoragemigrationApi { * get information of a group */ public getAPIGroup(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIGroup(observableOptions); return result.toPromise(); } @@ -48366,18 +29490,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createStorageVersionMigrationWithHttpInfo(body: V1alpha1StorageVersionMigration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createStorageVersionMigrationWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -48391,18 +29504,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public createStorageVersionMigration(body: V1alpha1StorageVersionMigration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.createStorageVersionMigration(body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -48426,18 +29528,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [body] */ public deleteCollectionStorageVersionMigrationWithHttpInfo(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionStorageVersionMigrationWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -48461,18 +29552,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [body] */ public deleteCollectionStorageVersionMigration(pretty?: string, _continue?: string, dryRun?: string, fieldSelector?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, labelSelector?: string, limit?: number, orphanDependents?: boolean, propagationPolicy?: string, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteCollectionStorageVersionMigration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, observableOptions); return result.toPromise(); } @@ -48489,18 +29569,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [body] */ public deleteStorageVersionMigrationWithHttpInfo(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteStorageVersionMigrationWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -48517,18 +29586,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [body] */ public deleteStorageVersionMigration(name: string, pretty?: string, dryRun?: string, gracePeriodSeconds?: number, ignoreStoreReadErrorWithClusterBreakingPotential?: boolean, orphanDependents?: boolean, propagationPolicy?: string, body?: V1DeleteOptions, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.deleteStorageVersionMigration(name, pretty, dryRun, gracePeriodSeconds, ignoreStoreReadErrorWithClusterBreakingPotential, orphanDependents, propagationPolicy, body, observableOptions); return result.toPromise(); } @@ -48537,18 +29595,7 @@ export class PromiseStoragemigrationV1alpha1Api { * get available resources */ public getAPIResourcesWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResourcesWithHttpInfo(observableOptions); return result.toPromise(); } @@ -48557,18 +29604,7 @@ export class PromiseStoragemigrationV1alpha1Api { * get available resources */ public getAPIResources(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getAPIResources(observableOptions); return result.toPromise(); } @@ -48588,18 +29624,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listStorageVersionMigrationWithHttpInfo(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listStorageVersionMigrationWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -48619,18 +29644,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [watch] Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ public listStorageVersionMigration(pretty?: string, allowWatchBookmarks?: boolean, _continue?: string, fieldSelector?: string, labelSelector?: string, limit?: number, resourceVersion?: string, resourceVersionMatch?: string, sendInitialEvents?: boolean, timeoutSeconds?: number, watch?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.listStorageVersionMigration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, observableOptions); return result.toPromise(); } @@ -48646,18 +29660,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchStorageVersionMigrationWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchStorageVersionMigrationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -48673,18 +29676,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchStorageVersionMigration(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchStorageVersionMigration(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -48700,18 +29692,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchStorageVersionMigrationStatusWithHttpInfo(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchStorageVersionMigrationStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -48727,18 +29708,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [force] Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. */ public patchStorageVersionMigrationStatus(name: string, body: any, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, force?: boolean, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.patchStorageVersionMigrationStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, observableOptions); return result.toPromise(); } @@ -48749,18 +29719,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readStorageVersionMigrationWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readStorageVersionMigrationWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -48771,18 +29730,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readStorageVersionMigration(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readStorageVersionMigration(name, pretty, observableOptions); return result.toPromise(); } @@ -48793,18 +29741,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readStorageVersionMigrationStatusWithHttpInfo(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readStorageVersionMigrationStatusWithHttpInfo(name, pretty, observableOptions); return result.toPromise(); } @@ -48815,18 +29752,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [pretty] If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ public readStorageVersionMigrationStatus(name: string, pretty?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.readStorageVersionMigrationStatus(name, pretty, observableOptions); return result.toPromise(); } @@ -48841,18 +29767,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceStorageVersionMigrationWithHttpInfo(name: string, body: V1alpha1StorageVersionMigration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceStorageVersionMigrationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -48867,18 +29782,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceStorageVersionMigration(name: string, body: V1alpha1StorageVersionMigration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceStorageVersionMigration(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -48893,18 +29797,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceStorageVersionMigrationStatusWithHttpInfo(name: string, body: V1alpha1StorageVersionMigration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceStorageVersionMigrationStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -48919,18 +29812,7 @@ export class PromiseStoragemigrationV1alpha1Api { * @param [fieldValidation] fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. */ public replaceStorageVersionMigrationStatus(name: string, body: V1alpha1StorageVersionMigration, pretty?: string, dryRun?: string, fieldManager?: string, fieldValidation?: string, _options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.replaceStorageVersionMigrationStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, observableOptions); return result.toPromise(); } @@ -48958,18 +29840,7 @@ export class PromiseVersionApi { * get the version information for this server */ public getCodeWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getCodeWithHttpInfo(observableOptions); return result.toPromise(); } @@ -48978,18 +29849,7 @@ export class PromiseVersionApi { * get the version information for this server */ public getCode(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getCode(observableOptions); return result.toPromise(); } @@ -49017,18 +29877,7 @@ export class PromiseWellKnownApi { * get service account issuer OpenID configuration, also known as the \'OIDC discovery doc\' */ public getServiceAccountIssuerOpenIDConfigurationWithHttpInfo(_options?: PromiseConfigurationOptions): Promise> { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getServiceAccountIssuerOpenIDConfigurationWithHttpInfo(observableOptions); return result.toPromise(); } @@ -49037,18 +29886,7 @@ export class PromiseWellKnownApi { * get service account issuer OpenID configuration, also known as the \'OIDC discovery doc\' */ public getServiceAccountIssuerOpenIDConfiguration(_options?: PromiseConfigurationOptions): Promise { - let observableOptions: undefined | ConfigurationOptions - if (_options){ - observableOptions = { - baseServer: _options.baseServer, - httpApi: _options.httpApi, - middleware: _options.middleware?.map( - m => new PromiseMiddlewareWrapper(m) - ), - middlewareMergeStrategy: _options.middlewareMergeStrategy, - authMethods: _options.authMethods - } - } + const observableOptions = wrapOptions(_options); const result = this.api.getServiceAccountIssuerOpenIDConfiguration(observableOptions); return result.toPromise(); }