From 83e4c4019ba784d3673d3e2e09d144f1f33f34c1 Mon Sep 17 00:00:00 2001 From: Brendan Burns <5751682+brendandburns@users.noreply.github.com> Date: Tue, 6 May 2025 10:20:33 -0700 Subject: [PATCH 001/111] Update README.md --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c8bab32e0c..1baec2c3a3 100644 --- a/README.md +++ b/README.md @@ -114,14 +114,15 @@ We switched from `request` to `fetch` as the HTTP(S) backend for the `1.0.0` rel Generally speaking newer clients will work with older Kubernetes, but compatability isn't 100% guaranteed. -| client version | older versions | 1.28 | 1.29 | 1.30 | 1.31 | 1.32 | -| -------------- | -------------- | ---- | ---- | ---- | ---- | ---- | -| 0.19.x | - | ✓ | x | x | x | x | -| 0.20.x | - | + | ✓ | x | x | x | -| 0.21.x | - | + | + | ✓ | x | x | -| 0.22.x | - | + | + | + | ✓ | x | -| 1.0.x | - | + | + | + | + | ✓ | -| 1.1.x | - | + | + | + | + | ✓ | +| client version | older versions | 1.28 | 1.29 | 1.30 | 1.31 | 1.32 | 1.33| +| -------------- | -------------- | ---- | ---- | ---- | ---- | ---- |----| +| 0.19.x | - | ✓ | x | x | x | x | x | +| 0.20.x | - | + | ✓ | x | x | x | x | +| 0.21.x | - | + | + | ✓ | x | x | x | +| 0.22.x | - | + | + | + | ✓ | x | x | +| 1.0.x | - | + | + | + | + | ✓ | x | +| 1.1.x | - | + | + | + | + | ✓ | x | +| 1.2.x | - | + | + | + | + | + | ✓ | Key: From f5ed4ec53d91295dbe611e207f2665db04621354 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 6 May 2025 14:37:31 -0400 Subject: [PATCH 002/111] ci: test on Node v24 Node v24 was released today. This commit adds it to the CI matrix. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index abf9756c6f..140d0911d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: ['23', '22', '20', '18'] + node: ['24', '23', '22', '20', '18'] name: Node ${{ matrix.node }} validation steps: - uses: actions/checkout@v4.2.2 From ae45dafc4157f7ad29e6bb918ab7926e388c3a90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 03:04:00 +0000 Subject: [PATCH 003/111] build(deps): bump openid-client from 6.4.2 to 6.5.0 Bumps [openid-client](https://github.com/panva/openid-client) from 6.4.2 to 6.5.0. - [Release notes](https://github.com/panva/openid-client/releases) - [Changelog](https://github.com/panva/openid-client/blob/main/CHANGELOG.md) - [Commits](https://github.com/panva/openid-client/compare/v6.4.2...v6.5.0) --- updated-dependencies: - dependency-name: openid-client dependency-version: 6.5.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9dcae7a648..54a13123c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3343,9 +3343,9 @@ } }, "node_modules/oauth4webapi": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.4.1.tgz", - "integrity": "sha512-sPv0Phrf0HjFNRr23b1yC7Q9VAeri3fdrx4sr4KKN6PmLLY/zJD3B4UHLs/p7oYlFBbxJVl/VI6bSvjmKBoexg==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.5.1.tgz", + "integrity": "sha512-txg/jZQwcbaF7PMJgY7aoxc9QuCxHVFMiEkDIJ60DwDz3PbtXPQnrzo+3X4IRYGChIwWLabRBRpf1k9hO9+xrQ==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/panva" @@ -3397,13 +3397,13 @@ } }, "node_modules/openid-client": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-6.4.2.tgz", - "integrity": "sha512-4zBRTsKNRTyKxV5cFzl+LtamsYx/FsWhejjax+qgMkFNGtLj1gMtng2iSoJqqWUT0FHU3IUhO53aeBePg7Sp/g==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-6.5.0.tgz", + "integrity": "sha512-fAfYaTnOYE2kQCqEJGX9KDObW2aw7IQy4jWpU/+3D3WoCFLbix5Hg6qIPQ6Js9r7f8jDUmsnnguRNCSw4wU/IQ==", "license": "MIT", "dependencies": { "jose": "^6.0.10", - "oauth4webapi": "^3.4.1" + "oauth4webapi": "^3.5.1" }, "funding": { "url": "https://github.com/sponsors/panva" From 15e4ebf2440e6229b8d3ca8f381aaae01ab58869 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 09:11:09 -0400 Subject: [PATCH 004/111] build(deps): bump @types/node from 22.15.11 to 22.15.14 (#2423) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build(deps): bump @types/node from 22.15.11 to 22.15.14 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.11 to 22.15.14. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.14 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * refactor: assign authorization header correctly * test: change assignments of authorization headers --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Max Strübing --- package-lock.json | 6 +++--- src/azure_auth.ts | 2 +- src/config_test.ts | 28 ++++++++++++++-------------- src/exec_auth.ts | 2 +- src/exec_auth_test.ts | 2 +- src/file_auth.ts | 2 +- src/gcp_auth.ts | 2 +- src/oidc_auth.ts | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 54a13123c0..b89264f5b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -992,9 +992,9 @@ } }, "node_modules/@types/node": { - "version": "22.15.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.11.tgz", - "integrity": "sha512-rlyK0vuU7VLEYQfXuC7QTFxDvkb6tKhDI7wR4r6ZzM0k8BJd44W0jxo6xmUjqSs4AlYmiYfLJU2f0pAG/FtCRw==", + "version": "22.15.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.14.tgz", + "integrity": "sha512-BL1eyu/XWsFGTtDWOYULQEs4KR0qdtYfCxYAUYRoB7JP7h9ETYLgQTww6kH8Sj2C0pFGgrpM0XKv6/kbIzYJ1g==", "license": "MIT", "dependencies": { "undici-types": "~6.21.0" diff --git a/src/azure_auth.ts b/src/azure_auth.ts index 1b69048ddd..2db7c6601e 100644 --- a/src/azure_auth.ts +++ b/src/azure_auth.ts @@ -29,7 +29,7 @@ export class AzureAuth implements Authenticator { public async applyAuthentication(user: User, opts: https.RequestOptions): Promise { const token = this.getToken(user); if (token) { - opts.headers!.Authorization = `Bearer ${token}`; + opts.headers!['Authorization'] = `Bearer ${token}`; } } diff --git a/src/config_test.ts b/src/config_test.ts index c2544a82e8..ea8e4e2dc1 100644 --- a/src/config_test.ts +++ b/src/config_test.ts @@ -962,7 +962,7 @@ describe('KubeConfig', () => { const opts = {} as RequestOptions; await config.applyToHTTPSOptions(opts); - strictEqual(opts.headers!.Authorization, `Bearer ${token}`); + strictEqual(opts.headers!['Authorization'], `Bearer ${token}`); }); it('should populate from auth provider', async () => { const config = new KubeConfig(); @@ -982,11 +982,11 @@ describe('KubeConfig', () => { const opts = {} as RequestOptions; await config.applyToHTTPSOptions(opts); - strictEqual(opts.headers!.Authorization, `Bearer ${token}`); + strictEqual(opts.headers!['Authorization'], `Bearer ${token}`); opts.headers = {}; opts.headers.Host = 'foo.com'; await config.applyToHTTPSOptions(opts); - strictEqual(opts.headers.Authorization, `Bearer ${token}`); + strictEqual(opts.headers!['Authorization'], `Bearer ${token}`); }); it('should populate from auth provider without expirty', async () => { @@ -1006,7 +1006,7 @@ describe('KubeConfig', () => { const opts = {} as RequestOptions; await config.applyToHTTPSOptions(opts); - strictEqual(opts.headers!.Authorization, `Bearer ${token}`); + strictEqual(opts.headers!['Authorization'], `Bearer ${token}`); }); it('should populate rejectUnauthorized=false when skipTLSVerify is set', async () => { @@ -1115,7 +1115,7 @@ describe('KubeConfig', () => { ); const opts = {} as RequestOptions; await config.applyToHTTPSOptions(opts); - strictEqual(opts.headers!.Authorization, `Bearer ${token}`); + strictEqual(opts.headers!['Authorization'], `Bearer ${token}`); }); it('should exec with expired token', async () => { @@ -1143,7 +1143,7 @@ describe('KubeConfig', () => { ); const opts = {} as RequestOptions; await config.applyToHTTPSOptions(opts); - strictEqual(opts.headers!.Authorization, `Bearer ${token}`); + strictEqual(opts.headers!['Authorization'], `Bearer ${token}`); }); it('should exec without access-token', async () => { @@ -1170,7 +1170,7 @@ describe('KubeConfig', () => { ); const opts = {} as RequestOptions; await config.applyToHTTPSOptions(opts); - strictEqual(opts.headers!.Authorization, `Bearer ${token}`); + strictEqual(opts.headers!['Authorization'], `Bearer ${token}`); }); it('should exec without access-token', async () => { // TODO: fix this test for Windows @@ -1196,7 +1196,7 @@ describe('KubeConfig', () => { ); const opts = {} as RequestOptions; await config.applyToHTTPSOptions(opts); - strictEqual(opts.headers!.Authorization, `Bearer ${token}`); + strictEqual(opts.headers!['Authorization'], `Bearer ${token}`); }); it('should exec succesfully with spaces in cmd', async () => { // TODO: fix this test for Windows @@ -1222,7 +1222,7 @@ describe('KubeConfig', () => { ); const opts = {} as RequestOptions; await config.applyToHTTPSOptions(opts); - strictEqual(opts.headers!.Authorization, `Bearer ${token}`); + strictEqual(opts.headers!['Authorization'], `Bearer ${token}`); }); it('should exec with exec auth and env vars', async () => { // TODO: fix this test for Windows @@ -1255,7 +1255,7 @@ describe('KubeConfig', () => { // TODO: inject the exec command here and validate env vars? const opts = {} as RequestOptions; await config.applyToHTTPSOptions(opts); - strictEqual(opts.headers!.Authorization, `Bearer ${token}`); + strictEqual(opts.headers!['Authorization'], `Bearer ${token}`); }); it('should exec with exec auth', async () => { // TODO: fix this test for Windows @@ -1288,7 +1288,7 @@ describe('KubeConfig', () => { // TODO: inject the exec command here? const opts = {} as RequestOptions; await config.applyToHTTPSOptions(opts); - strictEqual(opts.headers!.Authorization, `Bearer ${token}`); + strictEqual(opts.headers!['Authorization'], `Bearer ${token}`); }); it('should exec with exec auth (other location)', async () => { // TODO: fix this test for Windows @@ -1316,7 +1316,7 @@ describe('KubeConfig', () => { // TODO: inject the exec command here? const opts = {} as RequestOptions; await config.applyToHTTPSOptions(opts); - strictEqual(opts.headers!.Authorization, `Bearer ${token}`); + strictEqual(opts.headers!['Authorization'], `Bearer ${token}`); }); it('should cache exec with name', async () => { // TODO: fix this test for Windows @@ -1776,7 +1776,7 @@ describe('KubeConfig', () => { // Simulate token retrieval const token = 'test-token'; opts.headers = opts.headers || {}; - opts.headers.Authorization = `Bearer ${token}`; + opts.headers['Authorization'] = `Bearer ${token}`; } else { throw new Error('No custom configuration found'); } @@ -1802,7 +1802,7 @@ describe('KubeConfig', () => { const opts: RequestOptions = {}; await kc.applyToHTTPSOptions(opts); - strictEqual(opts.headers!.Authorization, 'Bearer test-token'); + strictEqual(opts.headers!['Authorization'], 'Bearer test-token'); }); }); diff --git a/src/exec_auth.ts b/src/exec_auth.ts index 3ac70dfa4e..fbd97a26f8 100644 --- a/src/exec_auth.ts +++ b/src/exec_auth.ts @@ -56,7 +56,7 @@ export class ExecAuth implements Authenticator { if (!opts.headers) { opts.headers = {} as OutgoingHttpHeaders; } - opts.headers!.Authorization = `Bearer ${token}`; + opts.headers!['Authorization'] = `Bearer ${token}`; } } diff --git a/src/exec_auth_test.ts b/src/exec_auth_test.ts index 9be3e262d5..e323b5880e 100644 --- a/src/exec_auth_test.ts +++ b/src/exec_auth_test.ts @@ -486,7 +486,7 @@ describe('ExecAuth', () => { }, opts, ); - strictEqual(opts.headers?.Authorization, 'Bearer foo'); + strictEqual(opts.headers!['Authorization'], 'Bearer foo'); }); it('should handle null credentials correctly', async () => { const auth = new ExecAuth(); diff --git a/src/file_auth.ts b/src/file_auth.ts index b8b7644636..d6d4f56c9b 100644 --- a/src/file_auth.ts +++ b/src/file_auth.ts @@ -20,7 +20,7 @@ export class FileAuth implements Authenticator { this.refreshToken(user.authProvider.config.tokenFile); } if (this.token) { - opts.headers!.Authorization = `Bearer ${this.token}`; + opts.headers!['Authorization'] = `Bearer ${this.token}`; } } diff --git a/src/gcp_auth.ts b/src/gcp_auth.ts index 0f3d680e08..1bf1089618 100644 --- a/src/gcp_auth.ts +++ b/src/gcp_auth.ts @@ -28,7 +28,7 @@ export class GoogleCloudPlatformAuth implements Authenticator { public async applyAuthentication(user: User, opts: https.RequestOptions): Promise { const token = this.getToken(user); if (token) { - opts.headers!.Authorization = `Bearer ${token}`; + opts.headers!['Authorization'] = `Bearer ${token}`; } } diff --git a/src/oidc_auth.ts b/src/oidc_auth.ts index af5e0c1311..f8c1536ac9 100644 --- a/src/oidc_auth.ts +++ b/src/oidc_auth.ts @@ -85,7 +85,7 @@ export class OpenIDConnectAuth implements Authenticator { ): Promise { const token = await this.getToken(user, overrideClient); if (token) { - opts.headers!.Authorization = `Bearer ${token}`; + opts.headers!['Authorization'] = `Bearer ${token}`; } } From 951956c3d69bf10def3d775c40f375f39870a5ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 00:37:24 -0400 Subject: [PATCH 005/111] build(deps): bump @types/node from 22.15.14 to 22.15.15 (#2426) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.14 to 22.15.15. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.15 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b89264f5b0..59bc5c4caf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -992,9 +992,9 @@ } }, "node_modules/@types/node": { - "version": "22.15.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.14.tgz", - "integrity": "sha512-BL1eyu/XWsFGTtDWOYULQEs4KR0qdtYfCxYAUYRoB7JP7h9ETYLgQTww6kH8Sj2C0pFGgrpM0XKv6/kbIzYJ1g==", + "version": "22.15.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.15.tgz", + "integrity": "sha512-R5muMcZob3/Jjchn5LcO8jdKwSCbzqmPB6ruBxMcf9kbxtniZHP327s6C37iOfuw8mbKK3cAQa7sEl7afLrQ8A==", "license": "MIT", "dependencies": { "undici-types": "~6.21.0" From e93722917de09a3dc32c3c9d98d8e7b8efa26e6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 May 2025 02:46:56 +0000 Subject: [PATCH 006/111] build(deps): bump @types/node from 22.15.15 to 22.15.17 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.15 to 22.15.17. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.17 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 59bc5c4caf..6a6342fb17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -992,9 +992,9 @@ } }, "node_modules/@types/node": { - "version": "22.15.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.15.tgz", - "integrity": "sha512-R5muMcZob3/Jjchn5LcO8jdKwSCbzqmPB6ruBxMcf9kbxtniZHP327s6C37iOfuw8mbKK3cAQa7sEl7afLrQ8A==", + "version": "22.15.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.17.tgz", + "integrity": "sha512-wIX2aSZL5FE+MR0JlvF87BNVrtFWf6AE6rxSE9X7OwnVvoyCQjpzSRJ+M87se/4QCkCiebQAqrJ0y6fwIyi7nw==", "license": "MIT", "dependencies": { "undici-types": "~6.21.0" From a88bb13c18dd672d50f2c12c2022ce642f17ac11 Mon Sep 17 00:00:00 2001 From: Ben Batha Date: Wed, 2 Mar 2022 11:06:53 -0500 Subject: [PATCH 007/111] fix(cache): watch errors must call done handler The type of `watchObject` was incorrect and has been updated to match the actual request body. Using this info it was clear that 'ERROR' events were not being handled correctly. When the watch receives an error it is not always an http status code, because the status code can only be sent when the stream is starting. This means that `410` resourceVersion out of date errors could only be handled if they were detected before the watch stream started leaving watches running on channels that would never receive more events and not notifying `ListWatch` consumers of the error. --- src/cache.ts | 18 +++++++--- src/cache_test.ts | 87 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 98 insertions(+), 7 deletions(-) diff --git a/src/cache.ts b/src/cache.ts index af5e5bc852..e0490114cd 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -140,7 +140,10 @@ export class ListWatch implements ObjectCache, In private async doneHandler(err: any): Promise { this._stop(); - if (err && err.statusCode === 410) { + if ( + err && + ((err as { statusCode?: number }).statusCode === 410 || (err as { code?: number }).code === 410) + ) { this.resourceVersion = ''; } else if (err) { this.callbackCache[ERROR].forEach((elt: ErrorCallback) => elt(err)); @@ -192,7 +195,11 @@ export class ListWatch implements ObjectCache, In }); } - private watchHandler(phase: string, obj: T, watchObj?: any): void { + private async watchHandler( + phase: string, + obj: T, + watchObj?: { type: string; object: KubernetesObject }, + ): Promise { switch (phase) { case 'ERROR': if ((obj as { code?: number }).code === 410) { @@ -214,10 +221,11 @@ export class ListWatch implements ObjectCache, In case 'BOOKMARK': // nothing to do, here for documentation, mostly. break; + case 'ERROR': + await this.doneHandler(obj); + return; } - if (watchObj && watchObj.metadata) { - this.resourceVersion = watchObj.metadata.resourceVersion; - } + this.resourceVersion = obj.metadata!.resourceVersion || ''; } } diff --git a/src/cache_test.ts b/src/cache_test.ts index 315a4f55c5..6a57a0fec5 100644 --- a/src/cache_test.ts +++ b/src/cache_test.ts @@ -1205,9 +1205,10 @@ describe('ListWatchCache', () => { { metadata: { name: 'name3', + resourceVersion: '23456', } as V1ObjectMeta, } as V1Namespace, - { metadata: { resourceVersion: '23456' } }, + { type: 'ADDED', metadata: { resourceVersion: '23456' } }, ); await informer.stop(); @@ -1259,9 +1260,91 @@ describe('ListWatchCache', () => { { metadata: { name: 'name3', + resourceVersion: '23456', } as V1ObjectMeta, } as V1Namespace, - { metadata: { resourceVersion: '23456' } }, + { type: 'ADDED', metadata: { resourceVersion: '23456' } }, + ); + + await informer.stop(); + + let errorEmitted = false; + informer.on('error', () => (errorEmitted = true)); + + promise = new Promise((resolve) => { + mock.when( + fakeWatch.watch(mock.anything(), mock.anything(), mock.anything(), mock.anything()), + ).thenCall(() => { + resolve(new FakeRequest()); + }); + }); + + informer.start(); + await promise; + + const [, , , doneHandler] = mock.capture(fakeWatch.watch).last(); + + const object = { + kind: 'Status', + apiVersion: 'v1', + metadata: {}, + status: 'Failure', + message: 'too old resource version: 12345 (1234)', + reason: 'Expired', + code: 410, + }; + await watchHandler('ERROR', object, { type: 'ERROR', object }); + + mock.verify( + fakeWatch.watch(mock.anything(), mock.anything(), mock.anything(), mock.anything()), + ).thrice(); + expect(errorEmitted).to.equal(false); + expect(listCalls).to.be.equal(2); + }); + + it('should list if the watch errors from the last version', async () => { + const fakeWatch = mock.mock(Watch); + const list: V1Pod[] = []; + const listObj = { + metadata: { + resourceVersion: '12345', + } as V1ListMeta, + items: list, + } as V1NamespaceList; + + let listCalls = 0; + const listFn: ListPromise = function(): Promise<{ + response: http.IncomingMessage; + body: V1NamespaceList; + }> { + return new Promise<{ response: http.IncomingMessage; body: V1NamespaceList }>((resolve) => { + listCalls++; + resolve({ response: {} as http.IncomingMessage, body: listObj }); + }); + }; + let promise = new Promise((resolve) => { + mock.when( + fakeWatch.watch(mock.anything(), mock.anything(), mock.anything(), mock.anything()), + ).thenCall(() => { + resolve(new FakeRequest()); + }); + }); + + const informer = new ListWatch('/some/path', mock.instance(fakeWatch), listFn, false); + + informer.start(); + await promise; + + const [, , watchHandler] = mock.capture(fakeWatch.watch).last(); + watchHandler( + 'ADDED', + { + metadata: { + name: 'name3', + resourceVersion: '23456', + } as V1ObjectMeta, + } as V1Namespace, + { type: 'ADDED', metadata: { resourceVersion: '23456' } }, ); await informer.stop(); From e0d3695116add2aa534cfa3615c3eed19bb55375 Mon Sep 17 00:00:00 2001 From: Jan Hesse Date: Fri, 20 Jan 2023 20:24:51 +0100 Subject: [PATCH 008/111] Update cache.ts --- src/cache.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cache.ts b/src/cache.ts index e0490114cd..55923e7e2b 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -34,6 +34,7 @@ export class ListWatch implements ObjectCache, In private readonly watch: Watch; private readonly listFn: ListPromise; private readonly labelSelector?: string; + private readonly fieldSelector?: string; public constructor( path: string, @@ -41,11 +42,13 @@ export class ListWatch implements ObjectCache, In listFn: ListPromise, autoStart: boolean = true, labelSelector?: string, + fieldSelector?: string, ) { this.path = path; this.watch = watch; this.listFn = listFn; this.labelSelector = labelSelector; + this.fieldSelector = fieldSelector; this.callbackCache[ADD] = []; this.callbackCache[UPDATE] = []; @@ -172,10 +175,14 @@ export class ListWatch implements ObjectCache, In } as { resourceVersion: string | undefined; labelSelector: string | undefined; + fieldSelector: string | undefined; }; if (this.labelSelector !== undefined) { queryParams.labelSelector = ObjectSerializer.serialize(this.labelSelector, 'string'); } + if (this.fieldSelector !== undefined) { + queryParams.fieldSelector = ObjectSerializer.serialize(this.fieldSelector, 'string'); + } this.request = await this.watch.watch( this.path, queryParams, From 2a961a0aebaba79536db1b819a607c83d955fb2d Mon Sep 17 00:00:00 2001 From: Brendan Burns <5751682+brendandburns@users.noreply.github.com> Date: Fri, 9 May 2025 16:52:16 +0000 Subject: [PATCH 009/111] Updates/fixes for watch --- src/cache.ts | 16 ++++++----- src/cache_test.ts | 69 +++++++++++++++++++---------------------------- 2 files changed, 38 insertions(+), 47 deletions(-) diff --git a/src/cache.ts b/src/cache.ts index 55923e7e2b..be9bf6688f 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -168,7 +168,7 @@ export class ListWatch implements ObjectCache, In } this.objects = deleteItems(this.objects, list.items, this.callbackCache[DELETE].slice()); this.addOrUpdateItems(list.items); - this.resourceVersion = list.metadata!.resourceVersion || ''; + this.resourceVersion = list.metadata ? list.metadata!.resourceVersion || '' : ''; } const queryParams = { resourceVersion: this.resourceVersion, @@ -192,6 +192,9 @@ export class ListWatch implements ObjectCache, In } private addOrUpdateItems(items: T[]): void { + if (items === undefined || items === null) { + return; + } items.forEach((obj: T) => { addOrUpdateObject( this.objects, @@ -212,7 +215,8 @@ export class ListWatch implements ObjectCache, In if ((obj as { code?: number }).code === 410) { this.resourceVersion = ''; } - break; + // We don't restart here, because it should be handled by the watch exiting if necessary + return; case 'ADDED': case 'MODIFIED': addOrUpdateObject( @@ -228,17 +232,17 @@ export class ListWatch implements ObjectCache, In case 'BOOKMARK': // nothing to do, here for documentation, mostly. break; - case 'ERROR': - await this.doneHandler(obj); - return; } - this.resourceVersion = obj.metadata!.resourceVersion || ''; + this.resourceVersion = obj.metadata ? obj.metadata!.resourceVersion || '' : ''; } } // exported for testing export function cacheMapFromList(newObjects: T[]): CacheMap { const objects: CacheMap = new Map(); + if (newObjects === undefined || newObjects === null) { + return objects; + } // build up the new list for (const obj of newObjects) { let namespaceObjects = objects.get(obj.metadata!.namespace || ''); diff --git a/src/cache_test.ts b/src/cache_test.ts index 6a57a0fec5..9746425149 100644 --- a/src/cache_test.ts +++ b/src/cache_test.ts @@ -235,6 +235,7 @@ describe('ListWatchCache', () => { watchHandler('ADDED', { metadata: { name: 'name3', + resourceVersion: 'blah', } as V1ObjectMeta, } as V1Namespace); @@ -245,40 +246,28 @@ describe('ListWatchCache', () => { } as V1ObjectMeta, } as V1Namespace); - watchHandler( - 'DELETED', - { - metadata: { - name: 'name2', - resourceVersion: 'blah', - } as V1ObjectMeta, - } as V1Namespace, - { - metadata: { - resourceVersion: '54321', - }, - }, - ); + watchHandler('DELETED', { + metadata: { + name: 'name2', + resourceVersion: '54321', + } as V1ObjectMeta, + } as V1Namespace); const [addResult, updateResult, deleteResult] = await Promise.all([ addPromise, updatePromise, deletePromise, ]); - deepStrictEqual(addResult.metadata, { name: 'name3' }); + deepStrictEqual(addResult.metadata, { name: 'name3', resourceVersion: 'blah' }); deepStrictEqual(updateResult.metadata, { name: 'name3', resourceVersion: 'baz' }); - deepStrictEqual(deleteResult.metadata, { name: 'name2', resourceVersion: 'blah' }); + deepStrictEqual(deleteResult.metadata, { name: 'name2', resourceVersion: '54321' }); strictEqual(informer.latestResourceVersion(), '54321'); - watchHandler( - 'BOOKMARK', - {}, - { - metadata: { - resourceVersion: '5454', - }, + watchHandler('BOOKMARK', { + metadata: { + resourceVersion: '5454', }, - ); + }); strictEqual(informer.latestResourceVersion(), '5454'); }); @@ -1275,7 +1264,7 @@ describe('ListWatchCache', () => { mock.when( fakeWatch.watch(mock.anything(), mock.anything(), mock.anything(), mock.anything()), ).thenCall(() => { - resolve(new FakeRequest()); + resolve({}); }); }); @@ -1294,39 +1283,35 @@ describe('ListWatchCache', () => { code: 410, }; await watchHandler('ERROR', object, { type: 'ERROR', object }); + await doneHandler(null); mock.verify( fakeWatch.watch(mock.anything(), mock.anything(), mock.anything(), mock.anything()), ).thrice(); - expect(errorEmitted).to.equal(false); - expect(listCalls).to.be.equal(2); + strictEqual(errorEmitted, false); + strictEqual(listCalls, 2); }); it('should list if the watch errors from the last version', async () => { const fakeWatch = mock.mock(Watch); - const list: V1Pod[] = []; - const listObj = { - metadata: { - resourceVersion: '12345', - } as V1ListMeta, - items: list, - } as V1NamespaceList; let listCalls = 0; - const listFn: ListPromise = function(): Promise<{ - response: http.IncomingMessage; - body: V1NamespaceList; - }> { - return new Promise<{ response: http.IncomingMessage; body: V1NamespaceList }>((resolve) => { + const listFn: ListPromise = function (): Promise { + return new Promise((resolve, reject) => { listCalls++; - resolve({ response: {} as http.IncomingMessage, body: listObj }); + resolve({ + metadata: { + resourceVersion: '12345', + } as V1ListMeta, + items: [], + } as V1NamespaceList); }); }; let promise = new Promise((resolve) => { mock.when( fakeWatch.watch(mock.anything(), mock.anything(), mock.anything(), mock.anything()), ).thenCall(() => { - resolve(new FakeRequest()); + resolve({}); }); }); @@ -1418,6 +1403,8 @@ describe('ListWatchCache', () => { ); await informer.stop(); + strictEqual(listCalls, 1); + listCalls = 0; let errorEmitted = false; informer.on('error', () => (errorEmitted = true)); From faeb84eaac6a939d48222917987f3a1194ff281b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 May 2025 02:44:14 +0000 Subject: [PATCH 010/111] build(deps-dev): bump typescript-eslint from 8.32.0 to 8.32.1 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.32.0 to 8.32.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.32.1/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-version: 8.32.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 108 +++++++++++++++++++++++++--------------------- 1 file changed, 59 insertions(+), 49 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6a6342fb17..c272ac0e7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1027,19 +1027,19 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.32.0.tgz", - "integrity": "sha512-/jU9ettcntkBFmWUzzGgsClEi2ZFiikMX5eEQsmxIAWMOn4H3D4rvHssstmAHGVvrYnaMqdWWWg0b5M6IN/MTQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.32.1.tgz", + "integrity": "sha512-6u6Plg9nP/J1GRpe/vcjjabo6Uc5YQPAMxsgQyGC/I0RuukiG1wIe3+Vtg3IrSCVJDmqK3j8adrtzXSENRtFgg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.32.0", - "@typescript-eslint/type-utils": "8.32.0", - "@typescript-eslint/utils": "8.32.0", - "@typescript-eslint/visitor-keys": "8.32.0", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/type-utils": "8.32.1", + "@typescript-eslint/utils": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "graphemer": "^1.4.0", - "ignore": "^5.3.1", + "ignore": "^7.0.0", "natural-compare": "^1.4.0", "ts-api-utils": "^2.1.0" }, @@ -1056,17 +1056,27 @@ "typescript": ">=4.8.4 <5.9.0" } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.4.tgz", + "integrity": "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/@typescript-eslint/parser": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.32.0.tgz", - "integrity": "sha512-B2MdzyWxCE2+SqiZHAjPphft+/2x2FlO9YBx7eKE1BCb+rqBlQdhtAEhzIEdozHd55DXPmxBdpMygFJjfjjA9A==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.32.1.tgz", + "integrity": "sha512-LKMrmwCPoLhM45Z00O1ulb6jwyVr2kr3XJp+G+tSEZcbauNnScewcQwtJqXDhXeYPDEjZ8C1SjXm015CirEmGg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.32.0", - "@typescript-eslint/types": "8.32.0", - "@typescript-eslint/typescript-estree": "8.32.0", - "@typescript-eslint/visitor-keys": "8.32.0", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/typescript-estree": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "debug": "^4.3.4" }, "engines": { @@ -1082,14 +1092,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.32.0.tgz", - "integrity": "sha512-jc/4IxGNedXkmG4mx4nJTILb6TMjL66D41vyeaPWvDUmeYQzF3lKtN15WsAeTr65ce4mPxwopPSo1yUUAWw0hQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.32.1.tgz", + "integrity": "sha512-7IsIaIDeZn7kffk7qXC3o6Z4UblZJKV3UBpkvRNpr5NSyLji7tvTcvmnMNYuYLyh26mN8W723xpo3i4MlD33vA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.32.0", - "@typescript-eslint/visitor-keys": "8.32.0" + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1100,14 +1110,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.32.0.tgz", - "integrity": "sha512-t2vouuYQKEKSLtJaa5bB4jHeha2HJczQ6E5IXPDPgIty9EqcJxpr1QHQ86YyIPwDwxvUmLfP2YADQ5ZY4qddZg==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.32.1.tgz", + "integrity": "sha512-mv9YpQGA8iIsl5KyUPi+FGLm7+bA4fgXaeRcFKRDRwDMu4iwrSHeDPipwueNXhdIIZltwCJv+NkxftECbIZWfA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.32.0", - "@typescript-eslint/utils": "8.32.0", + "@typescript-eslint/typescript-estree": "8.32.1", + "@typescript-eslint/utils": "8.32.1", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1124,9 +1134,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.32.0.tgz", - "integrity": "sha512-O5Id6tGadAZEMThM6L9HmVf5hQUXNSxLVKeGJYWNhhVseps/0LddMkp7//VDkzwJ69lPL0UmZdcZwggj9akJaA==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.32.1.tgz", + "integrity": "sha512-YmybwXUJcgGqgAp6bEsgpPXEg6dcCyPyCSr0CAAueacR/CCBi25G3V8gGQ2kRzQRBNol7VQknxMs9HvVa9Rvfg==", "dev": true, "license": "MIT", "engines": { @@ -1138,14 +1148,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.32.0.tgz", - "integrity": "sha512-pU9VD7anSCOIoBFnhTGfOzlVFQIA1XXiQpH/CezqOBaDppRwTglJzCC6fUQGpfwey4T183NKhF1/mfatYmjRqQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.32.1.tgz", + "integrity": "sha512-Y3AP9EIfYwBb4kWGb+simvPaqQoT5oJuzzj9m0i6FCY6SPvlomY2Ei4UEMm7+FXtlNJbor80ximyslzaQF6xhg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.32.0", - "@typescript-eslint/visitor-keys": "8.32.0", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1165,16 +1175,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.32.0.tgz", - "integrity": "sha512-8S9hXau6nQ/sYVtC3D6ISIDoJzS1NsCK+gluVhLN2YkBPX+/1wkwyUiDKnxRh15579WoOIyVWnoyIf3yGI9REw==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.32.1.tgz", + "integrity": "sha512-DsSFNIgLSrc89gpq1LJB7Hm1YpuhK086DRDJSNrewcGvYloWW1vZLHBTIvarKZDcAORIy/uWNx8Gad+4oMpkSA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.32.0", - "@typescript-eslint/types": "8.32.0", - "@typescript-eslint/typescript-estree": "8.32.0" + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/typescript-estree": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1189,13 +1199,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.32.0.tgz", - "integrity": "sha512-1rYQTCLFFzOI5Nl0c8LUpJT8HxpwVRn9E4CkMsYfuN6ctmQqExjSTzzSk0Tz2apmXy7WU6/6fyaZVVA/thPN+w==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.32.1.tgz", + "integrity": "sha512-ar0tjQfObzhSaW3C3QNmTc5ofj0hDoNQ5XWrCy6zDyabdr0TWhCkClp+rywGNj/odAFBVzzJrK4tEq5M4Hmu4w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.32.0", + "@typescript-eslint/types": "8.32.1", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -4508,15 +4518,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.32.0.tgz", - "integrity": "sha512-UMq2kxdXCzinFFPsXc9o2ozIpYCCOiEC46MG3yEh5Vipq6BO27otTtEBZA1fQ66DulEUgE97ucQ/3YY66CPg0A==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.32.1.tgz", + "integrity": "sha512-D7el+eaDHAmXvrZBy1zpzSNIRqnCOrkwTgZxTu3MUqRWk8k0q9m9Ho4+vPf7iHtgUfrK/o8IZaEApsxPlHTFCg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.32.0", - "@typescript-eslint/parser": "8.32.0", - "@typescript-eslint/utils": "8.32.0" + "@typescript-eslint/eslint-plugin": "8.32.1", + "@typescript-eslint/parser": "8.32.1", + "@typescript-eslint/utils": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" From ee60f291cf8edaaca148e93a69f26a53edf4a056 Mon Sep 17 00:00:00 2001 From: Tim Schrodi Date: Tue, 13 May 2025 12:54:22 +0200 Subject: [PATCH 011/111] feat: add model registry to object serializer --- src/serializer.ts | 167 +++++++++++++++++++++++++++++++----- src/serializer_test.ts | 187 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 331 insertions(+), 23 deletions(-) diff --git a/src/serializer.ts b/src/serializer.ts index 29c3fc144e..919a5df082 100644 --- a/src/serializer.ts +++ b/src/serializer.ts @@ -1,5 +1,13 @@ import { ObjectSerializer as InternalSerializer, V1ObjectMeta } from './gen/models/ObjectSerializer.js'; +type KubernetesObjectHeader = { + apiVersion: string; + kind: string; +}; + +const isKubernetesObject = (data: unknown): data is KubernetesObjectHeader => + !!data && typeof data === 'object' && 'apiVersion' in data && 'kind' in data; + type AttributeType = { name: string; baseName: string; @@ -38,30 +46,38 @@ class KubernetesObject { format: '', }, ]; -} - -const isKubernetesObject = (data: unknown): boolean => - !!data && typeof data === 'object' && 'apiVersion' in data && 'kind' in data; -/** - * Wraps the ObjectSerializer to support custom resources and generic Kubernetes objects. - */ -export class ObjectSerializer extends InternalSerializer { - public static serialize(data: any, type: string, format: string = ''): any { - const obj = InternalSerializer.serialize(data, type, format); - if (obj !== data) { - return obj; + public serialize(): any { + const instance: Record = {}; + for (const attributeType of KubernetesObject.attributeTypeMap) { + const value = this[attributeType.baseName]; + if (value !== undefined) { + instance[attributeType.name] = InternalSerializer.serialize( + this[attributeType.baseName], + attributeType.type, + attributeType.format, + ); + } + } + // add all unknown properties as is. + for (const [key, value] of Object.entries(this)) { + if (KubernetesObject.attributeTypeMap.find((t) => t.name === key)) { + continue; + } + instance[key] = value; } + return instance; + } + public static fromUnknown(data: unknown): KubernetesObject { if (!isKubernetesObject(data)) { - return obj; + throw new Error(`Unable to deseriliaze non-Kubernetes object ${data}.`); } - - const instance: Record = {}; + const instance = new KubernetesObject(); for (const attributeType of KubernetesObject.attributeTypeMap) { const value = data[attributeType.baseName]; if (value !== undefined) { - instance[attributeType.name] = InternalSerializer.serialize( + instance[attributeType.name] = InternalSerializer.deserialize( data[attributeType.baseName], attributeType.type, attributeType.format, @@ -77,11 +93,102 @@ export class ObjectSerializer extends InternalSerializer { } return instance; } +} - public static deserialize(data: any, type: string, format: string = ''): any { - const obj = InternalSerializer.deserialize(data, type, format); +export interface Serializer { + serialize(data: any, type: string, format?: string): any; + deserialize(data: any, type: string, format?): any; +} + +export type GroupVersionKind = { + group: string; + version: string; + kind: string; +}; + +type ModelRegistry = { + [gv: string]: { + [kind: string]: Serializer; + }; +}; + +const gvString = ({ group, version }: GroupVersionKind): string => [group, version].join('/'); + +const gvkFromObject = (obj: KubernetesObjectHeader): GroupVersionKind => { + const [g, v] = obj.apiVersion.split('/'); + return { + kind: obj.kind, + group: v ? g : '', + version: v ? v : g, + }; +}; + +/** + * Default serializer that uses the KubernetesObject to serialize and deserialize + * any object using only the minimum required attributes. + */ +export const defaultSerializer: Serializer = { + serialize: (data: any, type: string, format?: string): any => { + if (data instanceof KubernetesObject) { + return data.serialize(); + } + return KubernetesObject.fromUnknown(data).serialize(); + }, + deserialize: (data: any, type: string, format?): any => { + return KubernetesObject.fromUnknown(data); + }, +}; + +/** + * Wraps the ObjectSerializer to support custom resources and generic Kubernetes objects. + * + * CustomResources that are unknown to the ObjectSerializer can be registered + * by using ObjectSerializer.registerModel(). + */ +export class ObjectSerializer extends InternalSerializer { + private static modelRegistry: ModelRegistry = {}; + + /** + * Adds a dedicated seriliazer for a Kubernetes resource. + * Every resource is uniquly identified using its group, version and kind. + * @param gvk + * @param serializer + */ + public static registerModel(gvk: GroupVersionKind, serializer: Serializer) { + const gv = gvString(gvk); + const kinds = (this.modelRegistry[gv] ??= {}); + if (kinds[gvk.kind]) { + throw new Error(`Kind ${gvk.kind} of ${gv} is already defined`); + } + kinds[gvk.kind] = serializer; + } + + /** + * Removes all registered models from the registry. + */ + public static clearModelRegistry(): void { + this.modelRegistry = {}; + } + + private static getSerializerForObject(obj: unknown): undefined | Serializer { + if (!isKubernetesObject(obj)) { + return undefined; + } + const gvk = gvkFromObject(obj); + return ObjectSerializer.modelRegistry[gvString(gvk)]?.[gvk.kind]; + } + + public static serialize(data: any, type: string, format: string = ''): any { + const serializer = ObjectSerializer.getSerializerForObject(data); + if (serializer) { + return serializer.serialize(data, type, format); + } + if (data instanceof KubernetesObject) { + return data.serialize(); + } + + const obj = InternalSerializer.serialize(data, type, format); if (obj !== data) { - // the serializer knows the type and already deserialized it. return obj; } @@ -89,11 +196,11 @@ export class ObjectSerializer extends InternalSerializer { return obj; } - const instance = new KubernetesObject(); + const instance: Record = {}; for (const attributeType of KubernetesObject.attributeTypeMap) { const value = data[attributeType.baseName]; if (value !== undefined) { - instance[attributeType.name] = InternalSerializer.deserialize( + instance[attributeType.name] = InternalSerializer.serialize( data[attributeType.baseName], attributeType.type, attributeType.format, @@ -109,4 +216,22 @@ export class ObjectSerializer extends InternalSerializer { } return instance; } + + public static deserialize(data: any, type: string, format: string = ''): any { + const serializer = ObjectSerializer.getSerializerForObject(data); + if (serializer) { + return serializer.deserialize(data, type, format); + } + const obj = InternalSerializer.deserialize(data, type, format); + if (obj !== data) { + // the serializer knows the type and already deserialized it. + return obj; + } + + if (!isKubernetesObject(data)) { + return obj; + } + + return KubernetesObject.fromUnknown(data); + } } diff --git a/src/serializer_test.ts b/src/serializer_test.ts index 9ed7d5be97..a0976d0293 100644 --- a/src/serializer_test.ts +++ b/src/serializer_test.ts @@ -1,8 +1,31 @@ -import { describe, it } from 'node:test'; +import { afterEach, beforeEach, describe, it } from 'node:test'; import { deepEqual, deepStrictEqual } from 'node:assert'; -import { ObjectSerializer } from './serializer.js'; +import { defaultSerializer, ObjectSerializer } from './serializer.js'; describe('ObjectSerializer', () => { + beforeEach(() => { + ObjectSerializer.registerModel( + { + group: 'my-group.io', + version: 'v1', + kind: 'V1MyCustomResource', + }, + defaultSerializer, + ); + ObjectSerializer.registerModel( + { + group: 'my-group.io', + version: 'v1', + kind: 'Deployment', + }, + defaultSerializer, + ); + }); + + afterEach(() => { + ObjectSerializer.clearModelRegistry(); + }); + describe('serialize', () => { it('should serialize a known object', () => { const s = { @@ -47,6 +70,98 @@ describe('ObjectSerializer', () => { }); }); + [ + { + name: 'should serialize a registered custom object', + input: { + type: 'V1MyCustomResource', + obj: { + apiVersion: 'my-group.io/v1', + kind: 'MyCustomResource', + metadata: { + name: 'k8s-js-client-test', + namespace: 'default', + creationTimestamp: new Date('2022-01-01T00:00:00.000Z'), + }, + data: { + key: 'value', + }, + }, + }, + expected: { + apiVersion: 'my-group.io/v1', + kind: 'MyCustomResource', + metadata: { + name: 'k8s-js-client-test', + namespace: 'default', + creationTimestamp: '2022-01-01T00:00:00.000Z', + uid: undefined, + annotations: undefined, + labels: undefined, + finalizers: undefined, + generateName: undefined, + selfLink: undefined, + resourceVersion: undefined, + generation: undefined, + ownerReferences: undefined, + deletionTimestamp: undefined, + deletionGracePeriodSeconds: undefined, + managedFields: undefined, + }, + data: { + key: 'value', + }, + }, + }, + { + name: 'should serialize a registered custom object with a duplicated core resource kind', + input: { + type: 'V1Deployment', + obj: { + apiVersion: 'my-group.io/v1', + kind: 'Deployment', + metadata: { + name: 'k8s-js-client-test', + namespace: 'default', + creationTimestamp: new Date('2022-01-01T00:00:00.000Z'), + }, + data: { + key: 'value', + }, + }, + }, + expected: { + apiVersion: 'my-group.io/v1', + kind: 'Deployment', + metadata: { + name: 'k8s-js-client-test', + namespace: 'default', + creationTimestamp: '2022-01-01T00:00:00.000Z', + uid: undefined, + annotations: undefined, + labels: undefined, + finalizers: undefined, + generateName: undefined, + selfLink: undefined, + resourceVersion: undefined, + generation: undefined, + ownerReferences: undefined, + deletionTimestamp: undefined, + deletionGracePeriodSeconds: undefined, + managedFields: undefined, + }, + data: { + key: 'value', + }, + }, + }, + ].forEach(({ name, input, expected }) => { + it(name, () => { + const res = ObjectSerializer.serialize(input.obj, input.type); + deepStrictEqual(res, expected); + }); + }); + it('should serialize a unknown kubernetes object', () => { const s = { apiVersion: 'v1alpha1', @@ -160,5 +275,73 @@ describe('ObjectSerializer', () => { const res = ObjectSerializer.serialize(s, 'unknown'); deepStrictEqual(res, s); }); + + [ + { + name: 'should deserialize a registered custom object', + input: { + type: 'V1MyCustomResource', + obj: { + apiVersion: 'my-group.io/v1', + kind: 'MyCustomResource', + metadata: { + name: 'k8s-js-client-test', + namespace: 'default', + creationTimestamp: '2022-01-01T00:00:00.000Z', + }, + data: { + key: 'value', + }, + }, + }, + expected: { + apiVersion: 'my-group.io/v1', + kind: 'MyCustomResource', + metadata: { + name: 'k8s-js-client-test', + namespace: 'default', + creationTimestamp: new Date('2022-01-01T00:00:00.000Z'), + }, + data: { + key: 'value', + }, + }, + }, + { + name: 'should deserialize a registered custom object with a duplicated core resource kind', + input: { + type: 'V1Deployment', + obj: { + apiVersion: 'my-group.io/v1', + kind: 'Deployment', + metadata: { + name: 'k8s-js-client-test', + namespace: 'default', + creationTimestamp: '2022-01-01T00:00:00.000Z', + }, + data: { + key: 'value', + }, + }, + }, + expected: { + apiVersion: 'my-group.io/v1', + kind: 'Deployment', + metadata: { + name: 'k8s-js-client-test', + namespace: 'default', + creationTimestamp: new Date('2022-01-01T00:00:00.000Z'), + }, + data: { + key: 'value', + }, + }, + }, + ].forEach(({ name, input, expected }) => { + it(name, () => { + const res = ObjectSerializer.deserialize(input.obj, input.type); + deepEqual(res, expected); + }); + }); }); }); From 5befb92a032179da768b35b790b688ca0bf658e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 May 2025 02:57:31 +0000 Subject: [PATCH 012/111] build(deps): bump @types/node from 22.15.17 to 22.15.18 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.17 to 22.15.18. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.18 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c272ac0e7c..5c7a079519 100644 --- a/package-lock.json +++ b/package-lock.json @@ -992,9 +992,9 @@ } }, "node_modules/@types/node": { - "version": "22.15.17", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.17.tgz", - "integrity": "sha512-wIX2aSZL5FE+MR0JlvF87BNVrtFWf6AE6rxSE9X7OwnVvoyCQjpzSRJ+M87se/4QCkCiebQAqrJ0y6fwIyi7nw==", + "version": "22.15.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.18.tgz", + "integrity": "sha512-v1DKRfUdyW+jJhZNEI1PYy29S2YRxMV5AOO/x/SjKmW0acCIOqmbj6Haf9eHAhsPmrhlHSxEhv/1WszcLWV4cg==", "license": "MIT", "dependencies": { "undici-types": "~6.21.0" From 808cc5e2fc3a794c4f01c290e23453f4534298be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 02:36:23 +0000 Subject: [PATCH 013/111] build(deps-dev): bump @eslint/js from 9.26.0 to 9.27.0 Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.26.0 to 9.27.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/commits/v9.27.0/packages/js) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-version: 9.27.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5c7a079519..29f859e1eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -631,13 +631,16 @@ } }, "node_modules/@eslint/js": { - "version": "9.26.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.26.0.tgz", - "integrity": "sha512-I9XlJawFdSMvWjDt6wksMCrgns5ggLNfFwFvnShsleWruvXM514Qxk8V246efTw+eo9JABvVz+u3q2RiAowKxQ==", + "version": "9.27.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.27.0.tgz", + "integrity": "sha512-G5JD9Tu5HJEu4z2Uo4aHY2sLV64B7CDMXxFzqzjl3NKd6RVzSXNoE80jk7Y0lJkTTkjiIhBAqmlYwjuBY3tvpA==", "dev": true, "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" } }, "node_modules/@eslint/object-schema": { @@ -2117,6 +2120,16 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/@eslint/js": { + "version": "9.26.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.26.0.tgz", + "integrity": "sha512-I9XlJawFdSMvWjDt6wksMCrgns5ggLNfFwFvnShsleWruvXM514Qxk8V246efTw+eo9JABvVz+u3q2RiAowKxQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", From 9cb1bbb7c5a79036e47c07cd8196c8e399c32aed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 02:36:30 +0000 Subject: [PATCH 014/111] build(deps): bump @types/node from 22.15.18 to 22.15.19 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.18 to 22.15.19. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.19 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5c7a079519..70d75e1a18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -992,9 +992,9 @@ } }, "node_modules/@types/node": { - "version": "22.15.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.18.tgz", - "integrity": "sha512-v1DKRfUdyW+jJhZNEI1PYy29S2YRxMV5AOO/x/SjKmW0acCIOqmbj6Haf9eHAhsPmrhlHSxEhv/1WszcLWV4cg==", + "version": "22.15.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.19.tgz", + "integrity": "sha512-3vMNr4TzNQyjHcRZadojpRaD9Ofr6LsonZAoQ+HMUa/9ORTPoxVIw0e0mpqWpdjj8xybyCM+oKOUH2vwFu/oEw==", "license": "MIT", "dependencies": { "undici-types": "~6.21.0" From 9677b5a2be431ee7c687de5f5f04346f41ee7a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Str=C3=BCbing?= Date: Mon, 19 May 2025 09:07:32 +0000 Subject: [PATCH 015/111] chore: readd ws as a dependency It seems like people having issues due to the removal of ws https://github.com/kubernetes-client/javascript/commit/b727c7be7fc7c7a8cb5663d6d621d92027d47fc1\#r156475449 It would be good if there would be another way than to reintroduce the dependency but I don't really know how and at the same time I don't think it's good to have every consumer install ws separately. --- package-lock.json | 10 +++++----- package.json | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5c7a079519..1dd437de2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,8 @@ "rfc4648": "^1.3.0", "socks-proxy-agent": "^8.0.4", "stream-buffers": "^3.0.2", - "tar-fs": "^3.0.8" + "tar-fs": "^3.0.8", + "ws": "^8.18.2" }, "devDependencies": { "@eslint/js": "^9.18.0", @@ -4742,11 +4743,10 @@ "license": "ISC" }, "node_modules/ws": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", - "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", + "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=10.0.0" }, diff --git a/package.json b/package.json index 4d3feb52aa..2e6f36a029 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,8 @@ "rfc4648": "^1.3.0", "socks-proxy-agent": "^8.0.4", "stream-buffers": "^3.0.2", - "tar-fs": "^3.0.8" + "tar-fs": "^3.0.8", + "ws": "^8.18.2" }, "devDependencies": { "@eslint/js": "^9.18.0", From 31b296711b10b4cdab212f3d5748788bb620f8a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 09:10:14 +0000 Subject: [PATCH 016/111] build(deps-dev): bump eslint from 9.26.0 to 9.27.0 Bumps [eslint](https://github.com/eslint/eslint) from 9.26.0 to 9.27.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.26.0...v9.27.0) --- updated-dependencies: - dependency-name: eslint dependency-version: 9.27.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 888 +--------------------------------------------- 1 file changed, 14 insertions(+), 874 deletions(-) diff --git a/package-lock.json b/package-lock.json index a78d3f257c..a9f5d87f78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -570,9 +570,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.13.0.tgz", - "integrity": "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", + "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -654,13 +654,13 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.8.tgz", - "integrity": "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz", + "integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.13.0", + "@eslint/core": "^0.14.0", "levn": "^0.4.1" }, "engines": { @@ -827,28 +827,6 @@ "jsep": "^0.4.0||^1.0.0" } }, - "node_modules/@modelcontextprotocol/sdk": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.11.0.tgz", - "integrity": "sha512-k/1pb70eD638anoi0e8wUGAlbMJXyvdV4p62Ko+EZ7eBe1xMx8Uhak1R5DgfoofsK5IBBnRwsYGTaLZl+6/+RQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "content-type": "^1.0.5", - "cors": "^2.8.5", - "cross-spawn": "^7.0.3", - "eventsource": "^3.0.2", - "express": "^5.0.1", - "express-rate-limit": "^7.5.0", - "pkce-challenge": "^5.0.0", - "raw-body": "^3.0.0", - "zod": "^3.23.8", - "zod-to-json-schema": "^3.24.1" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1219,43 +1197,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/accepts": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", - "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-types": "^3.0.0", - "negotiator": "^1.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/accepts/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/accepts/node_modules/mime-types": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", - "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/acorn": { "version": "8.14.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", @@ -1431,27 +1372,6 @@ } } }, - "node_modules/body-parser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz", - "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "^3.1.2", - "content-type": "^1.0.5", - "debug": "^4.4.0", - "http-errors": "^2.0.0", - "iconv-lite": "^0.6.3", - "on-finished": "^2.4.1", - "qs": "^6.14.0", - "raw-body": "^3.0.0", - "type-is": "^2.0.0" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -1475,16 +1395,6 @@ "node": ">=8" } }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/c8": { "version": "10.1.3", "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.3.tgz", @@ -1542,23 +1452,6 @@ "node": ">= 0.4" } }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1703,29 +1596,6 @@ "dev": true, "license": "MIT" }, - "node_modules/content-disposition": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", - "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -1733,40 +1603,6 @@ "dev": true, "license": "MIT" }, - "node_modules/cookie": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", - "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.6.0" - } - }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -1815,16 +1651,6 @@ "node": ">=0.4.0" } }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -1846,13 +1672,6 @@ "dev": true, "license": "MIT" }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true, - "license": "MIT" - }, "node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", @@ -1860,16 +1679,6 @@ "dev": true, "license": "MIT" }, - "node_modules/encodeurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", - "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -1988,13 +1797,6 @@ "node": ">=6" } }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true, - "license": "MIT" - }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -2009,9 +1811,9 @@ } }, "node_modules/eslint": { - "version": "9.26.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.26.0.tgz", - "integrity": "sha512-Hx0MOjPh6uK9oq9nVsATZKE/Wlbai7KFjfCuw9UHaguDW3x+HF0O5nIi3ud39TWgrTjTO5nHxmL3R1eANinWHQ==", + "version": "9.27.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.27.0.tgz", + "integrity": "sha512-ixRawFQuMB9DZ7fjU3iGGganFDp3+45bPOdaRurcFHSXO1e/sYwUX/FtQZpLZJR6SjMoJH8hR2pPEAfDyCoU2Q==", "dev": true, "license": "MIT", "dependencies": { @@ -2019,14 +1821,13 @@ "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.20.0", "@eslint/config-helpers": "^0.2.1", - "@eslint/core": "^0.13.0", + "@eslint/core": "^0.14.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.26.0", - "@eslint/plugin-kit": "^0.2.8", + "@eslint/js": "9.27.0", + "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", - "@modelcontextprotocol/sdk": "^1.8.0", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", @@ -2050,8 +1851,7 @@ "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "zod": "^3.24.2" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" @@ -2120,16 +1920,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@eslint/js": { - "version": "9.26.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.26.0.tgz", - "integrity": "sha512-I9XlJawFdSMvWjDt6wksMCrgns5ggLNfFwFvnShsleWruvXM514Qxk8V246efTw+eo9JABvVz+u3q2RiAowKxQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2218,121 +2008,6 @@ "node": ">=0.10.0" } }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/eventsource": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.6.tgz", - "integrity": "sha512-l19WpE2m9hSuyP06+FbuUUf1G+R0SFLrtQfbRb9PRr+oimOfxQhgGCbVaXg5IvZyyTThJsxh6L/srkMiCeBPDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eventsource-parser": "^3.0.1" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/eventsource-parser": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.1.tgz", - "integrity": "sha512-VARTJ9CYeuQYb0pZEPbzi740OWFgpHe7AYJ2WFZVnUDUQp5Dk2yJUgF36YsZ81cOyxT0QxmXD2EQpapAouzWVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/express": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz", - "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==", - "dev": true, - "license": "MIT", - "dependencies": { - "accepts": "^2.0.0", - "body-parser": "^2.2.0", - "content-disposition": "^1.0.0", - "content-type": "^1.0.5", - "cookie": "^0.7.1", - "cookie-signature": "^1.2.1", - "debug": "^4.4.0", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "etag": "^1.8.1", - "finalhandler": "^2.1.0", - "fresh": "^2.0.0", - "http-errors": "^2.0.0", - "merge-descriptors": "^2.0.0", - "mime-types": "^3.0.0", - "on-finished": "^2.4.1", - "once": "^1.4.0", - "parseurl": "^1.3.3", - "proxy-addr": "^2.0.7", - "qs": "^6.14.0", - "range-parser": "^1.2.1", - "router": "^2.2.0", - "send": "^1.1.0", - "serve-static": "^2.2.0", - "statuses": "^2.0.1", - "type-is": "^2.0.1", - "vary": "^1.1.2" - }, - "engines": { - "node": ">= 18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/express-rate-limit": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.0.tgz", - "integrity": "sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://github.com/sponsors/express-rate-limit" - }, - "peerDependencies": { - "express": "^4.11 || 5 || ^5.0.0-beta.1" - } - }, - "node_modules/express/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express/node_modules/mime-types": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", - "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2426,24 +2101,6 @@ "node": ">=8" } }, - "node_modules/finalhandler": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz", - "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.4.0", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "on-finished": "^2.4.1", - "parseurl": "^1.3.3", - "statuses": "^2.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -2514,26 +2171,6 @@ "node": ">= 6" } }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", - "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -2759,23 +2396,6 @@ "dev": true, "license": "MIT" }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/husky": { "version": "9.1.7", "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", @@ -2792,19 +2412,6 @@ "url": "https://github.com/sponsors/typicode" } }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -2842,13 +2449,6 @@ "node": ">=0.8.19" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, "node_modules/ip-address": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", @@ -2862,16 +2462,6 @@ "node": ">= 12" } }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2915,13 +2505,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-promise": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", - "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", - "dev": true, - "license": "MIT" - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3203,29 +2786,6 @@ "dev": true, "license": "MIT" }, - "node_modules/media-typer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", - "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/merge-descriptors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", - "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -3320,16 +2880,6 @@ "dev": true, "license": "MIT" }, - "node_modules/negotiator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", - "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/nock": { "version": "13.5.6", "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.6.tgz", @@ -3374,42 +2924,6 @@ "url": "https://github.com/sponsors/panva" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -3502,16 +3016,6 @@ "node": ">=6" } }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -3559,16 +3063,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/path-to-regexp": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", - "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - } - }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -3589,16 +3083,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pkce-challenge": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.0.tgz", - "integrity": "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16.20.0" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -3683,20 +3167,6 @@ "node": ">= 8" } }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/pump": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", @@ -3727,22 +3197,6 @@ "node": ">=6" } }, - "node_modules/qs": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", - "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -3764,32 +3218,6 @@ ], "license": "MIT" }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", - "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.6.3", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -3837,23 +3265,6 @@ "integrity": "sha512-rRg/6Lb+IGfJqO05HZkN50UtY7K/JhxJag1kP23+zyMfrvoB0B7RWv06MbOzoc79RgCdNTiUaNsTT1AJZ7Z+cg==", "license": "MIT" }, - "node_modules/router": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", - "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.4.0", - "depd": "^2.0.0", - "is-promise": "^4.0.0", - "parseurl": "^1.3.3", - "path-to-regexp": "^8.0.0" - }, - "engines": { - "node": ">= 18" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -3878,34 +3289,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true, - "license": "MIT" - }, "node_modules/semver": { "version": "7.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", @@ -3919,75 +3302,6 @@ "node": ">=10" } }, - "node_modules/send": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", - "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.3.5", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "etag": "^1.8.1", - "fresh": "^2.0.0", - "http-errors": "^2.0.0", - "mime-types": "^3.0.1", - "ms": "^2.1.3", - "on-finished": "^2.4.1", - "range-parser": "^1.2.1", - "statuses": "^2.0.1" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/send/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/send/node_modules/mime-types": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", - "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-static": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz", - "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "parseurl": "^1.3.3", - "send": "^1.2.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true, - "license": "ISC" - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -4011,82 +3325,6 @@ "node": ">=8" } }, - "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", @@ -4144,16 +3382,6 @@ "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", "license": "BSD-3-Clause" }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/stream-buffers": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-3.0.3.tgz", @@ -4375,16 +3603,6 @@ "node": ">=8.0" } }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -4454,44 +3672,6 @@ "node": ">= 0.8.0" } }, - "node_modules/type-is": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", - "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", - "dev": true, - "license": "MIT", - "dependencies": { - "content-type": "^1.0.5", - "media-typer": "^1.1.0", - "mime-types": "^3.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/type-is/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/type-is/node_modules/mime-types": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", - "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/typedoc": { "version": "0.28.4", "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.4.tgz", @@ -4566,16 +3746,6 @@ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "license": "MIT" }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -4601,16 +3771,6 @@ "node": ">=10.12.0" } }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -4885,26 +4045,6 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } - }, - "node_modules/zod": { - "version": "3.24.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.4.tgz", - "integrity": "sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/zod-to-json-schema": { - "version": "3.24.5", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.5.tgz", - "integrity": "sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==", - "dev": true, - "license": "ISC", - "peerDependencies": { - "zod": "^3.24.1" - } } } } From 252dd388665eb83159eba907148bc55029de2160 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 02:34:56 +0000 Subject: [PATCH 017/111] build(deps): bump @types/node from 22.15.19 to 22.15.21 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.19 to 22.15.21. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.21 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index bdff82ebd5..f566944258 100644 --- a/package-lock.json +++ b/package-lock.json @@ -974,9 +974,9 @@ } }, "node_modules/@types/node": { - "version": "22.15.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.19.tgz", - "integrity": "sha512-3vMNr4TzNQyjHcRZadojpRaD9Ofr6LsonZAoQ+HMUa/9ORTPoxVIw0e0mpqWpdjj8xybyCM+oKOUH2vwFu/oEw==", + "version": "22.15.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.21.tgz", + "integrity": "sha512-EV/37Td6c+MgKAbkcLG6vqZ2zEYHD7bvSrzqqs2RIhbA6w3x+Dqz8MZM3sP6kGTeLrdoOgKZe+Xja7tUB2DNkQ==", "license": "MIT", "dependencies": { "undici-types": "~6.21.0" From 06123603f8ac5cdc438efd0dba224d13566ca37f Mon Sep 17 00:00:00 2001 From: Gustav Bylund Date: Thu, 22 May 2025 15:42:30 +0200 Subject: [PATCH 018/111] fix: readd AbortError export This was removed in https://github.com/kubernetes-client/javascript/pull/2062 --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 10fb300ede..fb6b1bba01 100644 --- a/src/index.ts +++ b/src/index.ts @@ -19,5 +19,5 @@ export * from './middleware.js'; export * from './patch.js'; export { type ConfigOptions, type User, type Cluster, type Context } from './config_types.js'; -// Export FetchError so that instanceof checks in user code will definitely use the same instance -export { FetchError } from 'node-fetch'; +// Export AbortError and FetchError so that instanceof checks in user code will definitely use the same instances +export { AbortError, FetchError } from 'node-fetch'; From affa86abbe2f15a99bfaad8326c488deb664b6b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 02:12:56 +0000 Subject: [PATCH 019/111] build(deps): bump tar-fs from 3.0.8 to 3.0.9 Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 3.0.8 to 3.0.9. - [Commits](https://github.com/mafintosh/tar-fs/compare/v3.0.8...v3.0.9) --- updated-dependencies: - dependency-name: tar-fs dependency-version: 3.0.9 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f566944258..f83f857a17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3536,9 +3536,9 @@ } }, "node_modules/tar-fs": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.8.tgz", - "integrity": "sha512-ZoROL70jptorGAlgAYiLoBLItEKw/fUxg9BSYK/dF/GAGYFJOJJJMvjPAKDJraCXFwadD456FCuvLWgfhMsPwg==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.9.tgz", + "integrity": "sha512-XF4w9Xp+ZQgifKakjZYmFdkLoSWd34VGKcsTCwlNWM7QG3ZbaxnTsaBwnjFZqHRf/rROxaR8rXnbtwdvaDI+lA==", "license": "MIT", "dependencies": { "pump": "^3.0.0", From 52c1acfe03f6ddd473450e4f950c197595e171e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 02:12:28 +0000 Subject: [PATCH 020/111] build(deps-dev): bump typedoc from 0.28.4 to 0.28.5 Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.28.4 to 0.28.5. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.28.4...v0.28.5) --- updated-dependencies: - dependency-name: typedoc dependency-version: 0.28.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f83f857a17..9a8ccb0ade 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3674,9 +3674,9 @@ } }, "node_modules/typedoc": { - "version": "0.28.4", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.4.tgz", - "integrity": "sha512-xKvKpIywE1rnqqLgjkoq0F3wOqYaKO9nV6YkkSat6IxOWacUCc/7Es0hR3OPmkIqkPoEn7U3x+sYdG72rstZQA==", + "version": "0.28.5", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.5.tgz", + "integrity": "sha512-5PzUddaA9FbaarUzIsEc4wNXCiO4Ot3bJNeMF2qKpYlTmM9TTaSHQ7162w756ERCkXER/+o2purRG6YOAv6EMA==", "dev": true, "license": "Apache-2.0", "dependencies": { From 4846def72386b9f1c160b373d2b2a44e9ac3b069 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 27 May 2025 13:53:40 -0400 Subject: [PATCH 021/111] update package versions in preparation for release --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9a8ccb0ade..f6a9649793 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kubernetes/client-node", - "version": "1.2.0", + "version": "1.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@kubernetes/client-node", - "version": "1.2.0", + "version": "1.3.0", "license": "Apache-2.0", "dependencies": { "@types/js-yaml": "^4.0.1", diff --git a/package.json b/package.json index 2e6f36a029..36e5747468 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kubernetes/client-node", - "version": "1.2.0", + "version": "1.3.0", "description": "NodeJS client for kubernetes", "type": "module", "repository": { From adf25e2ee52ac0bc8adfeb78e001f15e7631d689 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 May 2025 02:49:09 +0000 Subject: [PATCH 022/111] build(deps): bump @types/node from 22.15.21 to 22.15.23 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.21 to 22.15.23. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.23 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f6a9649793..205e90166e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -974,9 +974,9 @@ } }, "node_modules/@types/node": { - "version": "22.15.21", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.21.tgz", - "integrity": "sha512-EV/37Td6c+MgKAbkcLG6vqZ2zEYHD7bvSrzqqs2RIhbA6w3x+Dqz8MZM3sP6kGTeLrdoOgKZe+Xja7tUB2DNkQ==", + "version": "22.15.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.23.tgz", + "integrity": "sha512-7Ec1zaFPF4RJ0eXu1YT/xgiebqwqoJz8rYPDi/O2BcZ++Wpt0Kq9cl0eg6NN6bYbPnR67ZLo7St5Q3UK0SnARw==", "license": "MIT", "dependencies": { "undici-types": "~6.21.0" From 55e1a8a70e84f27a809e98868f4f56fe0dd9c2f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 May 2025 02:49:27 +0000 Subject: [PATCH 023/111] build(deps-dev): bump typescript-eslint from 8.32.1 to 8.33.0 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.32.1 to 8.33.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.33.0/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-version: 8.33.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 136 +++++++++++++++++++++++++++++----------------- 1 file changed, 87 insertions(+), 49 deletions(-) diff --git a/package-lock.json b/package-lock.json index f6a9649793..9a9646db22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1009,17 +1009,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.32.1.tgz", - "integrity": "sha512-6u6Plg9nP/J1GRpe/vcjjabo6Uc5YQPAMxsgQyGC/I0RuukiG1wIe3+Vtg3IrSCVJDmqK3j8adrtzXSENRtFgg==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.33.0.tgz", + "integrity": "sha512-CACyQuqSHt7ma3Ns601xykeBK/rDeZa3w6IS6UtMQbixO5DWy+8TilKkviGDH6jtWCo8FGRKEK5cLLkPvEammQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.32.1", - "@typescript-eslint/type-utils": "8.32.1", - "@typescript-eslint/utils": "8.32.1", - "@typescript-eslint/visitor-keys": "8.32.1", + "@typescript-eslint/scope-manager": "8.33.0", + "@typescript-eslint/type-utils": "8.33.0", + "@typescript-eslint/utils": "8.33.0", + "@typescript-eslint/visitor-keys": "8.33.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -1033,7 +1033,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "@typescript-eslint/parser": "^8.33.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } @@ -1049,16 +1049,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.32.1.tgz", - "integrity": "sha512-LKMrmwCPoLhM45Z00O1ulb6jwyVr2kr3XJp+G+tSEZcbauNnScewcQwtJqXDhXeYPDEjZ8C1SjXm015CirEmGg==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.33.0.tgz", + "integrity": "sha512-JaehZvf6m0yqYp34+RVnihBAChkqeH+tqqhS0GuX1qgPpwLvmTPheKEs6OeCK6hVJgXZHJ2vbjnC9j119auStQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.32.1", - "@typescript-eslint/types": "8.32.1", - "@typescript-eslint/typescript-estree": "8.32.1", - "@typescript-eslint/visitor-keys": "8.32.1", + "@typescript-eslint/scope-manager": "8.33.0", + "@typescript-eslint/types": "8.33.0", + "@typescript-eslint/typescript-estree": "8.33.0", + "@typescript-eslint/visitor-keys": "8.33.0", "debug": "^4.3.4" }, "engines": { @@ -1073,15 +1073,34 @@ "typescript": ">=4.8.4 <5.9.0" } }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.33.0.tgz", + "integrity": "sha512-d1hz0u9l6N+u/gcrk6s6gYdl7/+pp8yHheRTqP6X5hVDKALEaTn8WfGiit7G511yueBEL3OpOEpD+3/MBdoN+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.33.0", + "@typescript-eslint/types": "^8.33.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.32.1.tgz", - "integrity": "sha512-7IsIaIDeZn7kffk7qXC3o6Z4UblZJKV3UBpkvRNpr5NSyLji7tvTcvmnMNYuYLyh26mN8W723xpo3i4MlD33vA==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.33.0.tgz", + "integrity": "sha512-LMi/oqrzpqxyO72ltP+dBSP6V0xiUb4saY7WLtxSfiNEBI8m321LLVFU9/QDJxjDQG9/tjSqKz/E3380TEqSTw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.32.1", - "@typescript-eslint/visitor-keys": "8.32.1" + "@typescript-eslint/types": "8.33.0", + "@typescript-eslint/visitor-keys": "8.33.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1091,15 +1110,32 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.33.0.tgz", + "integrity": "sha512-sTkETlbqhEoiFmGr1gsdq5HyVbSOF0145SYDJ/EQmXHtKViCaGvnyLqWFFHtEXoS0J1yU8Wyou2UGmgW88fEug==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" + } + }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.32.1.tgz", - "integrity": "sha512-mv9YpQGA8iIsl5KyUPi+FGLm7+bA4fgXaeRcFKRDRwDMu4iwrSHeDPipwueNXhdIIZltwCJv+NkxftECbIZWfA==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.33.0.tgz", + "integrity": "sha512-lScnHNCBqL1QayuSrWeqAL5GmqNdVUQAAMTaCwdYEdWfIrSrOGzyLGRCHXcCixa5NK6i5l0AfSO2oBSjCjf4XQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.32.1", - "@typescript-eslint/utils": "8.32.1", + "@typescript-eslint/typescript-estree": "8.33.0", + "@typescript-eslint/utils": "8.33.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1116,9 +1152,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.32.1.tgz", - "integrity": "sha512-YmybwXUJcgGqgAp6bEsgpPXEg6dcCyPyCSr0CAAueacR/CCBi25G3V8gGQ2kRzQRBNol7VQknxMs9HvVa9Rvfg==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.33.0.tgz", + "integrity": "sha512-DKuXOKpM5IDT1FA2g9x9x1Ug81YuKrzf4mYX8FAVSNu5Wo/LELHWQyM1pQaDkI42bX15PWl0vNPt1uGiIFUOpg==", "dev": true, "license": "MIT", "engines": { @@ -1130,14 +1166,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.32.1.tgz", - "integrity": "sha512-Y3AP9EIfYwBb4kWGb+simvPaqQoT5oJuzzj9m0i6FCY6SPvlomY2Ei4UEMm7+FXtlNJbor80ximyslzaQF6xhg==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.33.0.tgz", + "integrity": "sha512-vegY4FQoB6jL97Tu/lWRsAiUUp8qJTqzAmENH2k59SJhw0Th1oszb9Idq/FyyONLuNqT1OADJPXfyUNOR8SzAQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.32.1", - "@typescript-eslint/visitor-keys": "8.32.1", + "@typescript-eslint/project-service": "8.33.0", + "@typescript-eslint/tsconfig-utils": "8.33.0", + "@typescript-eslint/types": "8.33.0", + "@typescript-eslint/visitor-keys": "8.33.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1157,16 +1195,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.32.1.tgz", - "integrity": "sha512-DsSFNIgLSrc89gpq1LJB7Hm1YpuhK086DRDJSNrewcGvYloWW1vZLHBTIvarKZDcAORIy/uWNx8Gad+4oMpkSA==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.33.0.tgz", + "integrity": "sha512-lPFuQaLA9aSNa7D5u2EpRiqdAUhzShwGg/nhpBlc4GR6kcTABttCuyjFs8BcEZ8VWrjCBof/bePhP3Q3fS+Yrw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.32.1", - "@typescript-eslint/types": "8.32.1", - "@typescript-eslint/typescript-estree": "8.32.1" + "@typescript-eslint/scope-manager": "8.33.0", + "@typescript-eslint/types": "8.33.0", + "@typescript-eslint/typescript-estree": "8.33.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1181,13 +1219,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.32.1.tgz", - "integrity": "sha512-ar0tjQfObzhSaW3C3QNmTc5ofj0hDoNQ5XWrCy6zDyabdr0TWhCkClp+rywGNj/odAFBVzzJrK4tEq5M4Hmu4w==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.33.0.tgz", + "integrity": "sha512-7RW7CMYoskiz5OOGAWjJFxgb7c5UNjTG292gYhWeOAcFmYCtVCSqjqSBj5zMhxbXo2JOW95YYrUWJfU0zrpaGQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/types": "8.33.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -3712,15 +3750,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.32.1.tgz", - "integrity": "sha512-D7el+eaDHAmXvrZBy1zpzSNIRqnCOrkwTgZxTu3MUqRWk8k0q9m9Ho4+vPf7iHtgUfrK/o8IZaEApsxPlHTFCg==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.33.0.tgz", + "integrity": "sha512-5YmNhF24ylCsvdNW2oJwMzTbaeO4bg90KeGtMjUw0AGtHksgEPLRTUil+coHwCfiu4QjVJFnjp94DmU6zV7DhQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.32.1", - "@typescript-eslint/parser": "8.32.1", - "@typescript-eslint/utils": "8.32.1" + "@typescript-eslint/eslint-plugin": "8.33.0", + "@typescript-eslint/parser": "8.33.0", + "@typescript-eslint/utils": "8.33.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" From 055b83c6504dfd1b2a2d081efd974163c6cbb808 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 May 2025 00:10:51 -0400 Subject: [PATCH 024/111] build(deps): bump @types/node from 22.15.23 to 22.15.24 (#2459) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.23 to 22.15.24. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.24 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2668113ed2..e39101abba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -974,9 +974,9 @@ } }, "node_modules/@types/node": { - "version": "22.15.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.23.tgz", - "integrity": "sha512-7Ec1zaFPF4RJ0eXu1YT/xgiebqwqoJz8rYPDi/O2BcZ++Wpt0Kq9cl0eg6NN6bYbPnR67ZLo7St5Q3UK0SnARw==", + "version": "22.15.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.24.tgz", + "integrity": "sha512-w9CZGm9RDjzTh/D+hFwlBJ3ziUaVw7oufKA3vOFSOZlzmW9AkZnfjPb+DLnrV6qtgL/LNmP0/2zBNCFHL3F0ng==", "license": "MIT", "dependencies": { "undici-types": "~6.21.0" From 310dc151fe84190626650792d38bcbdae03571bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 May 2025 00:03:46 -0400 Subject: [PATCH 025/111] build(deps): bump @types/node from 22.15.24 to 22.15.26 (#2461) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.24 to 22.15.26. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.26 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e39101abba..f123df8c4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -974,9 +974,9 @@ } }, "node_modules/@types/node": { - "version": "22.15.24", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.24.tgz", - "integrity": "sha512-w9CZGm9RDjzTh/D+hFwlBJ3ziUaVw7oufKA3vOFSOZlzmW9AkZnfjPb+DLnrV6qtgL/LNmP0/2zBNCFHL3F0ng==", + "version": "22.15.26", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.26.tgz", + "integrity": "sha512-lgISkNrqdQ5DAzjBhnDNGKDuXDNo7/1V4FhNzsKREhWLZTOELQAptuAnJMzHtUl1qyEBBy9lNBKQ9WjyiSloTw==", "license": "MIT", "dependencies": { "undici-types": "~6.21.0" From 866065b7d3725983412b70f2f6bdcde4e9d317a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 02:30:44 +0000 Subject: [PATCH 026/111] build(deps-dev): bump pretty-quick from 4.1.1 to 4.2.0 Bumps [pretty-quick](https://github.com/prettier/pretty-quick) from 4.1.1 to 4.2.0. - [Release notes](https://github.com/prettier/pretty-quick/releases) - [Changelog](https://github.com/prettier/pretty-quick/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/pretty-quick/compare/v4.1.1...v4.2.0) --- updated-dependencies: - dependency-name: pretty-quick dependency-version: 4.2.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index f123df8c4c..4599a168a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -877,6 +877,19 @@ "node": ">=14" } }, + "node_modules/@pkgr/core": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.7.tgz", + "integrity": "sha512-YLT9Zo3oNPJoBjBc4q8G2mjU4tqIbf5CEOORbUUr48dCD9q3umJ3IPlVqOqDakPfd2HuwccBaqlGhN4Gmr5OWg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/pkgr" + } + }, "node_modules/@shikijs/engine-oniguruma": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.2.1.tgz", @@ -3149,18 +3162,18 @@ } }, "node_modules/pretty-quick": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-4.1.1.tgz", - "integrity": "sha512-9Ud0l/CspNTmyIdYac9X7Inb3o8fuUsw+1zJFvCGn+at0t1UwUcUdo2RSZ41gcmfLv1fxgWQxWEfItR7CBwugg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-4.2.0.tgz", + "integrity": "sha512-YHNtLadWFvdvqKhSqhgb9W1XC2pNAKHhXiy6NW1FVY7ogivjdWiZgTjIRLkQtRCBaDnT2eyTTOMkcYB6mkx1Ug==", "dev": true, "license": "MIT", "dependencies": { - "find-up": "^5.0.0", - "ignore": "^7.0.3", + "@pkgr/core": "^0.2.7", + "ignore": "^7.0.5", "mri": "^1.2.0", "picocolors": "^1.1.1", "picomatch": "^4.0.2", - "tinyexec": "^0.3.2", + "tinyexec": "^1.0.1", "tslib": "^2.8.1" }, "bin": { @@ -3169,14 +3182,17 @@ "engines": { "node": ">=14" }, + "funding": { + "url": "https://opencollective.com/pretty-quick" + }, "peerDependencies": { "prettier": "^3.0.0" } }, "node_modules/pretty-quick/node_modules/ignore": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.3.tgz", - "integrity": "sha512-bAH5jbK/F3T3Jls4I0SO1hmPR0dKU0a7+SY6n1yzRtG54FLO8d6w/nxLFX2Nb7dBu6cCWXPaAME6cYqFUMmuCA==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true, "license": "MIT", "engines": { @@ -3623,9 +3639,9 @@ } }, "node_modules/tinyexec": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", - "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.1.tgz", + "integrity": "sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==", "dev": true, "license": "MIT" }, From 384c30710c49c952f52acf565ab083cd48f8f3c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 02:30:51 +0000 Subject: [PATCH 027/111] build(deps-dev): bump nock from 13.5.6 to 14.0.5 Bumps [nock](https://github.com/nock/nock) from 13.5.6 to 14.0.5. - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v13.5.6...v14.0.5) --- updated-dependencies: - dependency-name: nock dependency-version: 14.0.5 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 76 +++++++++++++++++++++++++++++++++++++++++++---- package.json | 2 +- 2 files changed, 71 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index f123df8c4c..a04cf57782 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "eslint-plugin-erasable-syntax-only": "^0.3.0", "husky": "^9.0.6", "mock-fs": "^5.2.0", - "nock": "^13.2.9", + "nock": "^14.0.5", "prettier": "^3.0.0", "pretty-quick": "^4.0.0", "ts-mockito": "^2.3.1", @@ -828,6 +828,24 @@ "jsep": "^0.4.0||^1.0.0" } }, + "node_modules/@mswjs/interceptors": { + "version": "0.38.7", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.38.7.tgz", + "integrity": "sha512-Jkb27iSn7JPdkqlTqKfhncFfnEZsIJVYxsFbUSWEkxdIPdsyngrhoDBk0/BGD2FQcRH99vlRrkHpNTyKqI+0/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@open-draft/deferred-promise": "^2.2.0", + "@open-draft/logger": "^0.3.0", + "@open-draft/until": "^2.0.0", + "is-node-process": "^1.2.0", + "outvariant": "^1.4.3", + "strict-event-emitter": "^0.5.1" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -866,6 +884,31 @@ "node": ">= 8" } }, + "node_modules/@open-draft/deferred-promise": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz", + "integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@open-draft/logger": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@open-draft/logger/-/logger-0.3.0.tgz", + "integrity": "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-node-process": "^1.2.0", + "outvariant": "^1.4.0" + } + }, + "node_modules/@open-draft/until": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@open-draft/until/-/until-2.1.0.tgz", + "integrity": "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==", + "dev": true, + "license": "MIT" + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -2534,6 +2577,13 @@ "node": ">=0.10.0" } }, + "node_modules/is-node-process": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-node-process/-/is-node-process-1.2.0.tgz", + "integrity": "sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==", + "dev": true, + "license": "MIT" + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -2920,18 +2970,18 @@ "license": "MIT" }, "node_modules/nock": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.6.tgz", - "integrity": "sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ==", + "version": "14.0.5", + "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.5.tgz", + "integrity": "sha512-R49fALR9caB6vxuSWUIaK2eBYeTloZQUFBZ4rHO+TbhMGQHtwnhdqKLYki+o+8qMgLvoBYWrp/2KzGPhxL4S6w==", "dev": true, "license": "MIT", "dependencies": { - "debug": "^4.1.0", + "@mswjs/interceptors": "^0.38.7", "json-stringify-safe": "^5.0.1", "propagate": "^2.0.0" }, "engines": { - "node": ">= 10.13" + "node": ">=18.20.0 <20 || >=20.12.1" } }, "node_modules/node-fetch": { @@ -3003,6 +3053,13 @@ "node": ">= 0.8.0" } }, + "node_modules/outvariant": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz", + "integrity": "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==", + "dev": true, + "license": "MIT" + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -3443,6 +3500,13 @@ "bare-events": "^2.2.0" } }, + "node_modules/strict-event-emitter": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz", + "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==", + "dev": true, + "license": "MIT" + }, "node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", diff --git a/package.json b/package.json index 36e5747468..e06d586a8a 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "eslint-plugin-erasable-syntax-only": "^0.3.0", "husky": "^9.0.6", "mock-fs": "^5.2.0", - "nock": "^13.2.9", + "nock": "^14.0.5", "prettier": "^3.0.0", "pretty-quick": "^4.0.0", "ts-mockito": "^2.3.1", From f36114a6f8c6bf43b3212c1af05fcf9ab407792a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 00:29:53 -0400 Subject: [PATCH 028/111] build(deps-dev): bump @eslint/js from 9.27.0 to 9.28.0 (#2469) Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.27.0 to 9.28.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/commits/v9.28.0/packages/js) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-version: 9.28.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f123df8c4c..71c22e14d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -632,9 +632,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.27.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.27.0.tgz", - "integrity": "sha512-G5JD9Tu5HJEu4z2Uo4aHY2sLV64B7CDMXxFzqzjl3NKd6RVzSXNoE80jk7Y0lJkTTkjiIhBAqmlYwjuBY3tvpA==", + "version": "9.28.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.28.0.tgz", + "integrity": "sha512-fnqSjGWd/CoIp4EXIxWVK/sHA6DOHN4+8Ix2cX5ycOY7LG0UY8nHCU5pIp2eaE1Mc7Qd8kHspYNzYXT2ojPLzg==", "dev": true, "license": "MIT", "engines": { @@ -1959,6 +1959,19 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/@eslint/js": { + "version": "9.27.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.27.0.tgz", + "integrity": "sha512-G5JD9Tu5HJEu4z2Uo4aHY2sLV64B7CDMXxFzqzjl3NKd6RVzSXNoE80jk7Y0lJkTTkjiIhBAqmlYwjuBY3tvpA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", From 9ae92c76507df3c3eb299cf9cef609eff2b61d0d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 04:31:06 +0000 Subject: [PATCH 029/111] build(deps-dev): bump eslint from 9.27.0 to 9.28.0 Bumps [eslint](https://github.com/eslint/eslint) from 9.27.0 to 9.28.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.27.0...v9.28.0) --- updated-dependencies: - dependency-name: eslint dependency-version: 9.28.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 71c22e14d3..c25a67e56b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1850,9 +1850,9 @@ } }, "node_modules/eslint": { - "version": "9.27.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.27.0.tgz", - "integrity": "sha512-ixRawFQuMB9DZ7fjU3iGGganFDp3+45bPOdaRurcFHSXO1e/sYwUX/FtQZpLZJR6SjMoJH8hR2pPEAfDyCoU2Q==", + "version": "9.28.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.28.0.tgz", + "integrity": "sha512-ocgh41VhRlf9+fVpe7QKzwLj9c92fDiqOj8Y3Sd4/ZmVA4Btx4PlUYPq4pp9JDyupkf1upbEXecxL2mwNV7jPQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1862,7 +1862,7 @@ "@eslint/config-helpers": "^0.2.1", "@eslint/core": "^0.14.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.27.0", + "@eslint/js": "9.28.0", "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", @@ -1959,19 +1959,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@eslint/js": { - "version": "9.27.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.27.0.tgz", - "integrity": "sha512-G5JD9Tu5HJEu4z2Uo4aHY2sLV64B7CDMXxFzqzjl3NKd6RVzSXNoE80jk7Y0lJkTTkjiIhBAqmlYwjuBY3tvpA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - } - }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", From 364f69bf244b07c954173b5eeebf868811595324 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 00:39:11 -0400 Subject: [PATCH 030/111] build(deps): bump @types/node from 22.15.26 to 22.15.29 (#2468) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.26 to 22.15.29. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.29 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5d4c36d4de..d1a3683695 100644 --- a/package-lock.json +++ b/package-lock.json @@ -987,9 +987,9 @@ } }, "node_modules/@types/node": { - "version": "22.15.26", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.26.tgz", - "integrity": "sha512-lgISkNrqdQ5DAzjBhnDNGKDuXDNo7/1V4FhNzsKREhWLZTOELQAptuAnJMzHtUl1qyEBBy9lNBKQ9WjyiSloTw==", + "version": "22.15.29", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.29.tgz", + "integrity": "sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==", "license": "MIT", "dependencies": { "undici-types": "~6.21.0" From 9859c50ece3a05725790b46cbd1cd8fef4906648 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Mon, 2 Jun 2025 20:14:49 -0400 Subject: [PATCH 031/111] test: refactor several watch tests to not use nock This commit updates a few tests that do not work with the latest version of nock. This should unblock the nock update. --- src/watch_test.ts | 186 ++++++++++++++++------------------------------ 1 file changed, 62 insertions(+), 124 deletions(-) diff --git a/src/watch_test.ts b/src/watch_test.ts index 58252b1290..5bf842565d 100644 --- a/src/watch_test.ts +++ b/src/watch_test.ts @@ -5,7 +5,7 @@ import { PassThrough } from 'node:stream'; import { KubeConfig } from './config.js'; import { Cluster, Context, User } from './config_types.js'; import { Watch } from './watch.js'; -import { IncomingMessage, createServer } from 'node:http'; +import { ServerResponse, createServer } from 'node:http'; import { AddressInfo } from 'node:net'; const server = 'https://foo.company.com'; @@ -72,11 +72,7 @@ describe('Watch', () => { s.done(); }); - it('should not call watch done callback more than once', async () => { - const kc = new KubeConfig(); - Object.assign(kc, fakeConfig); - const watch = new Watch(kc); - + it('should not call watch done callback more than once', async (t) => { const obj1 = { type: 'ADDED', object: { @@ -93,26 +89,13 @@ describe('Watch', () => { const path = '/some/path/to/object'; - const stream = new PassThrough(); - - const [scope] = systemUnderTest(); - - let response: IncomingMessage | undefined; - - const s = scope - .get(path) - .query({ - watch: 'true', - a: 'b', - }) - .reply(200, function (): PassThrough { - this.req.on('response', (r) => { - response = r; - }); - stream.push(JSON.stringify(obj1) + '\n'); - stream.push(JSON.stringify(obj2) + '\n'); - return stream; - }); + let response: ServerResponse | undefined; + const kc = await setupMockSystem(t, (req, res) => { + response = res; + res.write(JSON.stringify(obj1) + '\n'); + res.write(JSON.stringify(obj2) + '\n'); + }); + const watch = new Watch(kc); const receivedTypes: string[] = []; const receivedObjects: string[] = []; @@ -154,57 +137,27 @@ describe('Watch', () => { deepStrictEqual(receivedObjects, [obj1.object, obj2.object]); strictEqual(doneCalled, 0); - - const errIn = new Error('err'); - (response as IncomingMessage).destroy(errIn); - + response!.destroy(); await donePromise; - strictEqual(doneCalled, 1); - deepStrictEqual(doneErr, errIn); - - s.done(); - - stream.destroy(); + strictEqual(doneErr.code, 'ERR_STREAM_PREMATURE_CLOSE'); }); - it('should not call the done callback more than once on unexpected connection loss', async () => { + it('should not call the done callback more than once on unexpected connection loss', async (t) => { // Create a server that accepts the connection and flushes headers, then // immediately destroys the connection (causing a "Premature close" // error). // // This reproduces a bug where AbortController.abort() inside // doneCallOnce could cause done() to be invoked twice. - - const mockServer = createServer((req, res) => { + const kc = await setupMockSystem(t, (req, res) => { res.writeHead(200, { 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', }); - res.flushHeaders(); res.destroy(); // Prematurely close the connection }); - - const mockServerPort = await new Promise((resolve) => { - mockServer.listen(0, () => { - resolve((mockServer.address() as AddressInfo).port); - }); - }); - - const kc = new KubeConfig(); - - kc.loadFromClusterAndUser( - { - name: 'cluster', - server: `http://localhost:${mockServerPort}`, - skipTLSVerify: true, - }, - { - name: 'user', - }, - ); - const watch = new Watch(kc); let doneCalled = 0; @@ -225,15 +178,15 @@ describe('Watch', () => { ); await donePromise; - - mockServer.close(); - strictEqual(doneCalled, 1); }); - it('should call setKeepAlive on the socket to extend the default of 5 mins', async () => { - const kc = new KubeConfig(); - + it('should call setKeepAlive on the socket to extend the default of 5 mins', async (t) => { + let response: ServerResponse | undefined; + const kc = await setupMockSystem(t, (req, res) => { + response = res; + res.write(JSON.stringify(obj1) + '\n'); + }); const mockSocket = { setKeepAlive: function (enable: boolean, timeout: number) { this.keepAliveEnabled = enable; @@ -242,16 +195,16 @@ describe('Watch', () => { keepAliveEnabled: false, keepAliveTimeout: 0, }; - Object.assign(kc, { - ...fakeConfig, - applyToFetchOptions: async () => ({ + + (kc as any).applyToFetchOptions = async () => { + return { agent: { sockets: { 'mock-url': [mockSocket], }, }, - }), - }); + }; + }; const watch = new Watch(kc); const obj1 = { @@ -262,27 +215,6 @@ describe('Watch', () => { }; const path = '/some/path/to/object'; - - const stream = new PassThrough(); - - const [scope] = systemUnderTest(); - - let response: IncomingMessage | undefined; - - const s = scope - .get(path) - .query({ - watch: 'true', - a: 'b', - }) - .reply(200, function (): PassThrough { - this.req.on('response', (r) => { - response = r; - }); - stream.push(JSON.stringify(obj1) + '\n'); - return stream; - }); - const receivedTypes: string[] = []; const receivedObjects: string[] = []; let doneCalled = 0; @@ -326,46 +258,28 @@ describe('Watch', () => { strictEqual(mockSocket.keepAliveEnabled, true); strictEqual(mockSocket.keepAliveTimeout, 30000); - const errIn = new Error('err'); - (response as IncomingMessage).destroy(errIn); + response!.destroy(); await donePromise; strictEqual(doneCalled, 1); - deepStrictEqual(doneErr, errIn); - - s.done(); - - stream.destroy(); + strictEqual(doneErr.code, 'ERR_STREAM_PREMATURE_CLOSE'); }); - it('should handle server errors correctly', async () => { - const kc = new KubeConfig(); - Object.assign(kc, fakeConfig); - const watch = new Watch(kc); - + it('should handle server errors correctly', async (t) => { const obj1 = { type: 'ADDED', object: { foo: 'bar', }, }; - - const stream = new PassThrough(); - - const [scope] = systemUnderTest(); - const path = '/some/path/to/object?watch=true'; - - let response: IncomingMessage | undefined; - - const s = scope.get(path).reply(200, function (): PassThrough { - this.req.on('response', (r) => { - response = r; - }); - stream.push(JSON.stringify(obj1) + '\n'); - return stream; + let response: ServerResponse | undefined; + const kc = await setupMockSystem(t, (req, res) => { + response = res; + res.write(JSON.stringify(obj1) + '\n'); }); + const watch = new Watch(kc); const receivedTypes: string[] = []; const receivedObjects: string[] = []; @@ -405,16 +319,12 @@ describe('Watch', () => { strictEqual(doneErr.length, 0); const errIn = new Error('err'); - (response as IncomingMessage).destroy(errIn); + response!.destroy(errIn); await donePromise; strictEqual(doneErr.length, 1); - deepStrictEqual(doneErr[0], errIn); - - s.done(); - - stream.destroy(); + strictEqual(doneErr[0].code, 'ERR_STREAM_PREMATURE_CLOSE'); }); it('should handle server side close correctly', async () => { @@ -555,3 +465,31 @@ describe('Watch', () => { await rejects(promise); }); }); + +async function setupMockSystem(ctx, handler) { + const server = createServer(handler); + ctx.after(() => { + try { + server.close(); + } catch { + // Ignore errors during server close. + } + }); + const port = await new Promise((resolve) => { + server.listen(0, () => { + resolve((server.address() as AddressInfo).port); + }); + }); + const kc = new KubeConfig(); + kc.loadFromClusterAndUser( + { + name: 'cluster', + server: `http://localhost:${port}`, + skipTLSVerify: true, + }, + { + name: 'user', + }, + ); + return kc; +} From e1cbddf6a96a084cafe41cd65c83a5687e3a8c3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Jun 2025 02:21:27 +0000 Subject: [PATCH 032/111] build(deps-dev): bump typescript-eslint from 8.33.0 to 8.33.1 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.33.0 to 8.33.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.33.1/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-version: 8.33.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 127 ++++++++++++++++++++++++---------------------- 1 file changed, 65 insertions(+), 62 deletions(-) diff --git a/package-lock.json b/package-lock.json index 52550b587e..5dabe1ca58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1065,17 +1065,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.33.0.tgz", - "integrity": "sha512-CACyQuqSHt7ma3Ns601xykeBK/rDeZa3w6IS6UtMQbixO5DWy+8TilKkviGDH6jtWCo8FGRKEK5cLLkPvEammQ==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.33.1.tgz", + "integrity": "sha512-TDCXj+YxLgtvxvFlAvpoRv9MAncDLBV2oT9Bd7YBGC/b/sEURoOYuIwLI99rjWOfY3QtDzO+mk0n4AmdFExW8A==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.33.0", - "@typescript-eslint/type-utils": "8.33.0", - "@typescript-eslint/utils": "8.33.0", - "@typescript-eslint/visitor-keys": "8.33.0", + "@typescript-eslint/scope-manager": "8.33.1", + "@typescript-eslint/type-utils": "8.33.1", + "@typescript-eslint/utils": "8.33.1", + "@typescript-eslint/visitor-keys": "8.33.1", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -1089,15 +1089,15 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.33.0", + "@typescript-eslint/parser": "^8.33.1", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.4.tgz", - "integrity": "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true, "license": "MIT", "engines": { @@ -1105,16 +1105,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.33.0.tgz", - "integrity": "sha512-JaehZvf6m0yqYp34+RVnihBAChkqeH+tqqhS0GuX1qgPpwLvmTPheKEs6OeCK6hVJgXZHJ2vbjnC9j119auStQ==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.33.1.tgz", + "integrity": "sha512-qwxv6dq682yVvgKKp2qWwLgRbscDAYktPptK4JPojCwwi3R9cwrvIxS4lvBpzmcqzR4bdn54Z0IG1uHFskW4dA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.33.0", - "@typescript-eslint/types": "8.33.0", - "@typescript-eslint/typescript-estree": "8.33.0", - "@typescript-eslint/visitor-keys": "8.33.0", + "@typescript-eslint/scope-manager": "8.33.1", + "@typescript-eslint/types": "8.33.1", + "@typescript-eslint/typescript-estree": "8.33.1", + "@typescript-eslint/visitor-keys": "8.33.1", "debug": "^4.3.4" }, "engines": { @@ -1130,14 +1130,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.33.0.tgz", - "integrity": "sha512-d1hz0u9l6N+u/gcrk6s6gYdl7/+pp8yHheRTqP6X5hVDKALEaTn8WfGiit7G511yueBEL3OpOEpD+3/MBdoN+A==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.33.1.tgz", + "integrity": "sha512-DZR0efeNklDIHHGRpMpR5gJITQpu6tLr9lDJnKdONTC7vvzOlLAG/wcfxcdxEWrbiZApcoBCzXqU/Z458Za5Iw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.33.0", - "@typescript-eslint/types": "^8.33.0", + "@typescript-eslint/tsconfig-utils": "^8.33.1", + "@typescript-eslint/types": "^8.33.1", "debug": "^4.3.4" }, "engines": { @@ -1146,17 +1146,20 @@ "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.33.0.tgz", - "integrity": "sha512-LMi/oqrzpqxyO72ltP+dBSP6V0xiUb4saY7WLtxSfiNEBI8m321LLVFU9/QDJxjDQG9/tjSqKz/E3380TEqSTw==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.33.1.tgz", + "integrity": "sha512-dM4UBtgmzHR9bS0Rv09JST0RcHYearoEoo3pG5B6GoTR9XcyeqX87FEhPo+5kTvVfKCvfHaHrcgeJQc6mrDKrA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.33.0", - "@typescript-eslint/visitor-keys": "8.33.0" + "@typescript-eslint/types": "8.33.1", + "@typescript-eslint/visitor-keys": "8.33.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1167,9 +1170,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.33.0.tgz", - "integrity": "sha512-sTkETlbqhEoiFmGr1gsdq5HyVbSOF0145SYDJ/EQmXHtKViCaGvnyLqWFFHtEXoS0J1yU8Wyou2UGmgW88fEug==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.33.1.tgz", + "integrity": "sha512-STAQsGYbHCF0/e+ShUQ4EatXQ7ceh3fBCXkNU7/MZVKulrlq1usH7t2FhxvCpuCi5O5oi1vmVaAjrGeL71OK1g==", "dev": true, "license": "MIT", "engines": { @@ -1184,14 +1187,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.33.0.tgz", - "integrity": "sha512-lScnHNCBqL1QayuSrWeqAL5GmqNdVUQAAMTaCwdYEdWfIrSrOGzyLGRCHXcCixa5NK6i5l0AfSO2oBSjCjf4XQ==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.33.1.tgz", + "integrity": "sha512-1cG37d9xOkhlykom55WVwG2QRNC7YXlxMaMzqw2uPeJixBFfKWZgaP/hjAObqMN/u3fr5BrTwTnc31/L9jQ2ww==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.33.0", - "@typescript-eslint/utils": "8.33.0", + "@typescript-eslint/typescript-estree": "8.33.1", + "@typescript-eslint/utils": "8.33.1", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1208,9 +1211,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.33.0.tgz", - "integrity": "sha512-DKuXOKpM5IDT1FA2g9x9x1Ug81YuKrzf4mYX8FAVSNu5Wo/LELHWQyM1pQaDkI42bX15PWl0vNPt1uGiIFUOpg==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.33.1.tgz", + "integrity": "sha512-xid1WfizGhy/TKMTwhtVOgalHwPtV8T32MS9MaH50Cwvz6x6YqRIPdD2WvW0XaqOzTV9p5xdLY0h/ZusU5Lokg==", "dev": true, "license": "MIT", "engines": { @@ -1222,16 +1225,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.33.0.tgz", - "integrity": "sha512-vegY4FQoB6jL97Tu/lWRsAiUUp8qJTqzAmENH2k59SJhw0Th1oszb9Idq/FyyONLuNqT1OADJPXfyUNOR8SzAQ==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.33.1.tgz", + "integrity": "sha512-+s9LYcT8LWjdYWu7IWs7FvUxpQ/DGkdjZeE/GGulHvv8rvYwQvVaUZ6DE+j5x/prADUgSbbCWZ2nPI3usuVeOA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.33.0", - "@typescript-eslint/tsconfig-utils": "8.33.0", - "@typescript-eslint/types": "8.33.0", - "@typescript-eslint/visitor-keys": "8.33.0", + "@typescript-eslint/project-service": "8.33.1", + "@typescript-eslint/tsconfig-utils": "8.33.1", + "@typescript-eslint/types": "8.33.1", + "@typescript-eslint/visitor-keys": "8.33.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1251,16 +1254,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.33.0.tgz", - "integrity": "sha512-lPFuQaLA9aSNa7D5u2EpRiqdAUhzShwGg/nhpBlc4GR6kcTABttCuyjFs8BcEZ8VWrjCBof/bePhP3Q3fS+Yrw==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.33.1.tgz", + "integrity": "sha512-52HaBiEQUaRYqAXpfzWSR2U3gxk92Kw006+xZpElaPMg3C4PgM+A5LqwoQI1f9E5aZ/qlxAZxzm42WX+vn92SQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.33.0", - "@typescript-eslint/types": "8.33.0", - "@typescript-eslint/typescript-estree": "8.33.0" + "@typescript-eslint/scope-manager": "8.33.1", + "@typescript-eslint/types": "8.33.1", + "@typescript-eslint/typescript-estree": "8.33.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1275,13 +1278,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.33.0.tgz", - "integrity": "sha512-7RW7CMYoskiz5OOGAWjJFxgb7c5UNjTG292gYhWeOAcFmYCtVCSqjqSBj5zMhxbXo2JOW95YYrUWJfU0zrpaGQ==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.33.1.tgz", + "integrity": "sha512-3i8NrFcZeeDHJ+7ZUuDkGT+UHq+XoFGsymNK2jZCOHcfEzRQ0BdpRtdpSx/Iyf3MHLWIcLS0COuOPibKQboIiQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.33.0", + "@typescript-eslint/types": "8.33.1", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -3830,15 +3833,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.33.0.tgz", - "integrity": "sha512-5YmNhF24ylCsvdNW2oJwMzTbaeO4bg90KeGtMjUw0AGtHksgEPLRTUil+coHwCfiu4QjVJFnjp94DmU6zV7DhQ==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.33.1.tgz", + "integrity": "sha512-AgRnV4sKkWOiZ0Kjbnf5ytTJXMUZQ0qhSVdQtDNYLPLnjsATEYhaO94GlRQwi4t4gO8FfjM6NnikHeKjUm8D7A==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.33.0", - "@typescript-eslint/parser": "8.33.0", - "@typescript-eslint/utils": "8.33.0" + "@typescript-eslint/eslint-plugin": "8.33.1", + "@typescript-eslint/parser": "8.33.1", + "@typescript-eslint/utils": "8.33.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" From ecd7804d9a3c2c23f8b413bacc479fd80f9ca5e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Jun 2025 02:21:37 +0000 Subject: [PATCH 033/111] build(deps-dev): bump pretty-quick from 4.2.0 to 4.2.2 Bumps [pretty-quick](https://github.com/prettier/pretty-quick) from 4.2.0 to 4.2.2. - [Release notes](https://github.com/prettier/pretty-quick/releases) - [Changelog](https://github.com/prettier/pretty-quick/blob/v4.2.2/CHANGELOG.md) - [Commits](https://github.com/prettier/pretty-quick/compare/v4.2.0...v4.2.2) --- updated-dependencies: - dependency-name: pretty-quick dependency-version: 4.2.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 52550b587e..5a9ecb16cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3219,9 +3219,9 @@ } }, "node_modules/pretty-quick": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-4.2.0.tgz", - "integrity": "sha512-YHNtLadWFvdvqKhSqhgb9W1XC2pNAKHhXiy6NW1FVY7ogivjdWiZgTjIRLkQtRCBaDnT2eyTTOMkcYB6mkx1Ug==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-4.2.2.tgz", + "integrity": "sha512-uAh96tBW1SsD34VhhDmWuEmqbpfYc/B3j++5MC/6b3Cb8Ow7NJsvKFhg0eoGu2xXX+o9RkahkTK6sUdd8E7g5w==", "dev": true, "license": "MIT", "dependencies": { @@ -3230,7 +3230,7 @@ "mri": "^1.2.0", "picocolors": "^1.1.1", "picomatch": "^4.0.2", - "tinyexec": "^1.0.1", + "tinyexec": "^0.3.2", "tslib": "^2.8.1" }, "bin": { @@ -3703,9 +3703,9 @@ } }, "node_modules/tinyexec": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.1.tgz", - "integrity": "sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", "dev": true, "license": "MIT" }, From a131c71b8d9cbf9d6c1acf546107d17a76c89817 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Jun 2025 02:58:19 +0000 Subject: [PATCH 034/111] build(deps): bump form-data from 4.0.2 to 4.0.3 Bumps [form-data](https://github.com/form-data/form-data) from 4.0.2 to 4.0.3. - [Release notes](https://github.com/form-data/form-data/releases) - [Commits](https://github.com/form-data/form-data/compare/v4.0.2...v4.0.3) --- updated-dependencies: - dependency-name: form-data dependency-version: 4.0.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7b7067f0e1..c250aee1b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2255,14 +2255,15 @@ } }, "node_modules/form-data": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", - "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.3.tgz", + "integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { From c47a73d35476ef41dd8041d84b7f713d6ed0de3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Jun 2025 00:07:33 -0400 Subject: [PATCH 035/111] build(deps): bump @types/node from 22.15.29 to 22.15.30 (#2476) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.29 to 22.15.30. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.30 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7b7067f0e1..6d12cc909c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1030,9 +1030,9 @@ } }, "node_modules/@types/node": { - "version": "22.15.29", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.29.tgz", - "integrity": "sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==", + "version": "22.15.30", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.30.tgz", + "integrity": "sha512-6Q7lr06bEHdlfplU6YRbgG1SFBdlsfNC4/lX+SkhiTs0cpJkOElmWls8PxDFv4yY/xKb8Y6SO0OmSX4wgqTZbA==", "license": "MIT", "dependencies": { "undici-types": "~6.21.0" From cfb5055d3f1ca70086201834c6401251d15f1cdd Mon Sep 17 00:00:00 2001 From: Karl Cardenas Date: Fri, 6 Jun 2025 17:51:26 -0700 Subject: [PATCH 036/111] docs: update known issues related to duplicate header keys issue --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1baec2c3a3..71058d9849 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,8 @@ Key: Credentials are cached based on the kubeconfig username and these can collide across configs. Here is the related [issue](https://github.com/kubernetes-client/javascript/issues/592). +- In scenarios where multiple headers with the same key are required in a request, such as `Impersonate-Group`, avoid using `fetch`. Fetch will merge the values into a single header key, with the values as a single string vs a list of strings, `Impersonate-Group: "group1,group2"`. The workaround is to use a low-level library such as `https` to make the request. Refer to issue [#2474](https://github.com/kubernetes-client/javascript/issues/2474) for more details. + # Development All dependencies of this project are expressed in its From 0b5f06bcbbc2dd636bd268448ca9c71e732138f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Jun 2025 02:21:58 +0000 Subject: [PATCH 037/111] build(deps): bump openid-client from 6.5.0 to 6.5.1 Bumps [openid-client](https://github.com/panva/openid-client) from 6.5.0 to 6.5.1. - [Release notes](https://github.com/panva/openid-client/releases) - [Changelog](https://github.com/panva/openid-client/blob/main/CHANGELOG.md) - [Commits](https://github.com/panva/openid-client/compare/v6.5.0...v6.5.1) --- updated-dependencies: - dependency-name: openid-client dependency-version: 6.5.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 43260b1d86..a57c837067 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2683,9 +2683,9 @@ } }, "node_modules/jose": { - "version": "6.0.10", - "resolved": "https://registry.npmjs.org/jose/-/jose-6.0.10.tgz", - "integrity": "sha512-skIAxZqcMkOrSwjJvplIPYrlXGpxTPnro2/QWTDCxAdWQrSTV5/KqspMWmi5WAx5+ULswASJiZ0a+1B/Lxt9cw==", + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.0.11.tgz", + "integrity": "sha512-QxG7EaliDARm1O1S8BGakqncGT9s25bKL1WSf6/oa17Tkqwi8D2ZNglqCF+DsYF88/rV66Q/Q2mFAy697E1DUg==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/panva" @@ -3022,9 +3022,9 @@ } }, "node_modules/oauth4webapi": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.5.1.tgz", - "integrity": "sha512-txg/jZQwcbaF7PMJgY7aoxc9QuCxHVFMiEkDIJ60DwDz3PbtXPQnrzo+3X4IRYGChIwWLabRBRpf1k9hO9+xrQ==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.5.2.tgz", + "integrity": "sha512-VYz5BaP3izIrUc1GAVzIoz4JnljiW0YAUFObMBwsqDnfHxz2sjLu3W7/8vE8Ms9IbMewN9+1kcvhY3tMscAeGQ==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/panva" @@ -3040,13 +3040,13 @@ } }, "node_modules/openid-client": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-6.5.0.tgz", - "integrity": "sha512-fAfYaTnOYE2kQCqEJGX9KDObW2aw7IQy4jWpU/+3D3WoCFLbix5Hg6qIPQ6Js9r7f8jDUmsnnguRNCSw4wU/IQ==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-6.5.1.tgz", + "integrity": "sha512-DNq7s+Tm9wfMUTltl+kUJzwi+bsbeiZycDm1gJQbX6MTHwo1+Q0I3F+ccsxi1T3mYMaHATCSnWDridkZ3hnu1g==", "license": "MIT", "dependencies": { - "jose": "^6.0.10", - "oauth4webapi": "^3.5.1" + "jose": "^6.0.11", + "oauth4webapi": "^3.5.2" }, "funding": { "url": "https://github.com/sponsors/panva" From 59da74f353edae12c78e34b80cfc69dc991fc881 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Jun 2025 02:27:46 +0000 Subject: [PATCH 038/111] build(deps-dev): bump typescript-eslint from 8.33.1 to 8.34.0 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.33.1 to 8.34.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.34.0/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-version: 8.34.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 118 +++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/package-lock.json b/package-lock.json index a57c837067..01dc3d67de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1065,17 +1065,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.33.1.tgz", - "integrity": "sha512-TDCXj+YxLgtvxvFlAvpoRv9MAncDLBV2oT9Bd7YBGC/b/sEURoOYuIwLI99rjWOfY3QtDzO+mk0n4AmdFExW8A==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.34.0.tgz", + "integrity": "sha512-QXwAlHlbcAwNlEEMKQS2RCgJsgXrTJdjXT08xEgbPFa2yYQgVjBymxP5DrfrE7X7iodSzd9qBUHUycdyVJTW1w==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.33.1", - "@typescript-eslint/type-utils": "8.33.1", - "@typescript-eslint/utils": "8.33.1", - "@typescript-eslint/visitor-keys": "8.33.1", + "@typescript-eslint/scope-manager": "8.34.0", + "@typescript-eslint/type-utils": "8.34.0", + "@typescript-eslint/utils": "8.34.0", + "@typescript-eslint/visitor-keys": "8.34.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -1089,7 +1089,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.33.1", + "@typescript-eslint/parser": "^8.34.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } @@ -1105,16 +1105,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.33.1.tgz", - "integrity": "sha512-qwxv6dq682yVvgKKp2qWwLgRbscDAYktPptK4JPojCwwi3R9cwrvIxS4lvBpzmcqzR4bdn54Z0IG1uHFskW4dA==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.34.0.tgz", + "integrity": "sha512-vxXJV1hVFx3IXz/oy2sICsJukaBrtDEQSBiV48/YIV5KWjX1dO+bcIr/kCPrW6weKXvsaGKFNlwH0v2eYdRRbA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.33.1", - "@typescript-eslint/types": "8.33.1", - "@typescript-eslint/typescript-estree": "8.33.1", - "@typescript-eslint/visitor-keys": "8.33.1", + "@typescript-eslint/scope-manager": "8.34.0", + "@typescript-eslint/types": "8.34.0", + "@typescript-eslint/typescript-estree": "8.34.0", + "@typescript-eslint/visitor-keys": "8.34.0", "debug": "^4.3.4" }, "engines": { @@ -1130,14 +1130,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.33.1.tgz", - "integrity": "sha512-DZR0efeNklDIHHGRpMpR5gJITQpu6tLr9lDJnKdONTC7vvzOlLAG/wcfxcdxEWrbiZApcoBCzXqU/Z458Za5Iw==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.34.0.tgz", + "integrity": "sha512-iEgDALRf970/B2YExmtPMPF54NenZUf4xpL3wsCRx/lgjz6ul/l13R81ozP/ZNuXfnLCS+oPmG7JIxfdNYKELw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.33.1", - "@typescript-eslint/types": "^8.33.1", + "@typescript-eslint/tsconfig-utils": "^8.34.0", + "@typescript-eslint/types": "^8.34.0", "debug": "^4.3.4" }, "engines": { @@ -1152,14 +1152,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.33.1.tgz", - "integrity": "sha512-dM4UBtgmzHR9bS0Rv09JST0RcHYearoEoo3pG5B6GoTR9XcyeqX87FEhPo+5kTvVfKCvfHaHrcgeJQc6mrDKrA==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.34.0.tgz", + "integrity": "sha512-9Ac0X8WiLykl0aj1oYQNcLZjHgBojT6cW68yAgZ19letYu+Hxd0rE0veI1XznSSst1X5lwnxhPbVdwjDRIomRw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.33.1", - "@typescript-eslint/visitor-keys": "8.33.1" + "@typescript-eslint/types": "8.34.0", + "@typescript-eslint/visitor-keys": "8.34.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1170,9 +1170,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.33.1.tgz", - "integrity": "sha512-STAQsGYbHCF0/e+ShUQ4EatXQ7ceh3fBCXkNU7/MZVKulrlq1usH7t2FhxvCpuCi5O5oi1vmVaAjrGeL71OK1g==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.34.0.tgz", + "integrity": "sha512-+W9VYHKFIzA5cBeooqQxqNriAP0QeQ7xTiDuIOr71hzgffm3EL2hxwWBIIj4GuofIbKxGNarpKqIq6Q6YrShOA==", "dev": true, "license": "MIT", "engines": { @@ -1187,14 +1187,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.33.1.tgz", - "integrity": "sha512-1cG37d9xOkhlykom55WVwG2QRNC7YXlxMaMzqw2uPeJixBFfKWZgaP/hjAObqMN/u3fr5BrTwTnc31/L9jQ2ww==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.34.0.tgz", + "integrity": "sha512-n7zSmOcUVhcRYC75W2pnPpbO1iwhJY3NLoHEtbJwJSNlVAZuwqu05zY3f3s2SDWWDSo9FdN5szqc73DCtDObAg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.33.1", - "@typescript-eslint/utils": "8.33.1", + "@typescript-eslint/typescript-estree": "8.34.0", + "@typescript-eslint/utils": "8.34.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1211,9 +1211,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.33.1.tgz", - "integrity": "sha512-xid1WfizGhy/TKMTwhtVOgalHwPtV8T32MS9MaH50Cwvz6x6YqRIPdD2WvW0XaqOzTV9p5xdLY0h/ZusU5Lokg==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.34.0.tgz", + "integrity": "sha512-9V24k/paICYPniajHfJ4cuAWETnt7Ssy+R0Rbcqo5sSFr3QEZ/8TSoUi9XeXVBGXCaLtwTOKSLGcInCAvyZeMA==", "dev": true, "license": "MIT", "engines": { @@ -1225,16 +1225,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.33.1.tgz", - "integrity": "sha512-+s9LYcT8LWjdYWu7IWs7FvUxpQ/DGkdjZeE/GGulHvv8rvYwQvVaUZ6DE+j5x/prADUgSbbCWZ2nPI3usuVeOA==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.34.0.tgz", + "integrity": "sha512-rOi4KZxI7E0+BMqG7emPSK1bB4RICCpF7QD3KCLXn9ZvWoESsOMlHyZPAHyG04ujVplPaHbmEvs34m+wjgtVtg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.33.1", - "@typescript-eslint/tsconfig-utils": "8.33.1", - "@typescript-eslint/types": "8.33.1", - "@typescript-eslint/visitor-keys": "8.33.1", + "@typescript-eslint/project-service": "8.34.0", + "@typescript-eslint/tsconfig-utils": "8.34.0", + "@typescript-eslint/types": "8.34.0", + "@typescript-eslint/visitor-keys": "8.34.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1254,16 +1254,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.33.1.tgz", - "integrity": "sha512-52HaBiEQUaRYqAXpfzWSR2U3gxk92Kw006+xZpElaPMg3C4PgM+A5LqwoQI1f9E5aZ/qlxAZxzm42WX+vn92SQ==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.34.0.tgz", + "integrity": "sha512-8L4tWatGchV9A1cKbjaavS6mwYwp39jql8xUmIIKJdm+qiaeHy5KMKlBrf30akXAWBzn2SqKsNOtSENWUwg7XQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.33.1", - "@typescript-eslint/types": "8.33.1", - "@typescript-eslint/typescript-estree": "8.33.1" + "@typescript-eslint/scope-manager": "8.34.0", + "@typescript-eslint/types": "8.34.0", + "@typescript-eslint/typescript-estree": "8.34.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1278,13 +1278,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.33.1.tgz", - "integrity": "sha512-3i8NrFcZeeDHJ+7ZUuDkGT+UHq+XoFGsymNK2jZCOHcfEzRQ0BdpRtdpSx/Iyf3MHLWIcLS0COuOPibKQboIiQ==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.34.0.tgz", + "integrity": "sha512-qHV7pW7E85A0x6qyrFn+O+q1k1p3tQCsqIZ1KZ5ESLXY57aTvUd3/a4rdPTeXisvhXn2VQG0VSKUqs8KHF2zcA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.33.1", + "@typescript-eslint/types": "8.34.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -3834,15 +3834,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.33.1.tgz", - "integrity": "sha512-AgRnV4sKkWOiZ0Kjbnf5ytTJXMUZQ0qhSVdQtDNYLPLnjsATEYhaO94GlRQwi4t4gO8FfjM6NnikHeKjUm8D7A==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.34.0.tgz", + "integrity": "sha512-MRpfN7uYjTrTGigFCt8sRyNqJFhjN0WwZecldaqhWm+wy0gaRt8Edb/3cuUy0zdq2opJWT6iXINKAtewnDOltQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.33.1", - "@typescript-eslint/parser": "8.33.1", - "@typescript-eslint/utils": "8.33.1" + "@typescript-eslint/eslint-plugin": "8.34.0", + "@typescript-eslint/parser": "8.34.0", + "@typescript-eslint/utils": "8.34.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" From c5a97fc9f447f73cc91ce3d8f81bd8659a760266 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Jun 2025 02:27:57 +0000 Subject: [PATCH 039/111] build(deps): bump @types/node from 22.15.30 to 24.0.0 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.30 to 24.0.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 24.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index a57c837067..8e19117b82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "Apache-2.0", "dependencies": { "@types/js-yaml": "^4.0.1", - "@types/node": "^22.0.0", + "@types/node": "^24.0.0", "@types/node-fetch": "^2.6.9", "@types/stream-buffers": "^3.0.3", "form-data": "^4.0.0", @@ -1030,12 +1030,12 @@ } }, "node_modules/@types/node": { - "version": "22.15.30", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.30.tgz", - "integrity": "sha512-6Q7lr06bEHdlfplU6YRbgG1SFBdlsfNC4/lX+SkhiTs0cpJkOElmWls8PxDFv4yY/xKb8Y6SO0OmSX4wgqTZbA==", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.0.tgz", + "integrity": "sha512-yZQa2zm87aRVcqDyH5+4Hv9KYgSdgwX1rFnGvpbzMaC7YAljmhBET93TPiTd3ObwTL+gSpIzPKg5BqVxdCvxKg==", "license": "MIT", "dependencies": { - "undici-types": "~6.21.0" + "undici-types": "~7.8.0" } }, "node_modules/@types/node-fetch": { @@ -3864,9 +3864,9 @@ "license": "MIT" }, "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", + "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", "license": "MIT" }, "node_modules/uri-js": { diff --git a/package.json b/package.json index e06d586a8a..f4e9af618f 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "license": "Apache-2.0", "dependencies": { "@types/js-yaml": "^4.0.1", - "@types/node": "^22.0.0", + "@types/node": "^24.0.0", "@types/node-fetch": "^2.6.9", "@types/stream-buffers": "^3.0.3", "form-data": "^4.0.0", From 4110b588d7fdad140a4f47866af81b39dc9fd856 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Jun 2025 02:45:40 +0000 Subject: [PATCH 040/111] build(deps-dev): bump tsx from 4.19.4 to 4.20.0 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.19.4 to 4.20.0. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.19.4...v4.20.0) --- updated-dependencies: - dependency-name: tsx dependency-version: 4.20.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 014f6bc2fe..132e4da7d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3763,9 +3763,9 @@ "license": "0BSD" }, "node_modules/tsx": { - "version": "4.19.4", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.4.tgz", - "integrity": "sha512-gK5GVzDkJK1SI1zwHf32Mqxf2tSJkNx+eYcNly5+nHvWqXUJYUkWBQtKauoESz3ymezAI++ZwT855x5p5eop+Q==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.0.tgz", + "integrity": "sha512-TsmdeXxcZYiJ2MKV7fdq38na0CKyLRtCeMqTeHMmrVXQ/gf5yTeJohh+sgr7MnMGsjeKXzHzy+TwOOTR1arl+Q==", "dev": true, "license": "MIT", "dependencies": { From 75dfe71fb6822e47b28921c2e38aa337e955afd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Str=C3=BCbing?= Date: Wed, 11 Jun 2025 11:37:27 +0000 Subject: [PATCH 041/111] chore: update tar-fs --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 132e4da7d1..0216082d6e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "rfc4648": "^1.3.0", "socks-proxy-agent": "^8.0.4", "stream-buffers": "^3.0.2", - "tar-fs": "^3.0.8", + "tar-fs": "^3.0.9", "ws": "^8.18.2" }, "devDependencies": { diff --git a/package.json b/package.json index f4e9af618f..173117514f 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "rfc4648": "^1.3.0", "socks-proxy-agent": "^8.0.4", "stream-buffers": "^3.0.2", - "tar-fs": "^3.0.8", + "tar-fs": "^3.0.9", "ws": "^8.18.2" }, "devDependencies": { From c53b08127fc8d88a05922b558f453dc6e1ae9753 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 02:59:45 +0000 Subject: [PATCH 042/111] build(deps-dev): bump tsx from 4.20.0 to 4.20.1 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.20.0 to 4.20.1. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.20.0...v4.20.1) --- updated-dependencies: - dependency-name: tsx dependency-version: 4.20.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0216082d6e..b12f8a6db9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3763,9 +3763,9 @@ "license": "0BSD" }, "node_modules/tsx": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.0.tgz", - "integrity": "sha512-TsmdeXxcZYiJ2MKV7fdq38na0CKyLRtCeMqTeHMmrVXQ/gf5yTeJohh+sgr7MnMGsjeKXzHzy+TwOOTR1arl+Q==", + "version": "4.20.1", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.1.tgz", + "integrity": "sha512-JsFUnMHIE+g8KllOvWTrSOwCKM10xLcsesvUQR61znsbrcwZ4U/QaqdymmvTqG5GMD7k2VFv9UG35C4dRy34Ag==", "dev": true, "license": "MIT", "dependencies": { From c76972cfa5123d03a71571b4fbc3dc2add5a3fd5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Jun 2025 23:10:17 -0400 Subject: [PATCH 043/111] build(deps): bump @types/node from 24.0.0 to 24.0.1 (#2493) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.0.0 to 24.0.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 24.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b12f8a6db9..6ef8e77ad0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1030,9 +1030,9 @@ } }, "node_modules/@types/node": { - "version": "24.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.0.tgz", - "integrity": "sha512-yZQa2zm87aRVcqDyH5+4Hv9KYgSdgwX1rFnGvpbzMaC7YAljmhBET93TPiTd3ObwTL+gSpIzPKg5BqVxdCvxKg==", + "version": "24.0.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.1.tgz", + "integrity": "sha512-MX4Zioh39chHlDJbKmEgydJDS3tspMP/lnQC67G3SWsTnb9NeYVWOjkxpOSy4oMfPs4StcWHwBrvUb4ybfnuaw==", "license": "MIT", "dependencies": { "undici-types": "~7.8.0" From 85ec65e6f6a121ca4599260387bf8fbafb3283be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 02:49:12 +0000 Subject: [PATCH 044/111] build(deps-dev): bump eslint from 9.28.0 to 9.29.0 Bumps [eslint](https://github.com/eslint/eslint) from 9.28.0 to 9.29.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.28.0...v9.29.0) --- updated-dependencies: - dependency-name: eslint dependency-version: 9.29.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 62 +++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6ef8e77ad0..589b90c4c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -522,9 +522,9 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz", - "integrity": "sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.1.tgz", + "integrity": "sha512-OL0RJzC/CBzli0DrrR31qzj6d6i6Mm3HByuhflhl4LOBiWxN+3i6/t/ZQQNii4tjksXi8r2CRW1wMpWA2ULUEw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -537,9 +537,9 @@ } }, "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -632,9 +632,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.28.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.28.0.tgz", - "integrity": "sha512-fnqSjGWd/CoIp4EXIxWVK/sHA6DOHN4+8Ix2cX5ycOY7LG0UY8nHCU5pIp2eaE1Mc7Qd8kHspYNzYXT2ojPLzg==", + "version": "9.29.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.29.0.tgz", + "integrity": "sha512-3PIF4cBw/y+1u2EazflInpV+lYsSG0aByVIQzAgb1m1MhHFSbqTyNqtBKHgWf/9Ykud+DhILS9EGkmekVhbKoQ==", "dev": true, "license": "MIT", "engines": { @@ -1296,9 +1296,9 @@ } }, "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", "bin": { @@ -1909,19 +1909,19 @@ } }, "node_modules/eslint": { - "version": "9.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.28.0.tgz", - "integrity": "sha512-ocgh41VhRlf9+fVpe7QKzwLj9c92fDiqOj8Y3Sd4/ZmVA4Btx4PlUYPq4pp9JDyupkf1upbEXecxL2mwNV7jPQ==", + "version": "9.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.29.0.tgz", + "integrity": "sha512-GsGizj2Y1rCWDu6XoEekL3RLilp0voSePurjZIkxL3wlm5o5EC9VpgaP7lrCvjnkuLvzFBQWB3vWB3K5KQTveQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.20.0", + "@eslint/config-array": "^0.20.1", "@eslint/config-helpers": "^0.2.1", "@eslint/core": "^0.14.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.28.0", + "@eslint/js": "9.29.0", "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", @@ -1933,9 +1933,9 @@ "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.3.0", - "eslint-visitor-keys": "^4.2.0", - "espree": "^10.3.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -1989,9 +1989,9 @@ } }, "node_modules/eslint-scope": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", - "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -2006,9 +2006,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2043,15 +2043,15 @@ } }, "node_modules/espree": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", - "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.14.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.0" + "eslint-visitor-keys": "^4.2.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" From b23a2eee52d5600e085f7a0da10ddfa08bb9096b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 02:49:21 +0000 Subject: [PATCH 045/111] build(deps-dev): bump tsx from 4.20.1 to 4.20.3 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.20.1 to 4.20.3. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.20.1...v4.20.3) --- updated-dependencies: - dependency-name: tsx dependency-version: 4.20.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6ef8e77ad0..5ed363e160 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3763,9 +3763,9 @@ "license": "0BSD" }, "node_modules/tsx": { - "version": "4.20.1", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.1.tgz", - "integrity": "sha512-JsFUnMHIE+g8KllOvWTrSOwCKM10xLcsesvUQR61znsbrcwZ4U/QaqdymmvTqG5GMD7k2VFv9UG35C4dRy34Ag==", + "version": "4.20.3", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.3.tgz", + "integrity": "sha512-qjbnuR9Tr+FJOMBqJCW5ehvIo/buZq7vH7qD7JziU98h6l3qGy0a/yPFjwO+y0/T7GFpNgNAvEcPPVfyT8rrPQ==", "dev": true, "license": "MIT", "dependencies": { From 70bc184066af21227ae9b01383e36c1fe8b9e6ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 03:05:35 +0000 Subject: [PATCH 046/111] build(deps-dev): bump typescript-eslint from 8.34.0 to 8.34.1 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.34.0 to 8.34.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.34.1/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-version: 8.34.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 120 +++++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/package-lock.json b/package-lock.json index de07b4ca4a..34d48cf50d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1065,17 +1065,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.34.0.tgz", - "integrity": "sha512-QXwAlHlbcAwNlEEMKQS2RCgJsgXrTJdjXT08xEgbPFa2yYQgVjBymxP5DrfrE7X7iodSzd9qBUHUycdyVJTW1w==", + "version": "8.34.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.34.1.tgz", + "integrity": "sha512-STXcN6ebF6li4PxwNeFnqF8/2BNDvBupf2OPx2yWNzr6mKNGF7q49VM00Pz5FaomJyqvbXpY6PhO+T9w139YEQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.34.0", - "@typescript-eslint/type-utils": "8.34.0", - "@typescript-eslint/utils": "8.34.0", - "@typescript-eslint/visitor-keys": "8.34.0", + "@typescript-eslint/scope-manager": "8.34.1", + "@typescript-eslint/type-utils": "8.34.1", + "@typescript-eslint/utils": "8.34.1", + "@typescript-eslint/visitor-keys": "8.34.1", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -1089,7 +1089,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.34.0", + "@typescript-eslint/parser": "^8.34.1", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } @@ -1105,16 +1105,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.34.0.tgz", - "integrity": "sha512-vxXJV1hVFx3IXz/oy2sICsJukaBrtDEQSBiV48/YIV5KWjX1dO+bcIr/kCPrW6weKXvsaGKFNlwH0v2eYdRRbA==", + "version": "8.34.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.34.1.tgz", + "integrity": "sha512-4O3idHxhyzjClSMJ0a29AcoK0+YwnEqzI6oz3vlRf3xw0zbzt15MzXwItOlnr5nIth6zlY2RENLsOPvhyrKAQA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.34.0", - "@typescript-eslint/types": "8.34.0", - "@typescript-eslint/typescript-estree": "8.34.0", - "@typescript-eslint/visitor-keys": "8.34.0", + "@typescript-eslint/scope-manager": "8.34.1", + "@typescript-eslint/types": "8.34.1", + "@typescript-eslint/typescript-estree": "8.34.1", + "@typescript-eslint/visitor-keys": "8.34.1", "debug": "^4.3.4" }, "engines": { @@ -1130,14 +1130,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.34.0.tgz", - "integrity": "sha512-iEgDALRf970/B2YExmtPMPF54NenZUf4xpL3wsCRx/lgjz6ul/l13R81ozP/ZNuXfnLCS+oPmG7JIxfdNYKELw==", + "version": "8.34.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.34.1.tgz", + "integrity": "sha512-nuHlOmFZfuRwLJKDGQOVc0xnQrAmuq1Mj/ISou5044y1ajGNp2BNliIqp7F2LPQ5sForz8lempMFCovfeS1XoA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.34.0", - "@typescript-eslint/types": "^8.34.0", + "@typescript-eslint/tsconfig-utils": "^8.34.1", + "@typescript-eslint/types": "^8.34.1", "debug": "^4.3.4" }, "engines": { @@ -1152,14 +1152,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.34.0.tgz", - "integrity": "sha512-9Ac0X8WiLykl0aj1oYQNcLZjHgBojT6cW68yAgZ19letYu+Hxd0rE0veI1XznSSst1X5lwnxhPbVdwjDRIomRw==", + "version": "8.34.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.34.1.tgz", + "integrity": "sha512-beu6o6QY4hJAgL1E8RaXNC071G4Kso2MGmJskCFQhRhg8VOH/FDbC8soP8NHN7e/Hdphwp8G8cE6OBzC8o41ZA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.34.0", - "@typescript-eslint/visitor-keys": "8.34.0" + "@typescript-eslint/types": "8.34.1", + "@typescript-eslint/visitor-keys": "8.34.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1170,9 +1170,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.34.0.tgz", - "integrity": "sha512-+W9VYHKFIzA5cBeooqQxqNriAP0QeQ7xTiDuIOr71hzgffm3EL2hxwWBIIj4GuofIbKxGNarpKqIq6Q6YrShOA==", + "version": "8.34.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.34.1.tgz", + "integrity": "sha512-K4Sjdo4/xF9NEeA2khOb7Y5nY6NSXBnod87uniVYW9kHP+hNlDV8trUSFeynA2uxWam4gIWgWoygPrv9VMWrYg==", "dev": true, "license": "MIT", "engines": { @@ -1187,14 +1187,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.34.0.tgz", - "integrity": "sha512-n7zSmOcUVhcRYC75W2pnPpbO1iwhJY3NLoHEtbJwJSNlVAZuwqu05zY3f3s2SDWWDSo9FdN5szqc73DCtDObAg==", + "version": "8.34.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.34.1.tgz", + "integrity": "sha512-Tv7tCCr6e5m8hP4+xFugcrwTOucB8lshffJ6zf1mF1TbU67R+ntCc6DzLNKM+s/uzDyv8gLq7tufaAhIBYeV8g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.34.0", - "@typescript-eslint/utils": "8.34.0", + "@typescript-eslint/typescript-estree": "8.34.1", + "@typescript-eslint/utils": "8.34.1", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1211,9 +1211,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.34.0.tgz", - "integrity": "sha512-9V24k/paICYPniajHfJ4cuAWETnt7Ssy+R0Rbcqo5sSFr3QEZ/8TSoUi9XeXVBGXCaLtwTOKSLGcInCAvyZeMA==", + "version": "8.34.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.34.1.tgz", + "integrity": "sha512-rjLVbmE7HR18kDsjNIZQHxmv9RZwlgzavryL5Lnj2ujIRTeXlKtILHgRNmQ3j4daw7zd+mQgy+uyt6Zo6I0IGA==", "dev": true, "license": "MIT", "engines": { @@ -1225,16 +1225,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.34.0.tgz", - "integrity": "sha512-rOi4KZxI7E0+BMqG7emPSK1bB4RICCpF7QD3KCLXn9ZvWoESsOMlHyZPAHyG04ujVplPaHbmEvs34m+wjgtVtg==", + "version": "8.34.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.34.1.tgz", + "integrity": "sha512-rjCNqqYPuMUF5ODD+hWBNmOitjBWghkGKJg6hiCHzUvXRy6rK22Jd3rwbP2Xi+R7oYVvIKhokHVhH41BxPV5mA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.34.0", - "@typescript-eslint/tsconfig-utils": "8.34.0", - "@typescript-eslint/types": "8.34.0", - "@typescript-eslint/visitor-keys": "8.34.0", + "@typescript-eslint/project-service": "8.34.1", + "@typescript-eslint/tsconfig-utils": "8.34.1", + "@typescript-eslint/types": "8.34.1", + "@typescript-eslint/visitor-keys": "8.34.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1254,16 +1254,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.34.0.tgz", - "integrity": "sha512-8L4tWatGchV9A1cKbjaavS6mwYwp39jql8xUmIIKJdm+qiaeHy5KMKlBrf30akXAWBzn2SqKsNOtSENWUwg7XQ==", + "version": "8.34.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.34.1.tgz", + "integrity": "sha512-mqOwUdZ3KjtGk7xJJnLbHxTuWVn3GO2WZZuM+Slhkun4+qthLdXx32C8xIXbO1kfCECb3jIs3eoxK3eryk7aoQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.34.0", - "@typescript-eslint/types": "8.34.0", - "@typescript-eslint/typescript-estree": "8.34.0" + "@typescript-eslint/scope-manager": "8.34.1", + "@typescript-eslint/types": "8.34.1", + "@typescript-eslint/typescript-estree": "8.34.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1278,14 +1278,14 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.34.0.tgz", - "integrity": "sha512-qHV7pW7E85A0x6qyrFn+O+q1k1p3tQCsqIZ1KZ5ESLXY57aTvUd3/a4rdPTeXisvhXn2VQG0VSKUqs8KHF2zcA==", + "version": "8.34.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.34.1.tgz", + "integrity": "sha512-xoh5rJ+tgsRKoXnkBPFRLZ7rjKM0AfVbC68UZ/ECXoDbfggb9RbEySN359acY1vS3qZ0jVTVWzbtfapwm5ztxw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.34.0", - "eslint-visitor-keys": "^4.2.0" + "@typescript-eslint/types": "8.34.1", + "eslint-visitor-keys": "^4.2.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3834,15 +3834,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.34.0.tgz", - "integrity": "sha512-MRpfN7uYjTrTGigFCt8sRyNqJFhjN0WwZecldaqhWm+wy0gaRt8Edb/3cuUy0zdq2opJWT6iXINKAtewnDOltQ==", + "version": "8.34.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.34.1.tgz", + "integrity": "sha512-XjS+b6Vg9oT1BaIUfkW3M3LvqZE++rbzAMEHuccCfO/YkP43ha6w3jTEMilQxMF92nVOYCcdjv1ZUhAa1D/0ow==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.34.0", - "@typescript-eslint/parser": "8.34.0", - "@typescript-eslint/utils": "8.34.0" + "@typescript-eslint/eslint-plugin": "8.34.1", + "@typescript-eslint/parser": "8.34.1", + "@typescript-eslint/utils": "8.34.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" From 619c92c63b4b22b008e18482fcc7bd5dbf8a9bb8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 03:14:45 +0000 Subject: [PATCH 047/111] build(deps): bump tar-fs from 3.0.9 to 3.0.10 Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 3.0.9 to 3.0.10. - [Commits](https://github.com/mafintosh/tar-fs/compare/v3.0.9...v3.0.10) --- updated-dependencies: - dependency-name: tar-fs dependency-version: 3.0.10 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index de07b4ca4a..3489dd64c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3658,9 +3658,9 @@ } }, "node_modules/tar-fs": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.9.tgz", - "integrity": "sha512-XF4w9Xp+ZQgifKakjZYmFdkLoSWd34VGKcsTCwlNWM7QG3ZbaxnTsaBwnjFZqHRf/rROxaR8rXnbtwdvaDI+lA==", + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.10.tgz", + "integrity": "sha512-C1SwlQGNLe/jPNqapK8epDsXME7CAJR5RL3GcE6KWx1d9OUByzoHVcbu1VPI8tevg9H8Alae0AApHHFGzrD5zA==", "license": "MIT", "dependencies": { "pump": "^3.0.0", From b69fb9ba040359f7cbe576943da25a0fd7df16cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 00:00:25 -0400 Subject: [PATCH 048/111] build(deps): bump @types/node from 24.0.1 to 24.0.3 (#2504) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.0.1 to 24.0.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 24.0.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 80cda92a2c..6be08562e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1030,9 +1030,9 @@ } }, "node_modules/@types/node": { - "version": "24.0.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.1.tgz", - "integrity": "sha512-MX4Zioh39chHlDJbKmEgydJDS3tspMP/lnQC67G3SWsTnb9NeYVWOjkxpOSy4oMfPs4StcWHwBrvUb4ybfnuaw==", + "version": "24.0.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.3.tgz", + "integrity": "sha512-R4I/kzCYAdRLzfiCabn9hxWfbuHS573x+r0dJMkkzThEa7pbrcDWK+9zu3e7aBOouf+rQAciqPFMnxwr0aWgKg==", "license": "MIT", "dependencies": { "undici-types": "~7.8.0" From eeffafd763c635a9ceb7aa622d04a0ef191646fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 02:54:33 +0000 Subject: [PATCH 049/111] build(deps): bump openid-client from 6.5.1 to 6.5.3 Bumps [openid-client](https://github.com/panva/openid-client) from 6.5.1 to 6.5.3. - [Release notes](https://github.com/panva/openid-client/releases) - [Changelog](https://github.com/panva/openid-client/blob/main/CHANGELOG.md) - [Commits](https://github.com/panva/openid-client/compare/v6.5.1...v6.5.3) --- updated-dependencies: - dependency-name: openid-client dependency-version: 6.5.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6be08562e8..9e1f86805d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3022,9 +3022,9 @@ } }, "node_modules/oauth4webapi": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.5.2.tgz", - "integrity": "sha512-VYz5BaP3izIrUc1GAVzIoz4JnljiW0YAUFObMBwsqDnfHxz2sjLu3W7/8vE8Ms9IbMewN9+1kcvhY3tMscAeGQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.5.3.tgz", + "integrity": "sha512-2bnHosmBLAQpXNBLOvaJMyMkr4Yya5ohE5Q9jqyxiN+aa7GFCzvDN1RRRMrp0NkfqRR2MTaQNkcSUCCjILD9oQ==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/panva" @@ -3040,13 +3040,13 @@ } }, "node_modules/openid-client": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-6.5.1.tgz", - "integrity": "sha512-DNq7s+Tm9wfMUTltl+kUJzwi+bsbeiZycDm1gJQbX6MTHwo1+Q0I3F+ccsxi1T3mYMaHATCSnWDridkZ3hnu1g==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-6.5.3.tgz", + "integrity": "sha512-PII6MybD2VwZyWFlSwhQDflSsDt0PEX/o715shdXcORqaFze6/31RqztxjlJNursDABgwd41GnOqKcttYQRcUw==", "license": "MIT", "dependencies": { "jose": "^6.0.11", - "oauth4webapi": "^3.5.2" + "oauth4webapi": "^3.5.3" }, "funding": { "url": "https://github.com/sponsors/panva" From d9660d6496a386b10663cd89c8e3f04de971c687 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 02:39:48 +0000 Subject: [PATCH 050/111] build(deps): bump openid-client from 6.5.3 to 6.6.1 Bumps [openid-client](https://github.com/panva/openid-client) from 6.5.3 to 6.6.1. - [Release notes](https://github.com/panva/openid-client/releases) - [Changelog](https://github.com/panva/openid-client/blob/main/CHANGELOG.md) - [Commits](https://github.com/panva/openid-client/compare/v6.5.3...v6.6.1) --- updated-dependencies: - dependency-name: openid-client dependency-version: 6.6.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9e1f86805d..618594c34a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3040,9 +3040,9 @@ } }, "node_modules/openid-client": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-6.5.3.tgz", - "integrity": "sha512-PII6MybD2VwZyWFlSwhQDflSsDt0PEX/o715shdXcORqaFze6/31RqztxjlJNursDABgwd41GnOqKcttYQRcUw==", + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-6.6.1.tgz", + "integrity": "sha512-GmqoICGMI3IyFFjhvXxad8of4QWk2D0tm4vdJkldGm9nw7J3p1f7LPLWgGeFuKuw8HjDVe8Dd8QLGBe0NFvSSg==", "license": "MIT", "dependencies": { "jose": "^6.0.11", From 3670dbf76af9a5b20ad47c1941090fe7a82ebb3a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 02:47:16 +0000 Subject: [PATCH 051/111] build(deps-dev): bump prettier from 3.5.3 to 3.6.0 Bumps [prettier](https://github.com/prettier/prettier) from 3.5.3 to 3.6.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.5.3...3.6.0) --- updated-dependencies: - dependency-name: prettier dependency-version: 3.6.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9e1f86805d..0ab5af4728 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3207,9 +3207,9 @@ } }, "node_modules/prettier": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", - "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.0.tgz", + "integrity": "sha512-ujSB9uXHJKzM/2GBuE0hBOUgC77CN3Bnpqa+g80bkv3T3A93wL/xlzDATHhnhkzifz/UE2SNOvmbTz5hSkDlHw==", "dev": true, "license": "MIT", "bin": { From b3ff0b6ac908a38e27a5d6ca5cca8984b545975f Mon Sep 17 00:00:00 2001 From: Prashant Farkya Date: Mon, 23 Jun 2025 20:06:05 +0530 Subject: [PATCH 052/111] FIX: Adding support for multiple client --- src/config.ts | 4 ++-- src/config_test.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.ts b/src/config.ts index 526ce20861..6c0dd335c4 100644 --- a/src/config.ts +++ b/src/config.ts @@ -58,7 +58,7 @@ function fileExists(filepath: string): boolean { export interface ApiType {} export class KubeConfig implements SecurityAuthentication { - private static authenticators: Authenticator[] = [ + private authenticators: Authenticator[] = [ new AzureAuth(), new GoogleCloudPlatformAuth(), new ExecAuth(), @@ -596,7 +596,7 @@ export class KubeConfig implements SecurityAuthentication { if (!user) { return; } - let authenticator = KubeConfig.authenticators.find((elt: Authenticator) => { + let authenticator = this.authenticators.find((elt: Authenticator) => { return elt.isAuthProvider(user); }); diff --git a/src/config_test.ts b/src/config_test.ts index ea8e4e2dc1..96e126a09b 100644 --- a/src/config_test.ts +++ b/src/config_test.ts @@ -1345,7 +1345,7 @@ describe('KubeConfig', () => { // TODO: inject the exec command here? const opts = {} as RequestOptions; await config.applyToHTTPSOptions(opts); - const execAuthenticator = (KubeConfig as any).authenticators.find( + const execAuthenticator = (config as any).authenticators.find( (authenticator) => authenticator instanceof ExecAuth, ); deepStrictEqual(execAuthenticator.tokenCache.exec, JSON.parse(responseStr)); From c361747451cb6920df804c079e1d38c14ac26a6e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 03:37:03 +0000 Subject: [PATCH 053/111] build(deps-dev): bump typescript-eslint from 8.34.1 to 8.35.0 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.34.1 to 8.35.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.35.0/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-version: 8.35.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 118 +++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/package-lock.json b/package-lock.json index add075d6d4..ac448b0646 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1065,17 +1065,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.34.1.tgz", - "integrity": "sha512-STXcN6ebF6li4PxwNeFnqF8/2BNDvBupf2OPx2yWNzr6mKNGF7q49VM00Pz5FaomJyqvbXpY6PhO+T9w139YEQ==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.35.0.tgz", + "integrity": "sha512-ijItUYaiWuce0N1SoSMrEd0b6b6lYkYt99pqCPfybd+HKVXtEvYhICfLdwp42MhiI5mp0oq7PKEL+g1cNiz/Eg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.34.1", - "@typescript-eslint/type-utils": "8.34.1", - "@typescript-eslint/utils": "8.34.1", - "@typescript-eslint/visitor-keys": "8.34.1", + "@typescript-eslint/scope-manager": "8.35.0", + "@typescript-eslint/type-utils": "8.35.0", + "@typescript-eslint/utils": "8.35.0", + "@typescript-eslint/visitor-keys": "8.35.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -1089,7 +1089,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.34.1", + "@typescript-eslint/parser": "^8.35.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } @@ -1105,16 +1105,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.34.1.tgz", - "integrity": "sha512-4O3idHxhyzjClSMJ0a29AcoK0+YwnEqzI6oz3vlRf3xw0zbzt15MzXwItOlnr5nIth6zlY2RENLsOPvhyrKAQA==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.35.0.tgz", + "integrity": "sha512-6sMvZePQrnZH2/cJkwRpkT7DxoAWh+g6+GFRK6bV3YQo7ogi3SX5rgF6099r5Q53Ma5qeT7LGmOmuIutF4t3lA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.34.1", - "@typescript-eslint/types": "8.34.1", - "@typescript-eslint/typescript-estree": "8.34.1", - "@typescript-eslint/visitor-keys": "8.34.1", + "@typescript-eslint/scope-manager": "8.35.0", + "@typescript-eslint/types": "8.35.0", + "@typescript-eslint/typescript-estree": "8.35.0", + "@typescript-eslint/visitor-keys": "8.35.0", "debug": "^4.3.4" }, "engines": { @@ -1130,14 +1130,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.34.1.tgz", - "integrity": "sha512-nuHlOmFZfuRwLJKDGQOVc0xnQrAmuq1Mj/ISou5044y1ajGNp2BNliIqp7F2LPQ5sForz8lempMFCovfeS1XoA==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.35.0.tgz", + "integrity": "sha512-41xatqRwWZuhUMF/aZm2fcUsOFKNcG28xqRSS6ZVr9BVJtGExosLAm5A1OxTjRMagx8nJqva+P5zNIGt8RIgbQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.34.1", - "@typescript-eslint/types": "^8.34.1", + "@typescript-eslint/tsconfig-utils": "^8.35.0", + "@typescript-eslint/types": "^8.35.0", "debug": "^4.3.4" }, "engines": { @@ -1152,14 +1152,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.34.1.tgz", - "integrity": "sha512-beu6o6QY4hJAgL1E8RaXNC071G4Kso2MGmJskCFQhRhg8VOH/FDbC8soP8NHN7e/Hdphwp8G8cE6OBzC8o41ZA==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.35.0.tgz", + "integrity": "sha512-+AgL5+mcoLxl1vGjwNfiWq5fLDZM1TmTPYs2UkyHfFhgERxBbqHlNjRzhThJqz+ktBqTChRYY6zwbMwy0591AA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.34.1", - "@typescript-eslint/visitor-keys": "8.34.1" + "@typescript-eslint/types": "8.35.0", + "@typescript-eslint/visitor-keys": "8.35.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1170,9 +1170,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.34.1.tgz", - "integrity": "sha512-K4Sjdo4/xF9NEeA2khOb7Y5nY6NSXBnod87uniVYW9kHP+hNlDV8trUSFeynA2uxWam4gIWgWoygPrv9VMWrYg==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.35.0.tgz", + "integrity": "sha512-04k/7247kZzFraweuEirmvUj+W3bJLI9fX6fbo1Qm2YykuBvEhRTPl8tcxlYO8kZZW+HIXfkZNoasVb8EV4jpA==", "dev": true, "license": "MIT", "engines": { @@ -1187,14 +1187,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.34.1.tgz", - "integrity": "sha512-Tv7tCCr6e5m8hP4+xFugcrwTOucB8lshffJ6zf1mF1TbU67R+ntCc6DzLNKM+s/uzDyv8gLq7tufaAhIBYeV8g==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.35.0.tgz", + "integrity": "sha512-ceNNttjfmSEoM9PW87bWLDEIaLAyR+E6BoYJQ5PfaDau37UGca9Nyq3lBk8Bw2ad0AKvYabz6wxc7DMTO2jnNA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.34.1", - "@typescript-eslint/utils": "8.34.1", + "@typescript-eslint/typescript-estree": "8.35.0", + "@typescript-eslint/utils": "8.35.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1211,9 +1211,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.34.1.tgz", - "integrity": "sha512-rjLVbmE7HR18kDsjNIZQHxmv9RZwlgzavryL5Lnj2ujIRTeXlKtILHgRNmQ3j4daw7zd+mQgy+uyt6Zo6I0IGA==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.35.0.tgz", + "integrity": "sha512-0mYH3emanku0vHw2aRLNGqe7EXh9WHEhi7kZzscrMDf6IIRUQ5Jk4wp1QrledE/36KtdZrVfKnE32eZCf/vaVQ==", "dev": true, "license": "MIT", "engines": { @@ -1225,16 +1225,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.34.1.tgz", - "integrity": "sha512-rjCNqqYPuMUF5ODD+hWBNmOitjBWghkGKJg6hiCHzUvXRy6rK22Jd3rwbP2Xi+R7oYVvIKhokHVhH41BxPV5mA==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.35.0.tgz", + "integrity": "sha512-F+BhnaBemgu1Qf8oHrxyw14wq6vbL8xwWKKMwTMwYIRmFFY/1n/9T/jpbobZL8vp7QyEUcC6xGrnAO4ua8Kp7w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.34.1", - "@typescript-eslint/tsconfig-utils": "8.34.1", - "@typescript-eslint/types": "8.34.1", - "@typescript-eslint/visitor-keys": "8.34.1", + "@typescript-eslint/project-service": "8.35.0", + "@typescript-eslint/tsconfig-utils": "8.35.0", + "@typescript-eslint/types": "8.35.0", + "@typescript-eslint/visitor-keys": "8.35.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1254,16 +1254,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.34.1.tgz", - "integrity": "sha512-mqOwUdZ3KjtGk7xJJnLbHxTuWVn3GO2WZZuM+Slhkun4+qthLdXx32C8xIXbO1kfCECb3jIs3eoxK3eryk7aoQ==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.35.0.tgz", + "integrity": "sha512-nqoMu7WWM7ki5tPgLVsmPM8CkqtoPUG6xXGeefM5t4x3XumOEKMoUZPdi+7F+/EotukN4R9OWdmDxN80fqoZeg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.34.1", - "@typescript-eslint/types": "8.34.1", - "@typescript-eslint/typescript-estree": "8.34.1" + "@typescript-eslint/scope-manager": "8.35.0", + "@typescript-eslint/types": "8.35.0", + "@typescript-eslint/typescript-estree": "8.35.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1278,13 +1278,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.34.1.tgz", - "integrity": "sha512-xoh5rJ+tgsRKoXnkBPFRLZ7rjKM0AfVbC68UZ/ECXoDbfggb9RbEySN359acY1vS3qZ0jVTVWzbtfapwm5ztxw==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.35.0.tgz", + "integrity": "sha512-zTh2+1Y8ZpmeQaQVIc/ZZxsx8UzgKJyNg1PTvjzC7WMhPSVS8bfDX34k1SrwOf016qd5RU3az2UxUNue3IfQ5g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.34.1", + "@typescript-eslint/types": "8.35.0", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -3834,15 +3834,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.34.1.tgz", - "integrity": "sha512-XjS+b6Vg9oT1BaIUfkW3M3LvqZE++rbzAMEHuccCfO/YkP43ha6w3jTEMilQxMF92nVOYCcdjv1ZUhAa1D/0ow==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.35.0.tgz", + "integrity": "sha512-uEnz70b7kBz6eg/j0Czy6K5NivaYopgxRjsnAJ2Fx5oTLo3wefTHIbL7AkQr1+7tJCRVpTs/wiM8JR/11Loq9A==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.34.1", - "@typescript-eslint/parser": "8.34.1", - "@typescript-eslint/utils": "8.34.1" + "@typescript-eslint/eslint-plugin": "8.35.0", + "@typescript-eslint/parser": "8.35.0", + "@typescript-eslint/utils": "8.35.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" From 598a3ad0418b0ce6dfe1c77ac761f802199440f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 02:19:37 +0000 Subject: [PATCH 054/111] build(deps): bump @types/node from 24.0.3 to 24.0.4 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.0.3 to 24.0.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 24.0.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ac448b0646..7f51861cdc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1030,9 +1030,9 @@ } }, "node_modules/@types/node": { - "version": "24.0.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.3.tgz", - "integrity": "sha512-R4I/kzCYAdRLzfiCabn9hxWfbuHS573x+r0dJMkkzThEa7pbrcDWK+9zu3e7aBOouf+rQAciqPFMnxwr0aWgKg==", + "version": "24.0.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.4.tgz", + "integrity": "sha512-ulyqAkrhnuNq9pB76DRBTkcS6YsmDALy6Ua63V8OhrOBgbcYt6IOdzpw5P1+dyRIyMerzLkeYWBeOXPpA9GMAA==", "license": "MIT", "dependencies": { "undici-types": "~7.8.0" From 5bdd3f955a2dcc965e3b147fa746efec9cf6ae97 Mon Sep 17 00:00:00 2001 From: Philippe Martin Date: Wed, 25 Jun 2025 11:22:16 +0200 Subject: [PATCH 055/111] fix: make yaml functions use serializer --- src/object.ts | 38 ++------------- src/util.ts | 29 ++++++++++++ src/util_test.ts | 7 +++ src/yaml.ts | 41 ++++++++++++++-- src/yaml_test.ts | 119 +++++++++++++++++++++++++++++++++++++++++++++-- 5 files changed, 194 insertions(+), 40 deletions(-) diff --git a/src/object.ts b/src/object.ts index 0548b03a04..7761cd26dd 100644 --- a/src/object.ts +++ b/src/object.ts @@ -15,6 +15,7 @@ import { ObjectSerializer } from './serializer.js'; import { KubernetesListObject, KubernetesObject } from './types.js'; import { from, mergeMap, of } from './gen/rxjsStub.js'; import { PatchStrategy } from './patch.js'; +import { getSerializationType } from './util.js'; /** Kubernetes API verbs. */ type KubernetesApiAction = 'create' | 'delete' | 'patch' | 'read' | 'list' | 'replace'; @@ -29,11 +30,6 @@ type KubernetesObjectHeader = Pic }; }; -interface GroupVersion { - group: string; - version: string; -} - /** * Dynamically construct Kubernetes API request URIs so client does not have to know what type of object it is acting * on. @@ -107,7 +103,7 @@ export class KubernetesObjectApi { if (fieldManager !== undefined) { requestContext.setQueryParam('fieldManager', ObjectSerializer.serialize(fieldManager, 'string')); } - const type = await this.getSerializationType(spec.apiVersion, spec.kind); + const type = getSerializationType(spec.apiVersion, spec.kind); // Body Params const contentType = ObjectSerializer.getPreferredMediaType([]); @@ -269,7 +265,7 @@ export class KubernetesObjectApi { requestContext.setQueryParam('force', ObjectSerializer.serialize(force, 'boolean')); } - const type = await this.getSerializationType(spec.apiVersion, spec.kind); + const type = getSerializationType(spec.apiVersion, spec.kind); // Body Params const serializedBody = ObjectSerializer.stringify( @@ -468,7 +464,7 @@ export class KubernetesObjectApi { requestContext.setQueryParam('fieldManager', ObjectSerializer.serialize(fieldManager, 'string')); } - const type = await this.getSerializationType(spec.apiVersion, spec.kind); + const type = getSerializationType(spec.apiVersion, spec.kind); // Body Params const contentType = ObjectSerializer.getPreferredMediaType([]); @@ -593,30 +589,6 @@ export class KubernetesObjectApi { } } - protected async getSerializationType(apiVersion?: string, kind?: string): Promise { - if (apiVersion === undefined || kind === undefined) { - return 'KubernetesObject'; - } - // Types are defined in src/gen/api/models with the format "". - // Version and Kind are in PascalCase. - const gv = this.groupVersion(apiVersion); - const version = gv.version.charAt(0).toUpperCase() + gv.version.slice(1); - return `${version}${kind}`; - } - - protected groupVersion(apiVersion: string): GroupVersion { - const v = apiVersion.split('/'); - return v.length === 1 - ? { - group: 'core', - version: apiVersion, - } - : { - group: v[0], - version: v[1], - }; - } - protected async requestPromise( requestContext: RequestContext, type?: string, @@ -670,7 +642,7 @@ export class KubernetesObjectApi { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const data = ObjectSerializer.parse(await response.body.text(), contentType); if (type === undefined) { - type = await this.getSerializationType(data.apiVersion, data.kind); + type = getSerializationType(data.apiVersion, data.kind); } if (!type) { diff --git a/src/util.ts b/src/util.ts index 791d89c728..e502e600d9 100644 --- a/src/util.ts +++ b/src/util.ts @@ -164,3 +164,32 @@ export function normalizeResponseHeaders(response: Response): { [key: string]: s return normalizedHeaders; } + +export function getSerializationType(apiVersion?: string, kind?: string): string { + if (apiVersion === undefined || kind === undefined) { + return 'KubernetesObject'; + } + // Types are defined in src/gen/api/models with the format "". + // Version and Kind are in PascalCase. + const gv = groupVersion(apiVersion); + const version = gv.version.charAt(0).toUpperCase() + gv.version.slice(1); + return `${version}${kind}`; +} + +interface GroupVersion { + group: string; + version: string; +} + +function groupVersion(apiVersion: string): GroupVersion { + const v = apiVersion.split('/'); + return v.length === 1 + ? { + group: 'core', + version: apiVersion, + } + : { + group: v[0], + version: v[1], + }; +} diff --git a/src/util_test.ts b/src/util_test.ts index dd1061f8d1..74a323a866 100644 --- a/src/util_test.ts +++ b/src/util_test.ts @@ -9,6 +9,7 @@ import { quantityToScalar, totalCPU, totalMemory, + getSerializationType, } from './util.js'; describe('Utils', () => { @@ -142,4 +143,10 @@ describe('Utils', () => { deepStrictEqual(normalizeResponseHeaders(response), { foo: 'bar', baz: 'k8s' }); }); + + it('should get the serialization type correctly', () => { + strictEqual(getSerializationType('v1', 'Pod'), 'V1Pod'); + strictEqual(getSerializationType('apps/v1', 'Deployment'), 'V1Deployment'); + strictEqual(getSerializationType(undefined, undefined), 'KubernetesObject'); + }); }); diff --git a/src/yaml.ts b/src/yaml.ts index 7682392ae6..09468a3e5d 100644 --- a/src/yaml.ts +++ b/src/yaml.ts @@ -1,13 +1,48 @@ import yaml from 'js-yaml'; +import { getSerializationType } from './util.js'; +import { KubernetesObject } from './types.js'; +import { ObjectSerializer } from './serializer.js'; +/** + * Load a Kubernetes object from YAML. + * @param data - The YAML string to load. + * @param opts - Optional YAML load options. + * @returns The deserialized Kubernetes object. + */ export function loadYaml(data: string, opts?: yaml.LoadOptions): T { - return yaml.load(data, opts) as any as T; + const yml = yaml.load(data, opts) as any as KubernetesObject; + if (!yml) { + throw new Error('Failed to load YAML'); + } + const type = getSerializationType(yml.apiVersion, yml.kind); + + return ObjectSerializer.deserialize(yml, type) as T; } +/** + * Load all Kubernetes objects from YAML. + * @param data - The YAML string to load. + * @param opts - Optional YAML load options. + * @returns An array of deserialized Kubernetes objects. + */ export function loadAllYaml(data: string, opts?: yaml.LoadOptions): any[] { - return yaml.loadAll(data, undefined, opts); + const ymls = yaml.loadAll(data, undefined, opts); + return ymls.map((yml) => { + const obj = yml as KubernetesObject; + const type = getSerializationType(obj.apiVersion, obj.kind); + return ObjectSerializer.deserialize(yml, type); + }); } +/** + * Dump a Kubernetes object to YAML. + * @param object - The Kubernetes object to dump. + * @param opts - Optional YAML dump options. + * @returns The YAML string representation of the serialized Kubernetes object. + */ export function dumpYaml(object: any, opts?: yaml.DumpOptions): string { - return yaml.dump(object, opts); + const kubeObject = object as KubernetesObject; + const type = getSerializationType(kubeObject.apiVersion, kubeObject.kind); + const serialized = ObjectSerializer.serialize(kubeObject, type); + return yaml.dump(serialized, opts); } diff --git a/src/yaml_test.ts b/src/yaml_test.ts index ba53293dc0..958f7ba45b 100644 --- a/src/yaml_test.ts +++ b/src/yaml_test.ts @@ -1,6 +1,6 @@ import { describe, it } from 'node:test'; -import { deepStrictEqual, strictEqual } from 'node:assert'; -import { V1Namespace } from './api.js'; +import { deepEqual, deepStrictEqual, strictEqual } from 'node:assert'; +import { V1CustomResourceDefinition, V1Namespace } from './api.js'; import { dumpYaml, loadAllYaml, loadYaml } from './yaml.js'; describe('yaml', () => { @@ -12,6 +12,43 @@ describe('yaml', () => { strictEqual(ns.kind, 'Namespace'); strictEqual(ns.metadata!.name, 'some-namespace'); }); + it('should load safely by mapping properties correctly', () => { + const yaml = ` +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: my-crd.example.com +spec: + group: example.com + versions: + - name: v1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + properties: + foobar: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true +`; + const ns = loadYaml(yaml); + + strictEqual(ns.apiVersion, 'apiextensions.k8s.io/v1'); + strictEqual(ns.kind, 'CustomResourceDefinition'); + strictEqual(ns.metadata!.name, 'my-crd.example.com'); + strictEqual( + ns.spec.versions[0]!.schema!.openAPIV3Schema!.properties!['foobar'].x_kubernetes_int_or_string, + true, + ); + strictEqual( + ns.spec.versions[0]!.schema!.openAPIV3Schema!.properties!['foobar']['x-kubernetes-int-or-string'], + undefined, + ); + }); + it('should load all safely', () => { const yaml = 'apiVersion: v1\n' + @@ -23,15 +60,49 @@ describe('yaml', () => { 'kind: Pod\n' + 'metadata:\n' + ' name: some-pod\n' + - ' namespace: some-ns\n'; + ' namespace: some-ns\n' + + '---\n' + + 'apiVersion: apiextensions.k8s.io/v1\n' + + 'kind: CustomResourceDefinition\n' + + 'metadata:\n' + + ' name: my-crd.example.com\n' + + 'spec:\n' + + ' group: example.com\n' + + ' versions:\n' + + ' - name: v1\n' + + ' served: true\n' + + ' storage: true\n' + + ' schema:\n' + + ' openAPIV3Schema:\n' + + ' type: object\n' + + ' properties:\n' + + ' foobar:\n' + + ' anyOf:\n' + + ' - type: integer\n' + + ' - type: string\n' + + ' x-kubernetes-int-or-string: true\n'; const objects = loadAllYaml(yaml); - strictEqual(objects.length, 2); + strictEqual(objects.length, 3); strictEqual(objects[0].kind, 'Namespace'); strictEqual(objects[1].kind, 'Pod'); strictEqual(objects[0].metadata.name, 'some-namespace'); strictEqual(objects[1].metadata.name, 'some-pod'); strictEqual(objects[1].metadata.namespace, 'some-ns'); + strictEqual(objects[2].apiVersion, 'apiextensions.k8s.io/v1'); + strictEqual(objects[2].kind, 'CustomResourceDefinition'); + strictEqual(objects[2].metadata!.name, 'my-crd.example.com'); + strictEqual( + objects[2].spec.versions[0]!.schema!.openAPIV3Schema!.properties!['foobar'] + .x_kubernetes_int_or_string, + true, + ); + strictEqual( + objects[2].spec.versions[0]!.schema!.openAPIV3Schema!.properties!['foobar'][ + 'x-kubernetes-int-or-string' + ], + undefined, + ); }); it('should round trip successfully', () => { const expected = { @@ -43,4 +114,44 @@ describe('yaml', () => { const actual = loadYaml(yamlString); deepStrictEqual(actual, expected); }); + + it('should round trip successfully with mapped properties', () => { + const expected: V1CustomResourceDefinition = { + apiVersion: 'apiextensions.k8s.io/v1', + kind: 'CustomResourceDefinition', + metadata: { + name: 'my-crd.example.com', + }, + spec: { + group: 'example.com', + names: { + kind: 'MyCRD', + plural: 'mycrds', + }, + scope: 'Namespaced', + versions: [ + { + name: 'v1', + schema: { + openAPIV3Schema: { + properties: { + foobar: { + anyOf: [{ type: 'integer' }, { type: 'string' }], + x_kubernetes_int_or_string: true, + }, + }, + type: 'object', + }, + }, + served: true, + storage: true, + }, + ], + }, + }; + const yamlString = dumpYaml(expected); + const actual = loadYaml(yamlString); + // not using strict equality as types are not matching + deepEqual(actual, expected); + }); }); From c01b57c09b045aed44f8bb312ec22508904bfc8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 02:47:24 +0000 Subject: [PATCH 056/111] build(deps-dev): bump prettier from 3.6.0 to 3.6.1 Bumps [prettier](https://github.com/prettier/prettier) from 3.6.0 to 3.6.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.6.0...3.6.1) --- updated-dependencies: - dependency-name: prettier dependency-version: 3.6.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7f51861cdc..b9c7f483c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3207,9 +3207,9 @@ } }, "node_modules/prettier": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.0.tgz", - "integrity": "sha512-ujSB9uXHJKzM/2GBuE0hBOUgC77CN3Bnpqa+g80bkv3T3A93wL/xlzDATHhnhkzifz/UE2SNOvmbTz5hSkDlHw==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.1.tgz", + "integrity": "sha512-5xGWRa90Sp2+x1dQtNpIpeOQpTDBs9cZDmA/qs2vDNN2i18PdapqY7CmBeyLlMuGqXJRIOPaCaVZTLNQRWUH/A==", "dev": true, "license": "MIT", "bin": { From 1c6ec391768b6ce0b6a1a73865dcd284e54f6bdf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 03:24:40 +0000 Subject: [PATCH 057/111] build(deps-dev): bump @eslint/js from 9.29.0 to 9.30.0 Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.29.0 to 9.30.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/commits/v9.30.0/packages/js) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-version: 9.30.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9c7f483c8..e46cb0c579 100644 --- a/package-lock.json +++ b/package-lock.json @@ -632,11 +632,10 @@ } }, "node_modules/@eslint/js": { - "version": "9.29.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.29.0.tgz", - "integrity": "sha512-3PIF4cBw/y+1u2EazflInpV+lYsSG0aByVIQzAgb1m1MhHFSbqTyNqtBKHgWf/9Ykud+DhILS9EGkmekVhbKoQ==", + "version": "9.30.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.30.0.tgz", + "integrity": "sha512-Wzw3wQwPvc9sHM+NjakWTcPx11mbZyiYHuwWa/QfZ7cIRX7WK54PSk7bdyXDaoaopUcMatv1zaQvOAAO8hCdww==", "dev": true, - "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -2018,6 +2017,18 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/@eslint/js": { + "version": "9.29.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.29.0.tgz", + "integrity": "sha512-3PIF4cBw/y+1u2EazflInpV+lYsSG0aByVIQzAgb1m1MhHFSbqTyNqtBKHgWf/9Ykud+DhILS9EGkmekVhbKoQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", From 15ae1dba6f7eb2e2513870c62667ba5088d40c00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 03:25:30 +0000 Subject: [PATCH 058/111] build(deps-dev): bump eslint from 9.29.0 to 9.30.0 Bumps [eslint](https://github.com/eslint/eslint) from 9.29.0 to 9.30.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.29.0...v9.30.0) --- updated-dependencies: - dependency-name: eslint dependency-version: 9.30.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9c7f483c8..a23b1d2fd6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -522,11 +522,10 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.1.tgz", - "integrity": "sha512-OL0RJzC/CBzli0DrrR31qzj6d6i6Mm3HByuhflhl4LOBiWxN+3i6/t/ZQQNii4tjksXi8r2CRW1wMpWA2ULUEw==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", + "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@eslint/object-schema": "^2.1.6", "debug": "^4.3.1", @@ -541,7 +540,6 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -552,7 +550,6 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -561,11 +558,10 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.1.tgz", - "integrity": "sha512-RI17tsD2frtDu/3dmI7QRrD4bedNKPM08ziRYaC5AhkGrzIAJelm9kJU1TznK+apx6V+cqRz8tfpEeG3oIyjxw==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.0.tgz", + "integrity": "sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -632,11 +628,10 @@ } }, "node_modules/@eslint/js": { - "version": "9.29.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.29.0.tgz", - "integrity": "sha512-3PIF4cBw/y+1u2EazflInpV+lYsSG0aByVIQzAgb1m1MhHFSbqTyNqtBKHgWf/9Ykud+DhILS9EGkmekVhbKoQ==", + "version": "9.30.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.30.0.tgz", + "integrity": "sha512-Wzw3wQwPvc9sHM+NjakWTcPx11mbZyiYHuwWa/QfZ7cIRX7WK54PSk7bdyXDaoaopUcMatv1zaQvOAAO8hCdww==", "dev": true, - "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -649,7 +644,6 @@ "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", "dev": true, - "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -1909,19 +1903,18 @@ } }, "node_modules/eslint": { - "version": "9.29.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.29.0.tgz", - "integrity": "sha512-GsGizj2Y1rCWDu6XoEekL3RLilp0voSePurjZIkxL3wlm5o5EC9VpgaP7lrCvjnkuLvzFBQWB3vWB3K5KQTveQ==", + "version": "9.30.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.30.0.tgz", + "integrity": "sha512-iN/SiPxmQu6EVkf+m1qpBxzUhE12YqFLOSySuOyVLJLEF9nzTf+h/1AJYc1JWzCnktggeNrjvQGLngDzXirU6g==", "dev": true, - "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.20.1", - "@eslint/config-helpers": "^0.2.1", + "@eslint/config-array": "^0.21.0", + "@eslint/config-helpers": "^0.3.0", "@eslint/core": "^0.14.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.29.0", + "@eslint/js": "9.30.0", "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", From 6080f755a501ebdffd41b125bbcf71f0ac19cf09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 03:27:11 +0000 Subject: [PATCH 059/111] build(deps): bump ws from 8.18.2 to 8.18.3 Bumps [ws](https://github.com/websockets/ws) from 8.18.2 to 8.18.3. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/8.18.2...8.18.3) --- updated-dependencies: - dependency-name: ws dependency-version: 8.18.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9c7f483c8..9fb4e5209b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4038,10 +4038,9 @@ "license": "ISC" }, "node_modules/ws": { - "version": "8.18.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", - "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", - "license": "MIT", + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "engines": { "node": ">=10.0.0" }, From 382a5cbb3de45416eeb095eff94f5738b324597f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 03:27:28 +0000 Subject: [PATCH 060/111] build(deps-dev): bump typedoc from 0.28.5 to 0.28.7 Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.28.5 to 0.28.7. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.28.5...v0.28.7) --- updated-dependencies: - dependency-name: typedoc dependency-version: 0.28.7 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 76 ++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 43 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9c7f483c8..b9fc2c4ac7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -669,16 +669,15 @@ } }, "node_modules/@gerrit0/mini-shiki": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.2.2.tgz", - "integrity": "sha512-vaZNGhGLKMY14HbF53xxHNgFO9Wz+t5lTlGNpl2N9xFiKQ0I5oIe0vKjU9dh7Nb3Dw6lZ7wqUE0ri+zcdpnK+Q==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.7.0.tgz", + "integrity": "sha512-7iY9wg4FWXmeoFJpUL2u+tsmh0d0jcEJHAIzVxl3TG4KL493JNnisdLAILZ77zcD+z3J0keEXZ+lFzUgzQzPDg==", "dev": true, - "license": "MIT", "dependencies": { - "@shikijs/engine-oniguruma": "^3.2.1", - "@shikijs/langs": "^3.2.1", - "@shikijs/themes": "^3.2.1", - "@shikijs/types": "^3.2.1", + "@shikijs/engine-oniguruma": "^3.7.0", + "@shikijs/langs": "^3.7.0", + "@shikijs/themes": "^3.7.0", + "@shikijs/types": "^3.7.0", "@shikijs/vscode-textmate": "^10.0.2" } }, @@ -934,42 +933,38 @@ } }, "node_modules/@shikijs/engine-oniguruma": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.2.1.tgz", - "integrity": "sha512-wZZAkayEn6qu2+YjenEoFqj0OyQI64EWsNR6/71d1EkG4sxEOFooowKivsWPpaWNBu3sxAG+zPz5kzBL/SsreQ==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.7.0.tgz", + "integrity": "sha512-5BxcD6LjVWsGu4xyaBC5bu8LdNgPCVBnAkWTtOCs/CZxcB22L8rcoWfv7Hh/3WooVjBZmFtyxhgvkQFedPGnFw==", "dev": true, - "license": "MIT", "dependencies": { - "@shikijs/types": "3.2.1", + "@shikijs/types": "3.7.0", "@shikijs/vscode-textmate": "^10.0.2" } }, "node_modules/@shikijs/langs": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.2.1.tgz", - "integrity": "sha512-If0iDHYRSGbihiA8+7uRsgb1er1Yj11pwpX1c6HLYnizDsKAw5iaT3JXj5ZpaimXSWky/IhxTm7C6nkiYVym+A==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.7.0.tgz", + "integrity": "sha512-1zYtdfXLr9xDKLTGy5kb7O0zDQsxXiIsw1iIBcNOO8Yi5/Y1qDbJ+0VsFoqTlzdmneO8Ij35g7QKF8kcLyznCQ==", "dev": true, - "license": "MIT", "dependencies": { - "@shikijs/types": "3.2.1" + "@shikijs/types": "3.7.0" } }, "node_modules/@shikijs/themes": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.2.1.tgz", - "integrity": "sha512-k5DKJUT8IldBvAm8WcrDT5+7GA7se6lLksR+2E3SvyqGTyFMzU2F9Gb7rmD+t+Pga1MKrYFxDIeyWjMZWM6uBQ==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.7.0.tgz", + "integrity": "sha512-VJx8497iZPy5zLiiCTSIaOChIcKQwR0FebwE9S3rcN0+J/GTWwQ1v/bqhTbpbY3zybPKeO8wdammqkpXc4NVjQ==", "dev": true, - "license": "MIT", "dependencies": { - "@shikijs/types": "3.2.1" + "@shikijs/types": "3.7.0" } }, "node_modules/@shikijs/types": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.2.1.tgz", - "integrity": "sha512-/NTWAk4KE2M8uac0RhOsIhYQf4pdU0OywQuYDGIGAJ6Mjunxl2cGiuLkvu4HLCMn+OTTLRWkjZITp+aYJv60yA==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.7.0.tgz", + "integrity": "sha512-MGaLeaRlSWpnP0XSAum3kP3a8vtcTsITqoEPYdt3lQG3YCdQH4DnEhodkYcNMcU0uW0RffhoD1O3e0vG5eSBBg==", "dev": true, - "license": "MIT", "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" @@ -979,8 +974,7 @@ "version": "10.0.2", "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@types/estree": { "version": "1.0.7", @@ -994,7 +988,6 @@ "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/unist": "*" } @@ -1061,8 +1054,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.35.0", @@ -3796,17 +3788,16 @@ } }, "node_modules/typedoc": { - "version": "0.28.5", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.5.tgz", - "integrity": "sha512-5PzUddaA9FbaarUzIsEc4wNXCiO4Ot3bJNeMF2qKpYlTmM9TTaSHQ7162w756ERCkXER/+o2purRG6YOAv6EMA==", + "version": "0.28.7", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.7.tgz", + "integrity": "sha512-lpz0Oxl6aidFkmS90VQDQjk/Qf2iw0IUvFqirdONBdj7jPSN9mGXhy66BcGNDxx5ZMyKKiBVAREvPEzT6Uxipw==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "@gerrit0/mini-shiki": "^3.2.2", + "@gerrit0/mini-shiki": "^3.7.0", "lunr": "^2.3.9", "markdown-it": "^14.1.0", "minimatch": "^9.0.5", - "yaml": "^2.7.1" + "yaml": "^2.8.0" }, "bin": { "typedoc": "bin/typedoc" @@ -4069,16 +4060,15 @@ } }, "node_modules/yaml": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.1.tgz", - "integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz", + "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==", "dev": true, - "license": "ISC", "bin": { "yaml": "bin.mjs" }, "engines": { - "node": ">= 14" + "node": ">= 14.6" } }, "node_modules/yargs": { From 34b561081b723265cc2e5afefbf1d91c264ddbc9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 04:50:16 +0000 Subject: [PATCH 061/111] build(deps-dev): bump prettier from 3.6.1 to 3.6.2 Bumps [prettier](https://github.com/prettier/prettier) from 3.6.1 to 3.6.2. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.6.1...3.6.2) --- updated-dependencies: - dependency-name: prettier dependency-version: 3.6.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9c7f483c8..bef02f87ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3207,11 +3207,10 @@ } }, "node_modules/prettier": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.1.tgz", - "integrity": "sha512-5xGWRa90Sp2+x1dQtNpIpeOQpTDBs9cZDmA/qs2vDNN2i18PdapqY7CmBeyLlMuGqXJRIOPaCaVZTLNQRWUH/A==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, - "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, From ad37f4d3eedf6a1fa8e8c1d486dd3fa041d49cf4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 06:38:18 +0000 Subject: [PATCH 062/111] build(deps-dev): bump typescript-eslint from 8.35.0 to 8.35.1 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.35.0 to 8.35.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.35.1/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-version: 8.35.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 163 +++++++++++++++++----------------------------- 1 file changed, 61 insertions(+), 102 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0ed8a99d6f..00ec470800 100644 --- a/package-lock.json +++ b/package-lock.json @@ -844,7 +844,6 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -858,7 +857,6 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } @@ -868,7 +866,6 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -1051,17 +1048,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.35.0.tgz", - "integrity": "sha512-ijItUYaiWuce0N1SoSMrEd0b6b6lYkYt99pqCPfybd+HKVXtEvYhICfLdwp42MhiI5mp0oq7PKEL+g1cNiz/Eg==", + "version": "8.35.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.35.1.tgz", + "integrity": "sha512-9XNTlo7P7RJxbVeICaIIIEipqxLKguyh+3UbXuT2XQuFp6d8VOeDEGuz5IiX0dgZo8CiI6aOFLg4e8cF71SFVg==", "dev": true, - "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.35.0", - "@typescript-eslint/type-utils": "8.35.0", - "@typescript-eslint/utils": "8.35.0", - "@typescript-eslint/visitor-keys": "8.35.0", + "@typescript-eslint/scope-manager": "8.35.1", + "@typescript-eslint/type-utils": "8.35.1", + "@typescript-eslint/utils": "8.35.1", + "@typescript-eslint/visitor-keys": "8.35.1", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -1075,7 +1071,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.35.0", + "@typescript-eslint/parser": "^8.35.1", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } @@ -1085,22 +1081,20 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.35.0.tgz", - "integrity": "sha512-6sMvZePQrnZH2/cJkwRpkT7DxoAWh+g6+GFRK6bV3YQo7ogi3SX5rgF6099r5Q53Ma5qeT7LGmOmuIutF4t3lA==", + "version": "8.35.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.35.1.tgz", + "integrity": "sha512-3MyiDfrfLeK06bi/g9DqJxP5pV74LNv4rFTyvGDmT3x2p1yp1lOd+qYZfiRPIOf/oON+WRZR5wxxuF85qOar+w==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.35.0", - "@typescript-eslint/types": "8.35.0", - "@typescript-eslint/typescript-estree": "8.35.0", - "@typescript-eslint/visitor-keys": "8.35.0", + "@typescript-eslint/scope-manager": "8.35.1", + "@typescript-eslint/types": "8.35.1", + "@typescript-eslint/typescript-estree": "8.35.1", + "@typescript-eslint/visitor-keys": "8.35.1", "debug": "^4.3.4" }, "engines": { @@ -1116,14 +1110,13 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.35.0.tgz", - "integrity": "sha512-41xatqRwWZuhUMF/aZm2fcUsOFKNcG28xqRSS6ZVr9BVJtGExosLAm5A1OxTjRMagx8nJqva+P5zNIGt8RIgbQ==", + "version": "8.35.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.35.1.tgz", + "integrity": "sha512-VYxn/5LOpVxADAuP3NrnxxHYfzVtQzLKeldIhDhzC8UHaiQvYlXvKuVho1qLduFbJjjy5U5bkGwa3rUGUb1Q6Q==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.35.0", - "@typescript-eslint/types": "^8.35.0", + "@typescript-eslint/tsconfig-utils": "^8.35.1", + "@typescript-eslint/types": "^8.35.1", "debug": "^4.3.4" }, "engines": { @@ -1138,14 +1131,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.35.0.tgz", - "integrity": "sha512-+AgL5+mcoLxl1vGjwNfiWq5fLDZM1TmTPYs2UkyHfFhgERxBbqHlNjRzhThJqz+ktBqTChRYY6zwbMwy0591AA==", + "version": "8.35.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.35.1.tgz", + "integrity": "sha512-s/Bpd4i7ht2934nG+UoSPlYXd08KYz3bmjLEb7Ye1UVob0d1ENiT3lY8bsCmik4RqfSbPw9xJJHbugpPpP5JUg==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.35.0", - "@typescript-eslint/visitor-keys": "8.35.0" + "@typescript-eslint/types": "8.35.1", + "@typescript-eslint/visitor-keys": "8.35.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1156,11 +1148,10 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.35.0.tgz", - "integrity": "sha512-04k/7247kZzFraweuEirmvUj+W3bJLI9fX6fbo1Qm2YykuBvEhRTPl8tcxlYO8kZZW+HIXfkZNoasVb8EV4jpA==", + "version": "8.35.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.35.1.tgz", + "integrity": "sha512-K5/U9VmT9dTHoNowWZpz+/TObS3xqC5h0xAIjXPw+MNcKV9qg6eSatEnmeAwkjHijhACH0/N7bkhKvbt1+DXWQ==", "dev": true, - "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -1173,14 +1164,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.35.0.tgz", - "integrity": "sha512-ceNNttjfmSEoM9PW87bWLDEIaLAyR+E6BoYJQ5PfaDau37UGca9Nyq3lBk8Bw2ad0AKvYabz6wxc7DMTO2jnNA==", + "version": "8.35.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.35.1.tgz", + "integrity": "sha512-HOrUBlfVRz5W2LIKpXzZoy6VTZzMu2n8q9C2V/cFngIC5U1nStJgv0tMV4sZPzdf4wQm9/ToWUFPMN9Vq9VJQQ==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.35.0", - "@typescript-eslint/utils": "8.35.0", + "@typescript-eslint/typescript-estree": "8.35.1", + "@typescript-eslint/utils": "8.35.1", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1197,11 +1187,10 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.35.0.tgz", - "integrity": "sha512-0mYH3emanku0vHw2aRLNGqe7EXh9WHEhi7kZzscrMDf6IIRUQ5Jk4wp1QrledE/36KtdZrVfKnE32eZCf/vaVQ==", + "version": "8.35.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.35.1.tgz", + "integrity": "sha512-q/O04vVnKHfrrhNAscndAn1tuQhIkwqnaW+eu5waD5IPts2eX1dgJxgqcPx5BX109/qAz7IG6VrEPTOYKCNfRQ==", "dev": true, - "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -1211,16 +1200,15 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.35.0.tgz", - "integrity": "sha512-F+BhnaBemgu1Qf8oHrxyw14wq6vbL8xwWKKMwTMwYIRmFFY/1n/9T/jpbobZL8vp7QyEUcC6xGrnAO4ua8Kp7w==", + "version": "8.35.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.35.1.tgz", + "integrity": "sha512-Vvpuvj4tBxIka7cPs6Y1uvM7gJgdF5Uu9F+mBJBPY4MhvjrjWGK4H0lVgLJd/8PWZ23FTqsaJaLEkBCFUk8Y9g==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.35.0", - "@typescript-eslint/tsconfig-utils": "8.35.0", - "@typescript-eslint/types": "8.35.0", - "@typescript-eslint/visitor-keys": "8.35.0", + "@typescript-eslint/project-service": "8.35.1", + "@typescript-eslint/tsconfig-utils": "8.35.1", + "@typescript-eslint/types": "8.35.1", + "@typescript-eslint/visitor-keys": "8.35.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1240,16 +1228,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.35.0.tgz", - "integrity": "sha512-nqoMu7WWM7ki5tPgLVsmPM8CkqtoPUG6xXGeefM5t4x3XumOEKMoUZPdi+7F+/EotukN4R9OWdmDxN80fqoZeg==", + "version": "8.35.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.35.1.tgz", + "integrity": "sha512-lhnwatFmOFcazAsUm3ZnZFpXSxiwoa1Lj50HphnDe1Et01NF4+hrdXONSUHIcbVu2eFb1bAf+5yjXkGVkXBKAQ==", "dev": true, - "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.35.0", - "@typescript-eslint/types": "8.35.0", - "@typescript-eslint/typescript-estree": "8.35.0" + "@typescript-eslint/scope-manager": "8.35.1", + "@typescript-eslint/types": "8.35.1", + "@typescript-eslint/typescript-estree": "8.35.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1264,13 +1251,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.35.0.tgz", - "integrity": "sha512-zTh2+1Y8ZpmeQaQVIc/ZZxsx8UzgKJyNg1PTvjzC7WMhPSVS8bfDX34k1SrwOf016qd5RU3az2UxUNue3IfQ5g==", + "version": "8.35.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.35.1.tgz", + "integrity": "sha512-VRwixir4zBWCSTP/ljEo091lbpypz57PoeAQ9imjG+vbeof9LplljsL1mos4ccG6H9IjfrVGM359RozUnuFhpw==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.35.0", + "@typescript-eslint/types": "8.35.1", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -1471,7 +1457,6 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, - "license": "MIT", "dependencies": { "fill-range": "^7.1.1" }, @@ -2003,18 +1988,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@eslint/js": { - "version": "9.29.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.29.0.tgz", - "integrity": "sha512-3PIF4cBw/y+1u2EazflInpV+lYsSG0aByVIQzAgb1m1MhHFSbqTyNqtBKHgWf/9Ykud+DhILS9EGkmekVhbKoQ==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - } - }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2121,7 +2094,6 @@ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -2138,7 +2110,6 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -2165,7 +2136,6 @@ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", "dev": true, - "license": "ISC", "dependencies": { "reusify": "^1.0.4" } @@ -2188,7 +2158,6 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -2424,8 +2393,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/has-flag": { "version": "4.0.0", @@ -2603,7 +2571,6 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -2894,7 +2861,6 @@ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } @@ -2904,7 +2870,6 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, - "license": "MIT", "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -3185,7 +3150,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.6" }, @@ -3327,8 +3291,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/require-directory": { "version": "2.1.1", @@ -3365,7 +3328,6 @@ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, - "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -3396,7 +3358,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } @@ -3714,7 +3675,6 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -3829,15 +3789,14 @@ } }, "node_modules/typescript-eslint": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.35.0.tgz", - "integrity": "sha512-uEnz70b7kBz6eg/j0Czy6K5NivaYopgxRjsnAJ2Fx5oTLo3wefTHIbL7AkQr1+7tJCRVpTs/wiM8JR/11Loq9A==", + "version": "8.35.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.35.1.tgz", + "integrity": "sha512-xslJjFzhOmHYQzSB/QTeASAHbjmxOGEP6Coh93TXmUBFQoJ1VU35UHIDmG06Jd6taf3wqqC1ntBnCMeymy5Ovw==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.35.0", - "@typescript-eslint/parser": "8.35.0", - "@typescript-eslint/utils": "8.35.0" + "@typescript-eslint/eslint-plugin": "8.35.1", + "@typescript-eslint/parser": "8.35.1", + "@typescript-eslint/utils": "8.35.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" From d7ce0484259304c7e51903077ac3ae0bb779401f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 07:02:21 +0000 Subject: [PATCH 063/111] build(deps): bump tar-fs from 3.0.10 to 3.1.0 Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 3.0.10 to 3.1.0. - [Commits](https://github.com/mafintosh/tar-fs/compare/v3.0.10...v3.1.0) --- updated-dependencies: - dependency-name: tar-fs dependency-version: 3.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0ed8a99d6f..4dad6a6d73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2003,18 +2003,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@eslint/js": { - "version": "9.29.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.29.0.tgz", - "integrity": "sha512-3PIF4cBw/y+1u2EazflInpV+lYsSG0aByVIQzAgb1m1MhHFSbqTyNqtBKHgWf/9Ykud+DhILS9EGkmekVhbKoQ==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - } - }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -3654,10 +3642,9 @@ } }, "node_modules/tar-fs": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.10.tgz", - "integrity": "sha512-C1SwlQGNLe/jPNqapK8epDsXME7CAJR5RL3GcE6KWx1d9OUByzoHVcbu1VPI8tevg9H8Alae0AApHHFGzrD5zA==", - "license": "MIT", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.0.tgz", + "integrity": "sha512-5Mty5y/sOF1YWj1J6GiBodjlDc05CUR8PKXrsnFAiSG0xA+GHeWLovaZPYUDXkH/1iKRf2+M5+OrRgzC7O9b7w==", "dependencies": { "pump": "^3.0.0", "tar-stream": "^3.1.5" From 3055a7bbeb8fc2b47aa69d158681dc0dcd8775e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 03:07:11 +0000 Subject: [PATCH 064/111] build(deps): bump openid-client from 6.6.1 to 6.6.2 Bumps [openid-client](https://github.com/panva/openid-client) from 6.6.1 to 6.6.2. - [Release notes](https://github.com/panva/openid-client/releases) - [Changelog](https://github.com/panva/openid-client/blob/main/CHANGELOG.md) - [Commits](https://github.com/panva/openid-client/compare/v6.6.1...v6.6.2) --- updated-dependencies: - dependency-name: openid-client dependency-version: 6.6.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index f90c427ac1..0f5eb1e68e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2984,10 +2984,9 @@ } }, "node_modules/oauth4webapi": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.5.3.tgz", - "integrity": "sha512-2bnHosmBLAQpXNBLOvaJMyMkr4Yya5ohE5Q9jqyxiN+aa7GFCzvDN1RRRMrp0NkfqRR2MTaQNkcSUCCjILD9oQ==", - "license": "MIT", + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.5.5.tgz", + "integrity": "sha512-1K88D2GiAydGblHo39NBro5TebGXa+7tYoyIbxvqv3+haDDry7CBE1eSYuNbOSsYCCU6y0gdynVZAkm4YPw4hg==", "funding": { "url": "https://github.com/sponsors/panva" } @@ -3002,13 +3001,12 @@ } }, "node_modules/openid-client": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-6.6.1.tgz", - "integrity": "sha512-GmqoICGMI3IyFFjhvXxad8of4QWk2D0tm4vdJkldGm9nw7J3p1f7LPLWgGeFuKuw8HjDVe8Dd8QLGBe0NFvSSg==", - "license": "MIT", + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-6.6.2.tgz", + "integrity": "sha512-Xya5TNMnnZuTM6DbHdB4q0S3ig2NTAELnii/ASie1xDEr8iiB8zZbO871OWBdrw++sd3hW6bqWjgcmSy1RTWHA==", "dependencies": { "jose": "^6.0.11", - "oauth4webapi": "^3.5.3" + "oauth4webapi": "^3.5.4" }, "funding": { "url": "https://github.com/sponsors/panva" From 6f430815ddbdbd76bf72eeae661cd5aa4370e18e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 03:07:37 +0000 Subject: [PATCH 065/111] build(deps-dev): bump eslint from 9.30.0 to 9.30.1 Bumps [eslint](https://github.com/eslint/eslint) from 9.30.0 to 9.30.1. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.30.0...v9.30.1) --- updated-dependencies: - dependency-name: eslint dependency-version: 9.30.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index f90c427ac1..6a190175d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -628,9 +628,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.30.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.30.0.tgz", - "integrity": "sha512-Wzw3wQwPvc9sHM+NjakWTcPx11mbZyiYHuwWa/QfZ7cIRX7WK54PSk7bdyXDaoaopUcMatv1zaQvOAAO8hCdww==", + "version": "9.30.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.30.1.tgz", + "integrity": "sha512-zXhuECFlyep42KZUhWjfvsmXGX39W8K8LFb8AWXM9gSV9dQB+MrJGLKvW6Zw0Ggnbpw0VHTtrhFXYe3Gym18jg==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1880,9 +1880,9 @@ } }, "node_modules/eslint": { - "version": "9.30.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.30.0.tgz", - "integrity": "sha512-iN/SiPxmQu6EVkf+m1qpBxzUhE12YqFLOSySuOyVLJLEF9nzTf+h/1AJYc1JWzCnktggeNrjvQGLngDzXirU6g==", + "version": "9.30.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.30.1.tgz", + "integrity": "sha512-zmxXPNMOXmwm9E0yQLi5uqXHs7uq2UIiqEKo3Gq+3fwo1XrJ+hijAZImyF7hclW3E6oHz43Yk3RP8at6OTKflQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", @@ -1891,7 +1891,7 @@ "@eslint/config-helpers": "^0.3.0", "@eslint/core": "^0.14.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.30.0", + "@eslint/js": "9.30.1", "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", From 8ba8025cc1ef5a45ac457220fd75523611b32ee9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 03:47:32 +0000 Subject: [PATCH 066/111] build(deps-dev): bump typescript-eslint from 8.35.1 to 8.36.0 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.35.1 to 8.36.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.36.0/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-version: 8.36.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 118 +++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/package-lock.json b/package-lock.json index fc65baa841..2747dfa6e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1048,16 +1048,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.35.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.35.1.tgz", - "integrity": "sha512-9XNTlo7P7RJxbVeICaIIIEipqxLKguyh+3UbXuT2XQuFp6d8VOeDEGuz5IiX0dgZo8CiI6aOFLg4e8cF71SFVg==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.36.0.tgz", + "integrity": "sha512-lZNihHUVB6ZZiPBNgOQGSxUASI7UJWhT8nHyUGCnaQ28XFCw98IfrMCG3rUl1uwUWoAvodJQby2KTs79UTcrAg==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.35.1", - "@typescript-eslint/type-utils": "8.35.1", - "@typescript-eslint/utils": "8.35.1", - "@typescript-eslint/visitor-keys": "8.35.1", + "@typescript-eslint/scope-manager": "8.36.0", + "@typescript-eslint/type-utils": "8.36.0", + "@typescript-eslint/utils": "8.36.0", + "@typescript-eslint/visitor-keys": "8.36.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -1071,7 +1071,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.35.1", + "@typescript-eslint/parser": "^8.36.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } @@ -1086,15 +1086,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.35.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.35.1.tgz", - "integrity": "sha512-3MyiDfrfLeK06bi/g9DqJxP5pV74LNv4rFTyvGDmT3x2p1yp1lOd+qYZfiRPIOf/oON+WRZR5wxxuF85qOar+w==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.36.0.tgz", + "integrity": "sha512-FuYgkHwZLuPbZjQHzJXrtXreJdFMKl16BFYyRrLxDhWr6Qr7Kbcu2s1Yhu8tsiMXw1S0W1pjfFfYEt+R604s+Q==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.35.1", - "@typescript-eslint/types": "8.35.1", - "@typescript-eslint/typescript-estree": "8.35.1", - "@typescript-eslint/visitor-keys": "8.35.1", + "@typescript-eslint/scope-manager": "8.36.0", + "@typescript-eslint/types": "8.36.0", + "@typescript-eslint/typescript-estree": "8.36.0", + "@typescript-eslint/visitor-keys": "8.36.0", "debug": "^4.3.4" }, "engines": { @@ -1110,13 +1110,13 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.35.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.35.1.tgz", - "integrity": "sha512-VYxn/5LOpVxADAuP3NrnxxHYfzVtQzLKeldIhDhzC8UHaiQvYlXvKuVho1qLduFbJjjy5U5bkGwa3rUGUb1Q6Q==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.36.0.tgz", + "integrity": "sha512-JAhQFIABkWccQYeLMrHadu/fhpzmSQ1F1KXkpzqiVxA/iYI6UnRt2trqXHt1sYEcw1mxLnB9rKMsOxXPxowN/g==", "dev": true, "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.35.1", - "@typescript-eslint/types": "^8.35.1", + "@typescript-eslint/tsconfig-utils": "^8.36.0", + "@typescript-eslint/types": "^8.36.0", "debug": "^4.3.4" }, "engines": { @@ -1131,13 +1131,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.35.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.35.1.tgz", - "integrity": "sha512-s/Bpd4i7ht2934nG+UoSPlYXd08KYz3bmjLEb7Ye1UVob0d1ENiT3lY8bsCmik4RqfSbPw9xJJHbugpPpP5JUg==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.36.0.tgz", + "integrity": "sha512-wCnapIKnDkN62fYtTGv2+RY8FlnBYA3tNm0fm91kc2BjPhV2vIjwwozJ7LToaLAyb1ca8BxrS7vT+Pvvf7RvqA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.35.1", - "@typescript-eslint/visitor-keys": "8.35.1" + "@typescript-eslint/types": "8.36.0", + "@typescript-eslint/visitor-keys": "8.36.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1148,9 +1148,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.35.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.35.1.tgz", - "integrity": "sha512-K5/U9VmT9dTHoNowWZpz+/TObS3xqC5h0xAIjXPw+MNcKV9qg6eSatEnmeAwkjHijhACH0/N7bkhKvbt1+DXWQ==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.36.0.tgz", + "integrity": "sha512-Nhh3TIEgN18mNbdXpd5Q8mSCBnrZQeY9V7Ca3dqYvNDStNIGRmJA6dmrIPMJ0kow3C7gcQbpsG2rPzy1Ks/AnA==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1164,13 +1164,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.35.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.35.1.tgz", - "integrity": "sha512-HOrUBlfVRz5W2LIKpXzZoy6VTZzMu2n8q9C2V/cFngIC5U1nStJgv0tMV4sZPzdf4wQm9/ToWUFPMN9Vq9VJQQ==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.36.0.tgz", + "integrity": "sha512-5aaGYG8cVDd6cxfk/ynpYzxBRZJk7w/ymto6uiyUFtdCozQIsQWh7M28/6r57Fwkbweng8qAzoMCPwSJfWlmsg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.35.1", - "@typescript-eslint/utils": "8.35.1", + "@typescript-eslint/typescript-estree": "8.36.0", + "@typescript-eslint/utils": "8.36.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1187,9 +1187,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.35.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.35.1.tgz", - "integrity": "sha512-q/O04vVnKHfrrhNAscndAn1tuQhIkwqnaW+eu5waD5IPts2eX1dgJxgqcPx5BX109/qAz7IG6VrEPTOYKCNfRQ==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.36.0.tgz", + "integrity": "sha512-xGms6l5cTJKQPZOKM75Dl9yBfNdGeLRsIyufewnxT4vZTrjC0ImQT4fj8QmtJK84F58uSh5HVBSANwcfiXxABQ==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1200,15 +1200,15 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.35.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.35.1.tgz", - "integrity": "sha512-Vvpuvj4tBxIka7cPs6Y1uvM7gJgdF5Uu9F+mBJBPY4MhvjrjWGK4H0lVgLJd/8PWZ23FTqsaJaLEkBCFUk8Y9g==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.36.0.tgz", + "integrity": "sha512-JaS8bDVrfVJX4av0jLpe4ye0BpAaUW7+tnS4Y4ETa3q7NoZgzYbN9zDQTJ8kPb5fQ4n0hliAt9tA4Pfs2zA2Hg==", "dev": true, "dependencies": { - "@typescript-eslint/project-service": "8.35.1", - "@typescript-eslint/tsconfig-utils": "8.35.1", - "@typescript-eslint/types": "8.35.1", - "@typescript-eslint/visitor-keys": "8.35.1", + "@typescript-eslint/project-service": "8.36.0", + "@typescript-eslint/tsconfig-utils": "8.36.0", + "@typescript-eslint/types": "8.36.0", + "@typescript-eslint/visitor-keys": "8.36.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1228,15 +1228,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.35.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.35.1.tgz", - "integrity": "sha512-lhnwatFmOFcazAsUm3ZnZFpXSxiwoa1Lj50HphnDe1Et01NF4+hrdXONSUHIcbVu2eFb1bAf+5yjXkGVkXBKAQ==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.36.0.tgz", + "integrity": "sha512-VOqmHu42aEMT+P2qYjylw6zP/3E/HvptRwdn/PZxyV27KhZg2IOszXod4NcXisWzPAGSS4trE/g4moNj6XmH2g==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.35.1", - "@typescript-eslint/types": "8.35.1", - "@typescript-eslint/typescript-estree": "8.35.1" + "@typescript-eslint/scope-manager": "8.36.0", + "@typescript-eslint/types": "8.36.0", + "@typescript-eslint/typescript-estree": "8.36.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1251,12 +1251,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.35.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.35.1.tgz", - "integrity": "sha512-VRwixir4zBWCSTP/ljEo091lbpypz57PoeAQ9imjG+vbeof9LplljsL1mos4ccG6H9IjfrVGM359RozUnuFhpw==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.36.0.tgz", + "integrity": "sha512-vZrhV2lRPWDuGoxcmrzRZyxAggPL+qp3WzUrlZD+slFueDiYHxeBa34dUXPuC0RmGKzl4lS5kFJYvKCq9cnNDA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.35.1", + "@typescript-eslint/types": "8.36.0", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -3786,14 +3786,14 @@ } }, "node_modules/typescript-eslint": { - "version": "8.35.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.35.1.tgz", - "integrity": "sha512-xslJjFzhOmHYQzSB/QTeASAHbjmxOGEP6Coh93TXmUBFQoJ1VU35UHIDmG06Jd6taf3wqqC1ntBnCMeymy5Ovw==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.36.0.tgz", + "integrity": "sha512-fTCqxthY+h9QbEgSIBfL9iV6CvKDFuoxg6bHPNpJ9HIUzS+jy2lCEyCmGyZRWEBSaykqcDPf1SJ+BfCI8DRopA==", "dev": true, "dependencies": { - "@typescript-eslint/eslint-plugin": "8.35.1", - "@typescript-eslint/parser": "8.35.1", - "@typescript-eslint/utils": "8.35.1" + "@typescript-eslint/eslint-plugin": "8.36.0", + "@typescript-eslint/parser": "8.36.0", + "@typescript-eslint/utils": "8.36.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" From 6c8e875cdcae1f62f9f95b052ff12e5fa00a5d90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Jul 2025 09:07:30 -0400 Subject: [PATCH 067/111] build(deps): bump @types/node from 24.0.4 to 24.0.13 (#2553) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.0.4 to 24.0.13. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 24.0.13 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2747dfa6e9..c59b8201ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1014,9 +1014,9 @@ } }, "node_modules/@types/node": { - "version": "24.0.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.4.tgz", - "integrity": "sha512-ulyqAkrhnuNq9pB76DRBTkcS6YsmDALy6Ua63V8OhrOBgbcYt6IOdzpw5P1+dyRIyMerzLkeYWBeOXPpA9GMAA==", + "version": "24.0.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.13.tgz", + "integrity": "sha512-Qm9OYVOFHFYg3wJoTSrz80hoec5Lia/dPp84do3X7dZvLikQvM1YpmvTBEdIr/e+U8HTkFjLHLnl78K/qjf+jQ==", "license": "MIT", "dependencies": { "undici-types": "~7.8.0" From 2f8969ffbf52e2ce529817938e45a350394eef01 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 03:18:07 +0000 Subject: [PATCH 068/111] build(deps-dev): bump @eslint/js from 9.30.1 to 9.31.0 Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.30.1 to 9.31.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/commits/v9.31.0/packages/js) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-version: 9.31.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c59b8201ab..7e86150b9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -628,10 +628,11 @@ } }, "node_modules/@eslint/js": { - "version": "9.30.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.30.1.tgz", - "integrity": "sha512-zXhuECFlyep42KZUhWjfvsmXGX39W8K8LFb8AWXM9gSV9dQB+MrJGLKvW6Zw0Ggnbpw0VHTtrhFXYe3Gym18jg==", + "version": "9.31.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.31.0.tgz", + "integrity": "sha512-LOm5OVt7D4qiKCqoiPbA7LWmI+tbw1VbTUowBcUMgQSuM6poJufkFkYDcQpo5KfgD39TnNySV26QjOh7VFpSyw==", "dev": true, + "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -1988,6 +1989,19 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/@eslint/js": { + "version": "9.30.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.30.1.tgz", + "integrity": "sha512-zXhuECFlyep42KZUhWjfvsmXGX39W8K8LFb8AWXM9gSV9dQB+MrJGLKvW6Zw0Ggnbpw0VHTtrhFXYe3Gym18jg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", From b9ae15a4f6f978c53117281ce14f08326fbfbccf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 11:56:03 +0000 Subject: [PATCH 069/111] build(deps-dev): bump eslint from 9.30.1 to 9.31.0 Bumps [eslint](https://github.com/eslint/eslint) from 9.30.1 to 9.31.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.30.1...v9.31.0) --- updated-dependencies: - dependency-name: eslint dependency-version: 9.31.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7e86150b9f..ad307300af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1881,18 +1881,19 @@ } }, "node_modules/eslint": { - "version": "9.30.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.30.1.tgz", - "integrity": "sha512-zmxXPNMOXmwm9E0yQLi5uqXHs7uq2UIiqEKo3Gq+3fwo1XrJ+hijAZImyF7hclW3E6oHz43Yk3RP8at6OTKflQ==", + "version": "9.31.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.31.0.tgz", + "integrity": "sha512-QldCVh/ztyKJJZLr4jXNUByx3gR+TDYZCRXEktiZoUR3PGy4qCmSbkxcIle8GEwGpb5JBZazlaJ/CxLidXdEbQ==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.21.0", "@eslint/config-helpers": "^0.3.0", - "@eslint/core": "^0.14.0", + "@eslint/core": "^0.15.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.30.1", + "@eslint/js": "9.31.0", "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", @@ -1989,17 +1990,17 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@eslint/js": { - "version": "9.30.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.30.1.tgz", - "integrity": "sha512-zXhuECFlyep42KZUhWjfvsmXGX39W8K8LFb8AWXM9gSV9dQB+MrJGLKvW6Zw0Ggnbpw0VHTtrhFXYe3Gym18jg==", + "node_modules/eslint/node_modules/@eslint/core": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.1.tgz", + "integrity": "sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" } }, "node_modules/eslint/node_modules/brace-expansion": { From 0b91ac122a601fe15d9311b7060bee0fbec61614 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 05:49:15 +0000 Subject: [PATCH 070/111] build(deps-dev): bump typescript-eslint from 8.36.0 to 8.37.0 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.36.0 to 8.37.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.37.0/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-version: 8.37.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 135 +++++++++++++++++++++++++--------------------- 1 file changed, 75 insertions(+), 60 deletions(-) diff --git a/package-lock.json b/package-lock.json index ad307300af..0fc5bb1d9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1049,16 +1049,17 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.36.0.tgz", - "integrity": "sha512-lZNihHUVB6ZZiPBNgOQGSxUASI7UJWhT8nHyUGCnaQ28XFCw98IfrMCG3rUl1uwUWoAvodJQby2KTs79UTcrAg==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.37.0.tgz", + "integrity": "sha512-jsuVWeIkb6ggzB+wPCsR4e6loj+rM72ohW6IBn2C+5NCvfUVY8s33iFPySSVXqtm5Hu29Ne/9bnA0JmyLmgenA==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.36.0", - "@typescript-eslint/type-utils": "8.36.0", - "@typescript-eslint/utils": "8.36.0", - "@typescript-eslint/visitor-keys": "8.36.0", + "@typescript-eslint/scope-manager": "8.37.0", + "@typescript-eslint/type-utils": "8.37.0", + "@typescript-eslint/utils": "8.37.0", + "@typescript-eslint/visitor-keys": "8.37.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -1072,7 +1073,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.36.0", + "@typescript-eslint/parser": "^8.37.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } @@ -1082,20 +1083,22 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.36.0.tgz", - "integrity": "sha512-FuYgkHwZLuPbZjQHzJXrtXreJdFMKl16BFYyRrLxDhWr6Qr7Kbcu2s1Yhu8tsiMXw1S0W1pjfFfYEt+R604s+Q==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.37.0.tgz", + "integrity": "sha512-kVIaQE9vrN9RLCQMQ3iyRlVJpTiDUY6woHGb30JDkfJErqrQEmtdWH3gV0PBAfGZgQXoqzXOO0T3K6ioApbbAA==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.36.0", - "@typescript-eslint/types": "8.36.0", - "@typescript-eslint/typescript-estree": "8.36.0", - "@typescript-eslint/visitor-keys": "8.36.0", + "@typescript-eslint/scope-manager": "8.37.0", + "@typescript-eslint/types": "8.37.0", + "@typescript-eslint/typescript-estree": "8.37.0", + "@typescript-eslint/visitor-keys": "8.37.0", "debug": "^4.3.4" }, "engines": { @@ -1111,13 +1114,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.36.0.tgz", - "integrity": "sha512-JAhQFIABkWccQYeLMrHadu/fhpzmSQ1F1KXkpzqiVxA/iYI6UnRt2trqXHt1sYEcw1mxLnB9rKMsOxXPxowN/g==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.37.0.tgz", + "integrity": "sha512-BIUXYsbkl5A1aJDdYJCBAo8rCEbAvdquQ8AnLb6z5Lp1u3x5PNgSSx9A/zqYc++Xnr/0DVpls8iQ2cJs/izTXA==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.36.0", - "@typescript-eslint/types": "^8.36.0", + "@typescript-eslint/tsconfig-utils": "^8.37.0", + "@typescript-eslint/types": "^8.37.0", "debug": "^4.3.4" }, "engines": { @@ -1132,13 +1136,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.36.0.tgz", - "integrity": "sha512-wCnapIKnDkN62fYtTGv2+RY8FlnBYA3tNm0fm91kc2BjPhV2vIjwwozJ7LToaLAyb1ca8BxrS7vT+Pvvf7RvqA==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.37.0.tgz", + "integrity": "sha512-0vGq0yiU1gbjKob2q691ybTg9JX6ShiVXAAfm2jGf3q0hdP6/BruaFjL/ManAR/lj05AvYCH+5bbVo0VtzmjOA==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.36.0", - "@typescript-eslint/visitor-keys": "8.36.0" + "@typescript-eslint/types": "8.37.0", + "@typescript-eslint/visitor-keys": "8.37.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1149,10 +1154,11 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.36.0.tgz", - "integrity": "sha512-Nhh3TIEgN18mNbdXpd5Q8mSCBnrZQeY9V7Ca3dqYvNDStNIGRmJA6dmrIPMJ0kow3C7gcQbpsG2rPzy1Ks/AnA==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.37.0.tgz", + "integrity": "sha512-1/YHvAVTimMM9mmlPvTec9NP4bobA1RkDbMydxG8omqwJJLEW/Iy2C4adsAESIXU3WGLXFHSZUU+C9EoFWl4Zg==", "dev": true, + "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -1165,13 +1171,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.36.0.tgz", - "integrity": "sha512-5aaGYG8cVDd6cxfk/ynpYzxBRZJk7w/ymto6uiyUFtdCozQIsQWh7M28/6r57Fwkbweng8qAzoMCPwSJfWlmsg==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.37.0.tgz", + "integrity": "sha512-SPkXWIkVZxhgwSwVq9rqj/4VFo7MnWwVaRNznfQDc/xPYHjXnPfLWn+4L6FF1cAz6e7dsqBeMawgl7QjUMj4Ow==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.36.0", - "@typescript-eslint/utils": "8.36.0", + "@typescript-eslint/types": "8.37.0", + "@typescript-eslint/typescript-estree": "8.37.0", + "@typescript-eslint/utils": "8.37.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1188,10 +1196,11 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.36.0.tgz", - "integrity": "sha512-xGms6l5cTJKQPZOKM75Dl9yBfNdGeLRsIyufewnxT4vZTrjC0ImQT4fj8QmtJK84F58uSh5HVBSANwcfiXxABQ==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.37.0.tgz", + "integrity": "sha512-ax0nv7PUF9NOVPs+lmQ7yIE7IQmAf8LGcXbMvHX5Gm+YJUYNAl340XkGnrimxZ0elXyoQJuN5sbg6C4evKA4SQ==", "dev": true, + "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -1201,15 +1210,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.36.0.tgz", - "integrity": "sha512-JaS8bDVrfVJX4av0jLpe4ye0BpAaUW7+tnS4Y4ETa3q7NoZgzYbN9zDQTJ8kPb5fQ4n0hliAt9tA4Pfs2zA2Hg==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.37.0.tgz", + "integrity": "sha512-zuWDMDuzMRbQOM+bHyU4/slw27bAUEcKSKKs3hcv2aNnc/tvE/h7w60dwVw8vnal2Pub6RT1T7BI8tFZ1fE+yg==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.36.0", - "@typescript-eslint/tsconfig-utils": "8.36.0", - "@typescript-eslint/types": "8.36.0", - "@typescript-eslint/visitor-keys": "8.36.0", + "@typescript-eslint/project-service": "8.37.0", + "@typescript-eslint/tsconfig-utils": "8.37.0", + "@typescript-eslint/types": "8.37.0", + "@typescript-eslint/visitor-keys": "8.37.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1229,15 +1239,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.36.0.tgz", - "integrity": "sha512-VOqmHu42aEMT+P2qYjylw6zP/3E/HvptRwdn/PZxyV27KhZg2IOszXod4NcXisWzPAGSS4trE/g4moNj6XmH2g==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.37.0.tgz", + "integrity": "sha512-TSFvkIW6gGjN2p6zbXo20FzCABbyUAuq6tBvNRGsKdsSQ6a7rnV6ADfZ7f4iI3lIiXc4F4WWvtUfDw9CJ9pO5A==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.36.0", - "@typescript-eslint/types": "8.36.0", - "@typescript-eslint/typescript-estree": "8.36.0" + "@typescript-eslint/scope-manager": "8.37.0", + "@typescript-eslint/types": "8.37.0", + "@typescript-eslint/typescript-estree": "8.37.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1252,12 +1263,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.36.0.tgz", - "integrity": "sha512-vZrhV2lRPWDuGoxcmrzRZyxAggPL+qp3WzUrlZD+slFueDiYHxeBa34dUXPuC0RmGKzl4lS5kFJYvKCq9cnNDA==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.37.0.tgz", + "integrity": "sha512-YzfhzcTnZVPiLfP/oeKtDp2evwvHLMe0LOy7oe+hb9KKIumLNohYS9Hgp1ifwpu42YWxhZE8yieggz6JpqO/1w==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.36.0", + "@typescript-eslint/types": "8.37.0", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -2408,7 +2420,8 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/has-flag": { "version": "4.0.0", @@ -3801,14 +3814,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.36.0.tgz", - "integrity": "sha512-fTCqxthY+h9QbEgSIBfL9iV6CvKDFuoxg6bHPNpJ9HIUzS+jy2lCEyCmGyZRWEBSaykqcDPf1SJ+BfCI8DRopA==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.37.0.tgz", + "integrity": "sha512-TnbEjzkE9EmcO0Q2zM+GE8NQLItNAJpMmED1BdgoBMYNdqMhzlbqfdSwiRlAzEK2pA9UzVW0gzaaIzXWg2BjfA==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.36.0", - "@typescript-eslint/parser": "8.36.0", - "@typescript-eslint/utils": "8.36.0" + "@typescript-eslint/eslint-plugin": "8.37.0", + "@typescript-eslint/parser": "8.37.0", + "@typescript-eslint/typescript-estree": "8.37.0", + "@typescript-eslint/utils": "8.37.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" From 169aec8e0db4903a31342f0aca1425c8d0c153fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 03:02:13 +0000 Subject: [PATCH 071/111] build(deps): bump @types/node from 24.0.13 to 24.0.14 --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 24.0.14 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0fc5bb1d9d..93c6d3047e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1015,9 +1015,9 @@ } }, "node_modules/@types/node": { - "version": "24.0.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.13.tgz", - "integrity": "sha512-Qm9OYVOFHFYg3wJoTSrz80hoec5Lia/dPp84do3X7dZvLikQvM1YpmvTBEdIr/e+U8HTkFjLHLnl78K/qjf+jQ==", + "version": "24.0.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.14.tgz", + "integrity": "sha512-4zXMWD91vBLGRtHK3YbIoFMia+1nqEz72coM42C5ETjnNCa/heoj7NT1G67iAfOqMmcfhuCZ4uNpyz8EjlAejw==", "license": "MIT", "dependencies": { "undici-types": "~7.8.0" From 3f9b510ea5b3b2a2940426753ae829ef7a8e3341 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 02:29:54 +0000 Subject: [PATCH 072/111] build(deps): bump form-data from 4.0.3 to 4.0.4 Bumps [form-data](https://github.com/form-data/form-data) from 4.0.3 to 4.0.4. - [Release notes](https://github.com/form-data/form-data/releases) - [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md) - [Commits](https://github.com/form-data/form-data/compare/v4.0.3...v4.0.4) --- updated-dependencies: - dependency-name: form-data dependency-version: 4.0.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 93c6d3047e..72114ccdf8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2248,9 +2248,9 @@ } }, "node_modules/form-data": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.3.tgz", - "integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", From 7a1fe06e91519c262b480249cc3f4787db38a558 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 02:48:00 +0000 Subject: [PATCH 073/111] build(deps-dev): bump nock from 14.0.5 to 14.0.6 --- updated-dependencies: - dependency-name: nock dependency-version: 14.0.6 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 72114ccdf8..e54d56f3c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -823,9 +823,9 @@ } }, "node_modules/@mswjs/interceptors": { - "version": "0.38.7", - "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.38.7.tgz", - "integrity": "sha512-Jkb27iSn7JPdkqlTqKfhncFfnEZsIJVYxsFbUSWEkxdIPdsyngrhoDBk0/BGD2FQcRH99vlRrkHpNTyKqI+0/w==", + "version": "0.39.3", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.39.3.tgz", + "integrity": "sha512-9bw/wBL7pblsnOCIqvn1788S9o4h+cC5HWXg0Xhh0dOzsZ53IyfmBM+FYqpDDPbm0xjCqEqvCITloF3Dm4TXRQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2977,13 +2977,13 @@ "license": "MIT" }, "node_modules/nock": { - "version": "14.0.5", - "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.5.tgz", - "integrity": "sha512-R49fALR9caB6vxuSWUIaK2eBYeTloZQUFBZ4rHO+TbhMGQHtwnhdqKLYki+o+8qMgLvoBYWrp/2KzGPhxL4S6w==", + "version": "14.0.6", + "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.6.tgz", + "integrity": "sha512-67n1OfusL/ON57fwFJ6ZurSJa/msYVQmqlz9rCel2HJYj4Zeb8v9TcmRdEW+PV2i9Fm2358umSvzZukhw/E8DA==", "dev": true, "license": "MIT", "dependencies": { - "@mswjs/interceptors": "^0.38.7", + "@mswjs/interceptors": "^0.39.3", "json-stringify-safe": "^5.0.1", "propagate": "^2.0.0" }, From 70c5a9d8715f7448a7d56517fda94c1d678ae0e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 02:50:30 +0000 Subject: [PATCH 074/111] build(deps): bump @types/node from 24.0.14 to 24.0.15 --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 24.0.15 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 72114ccdf8..a05bbc04b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1015,9 +1015,9 @@ } }, "node_modules/@types/node": { - "version": "24.0.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.14.tgz", - "integrity": "sha512-4zXMWD91vBLGRtHK3YbIoFMia+1nqEz72coM42C5ETjnNCa/heoj7NT1G67iAfOqMmcfhuCZ4uNpyz8EjlAejw==", + "version": "24.0.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.15.tgz", + "integrity": "sha512-oaeTSbCef7U/z7rDeJA138xpG3NuKc64/rZ2qmUFkFJmnMsAPaluIifqyWd8hSSMxyP9oie3dLAqYPblag9KgA==", "license": "MIT", "dependencies": { "undici-types": "~7.8.0" From 429854a2307505ce92510047da55f38999e8d8b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 03:13:37 +0000 Subject: [PATCH 075/111] build(deps): bump @types/node from 24.0.15 to 24.1.0 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.0.15 to 24.1.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 24.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0c9244bf8a..8caafef999 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1015,9 +1015,9 @@ } }, "node_modules/@types/node": { - "version": "24.0.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.15.tgz", - "integrity": "sha512-oaeTSbCef7U/z7rDeJA138xpG3NuKc64/rZ2qmUFkFJmnMsAPaluIifqyWd8hSSMxyP9oie3dLAqYPblag9KgA==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz", + "integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==", "license": "MIT", "dependencies": { "undici-types": "~7.8.0" From 8909290f74005e4dbb8c49f49b904dc7c1d52f2d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 03:13:53 +0000 Subject: [PATCH 076/111] build(deps-dev): bump typescript-eslint from 8.37.0 to 8.38.0 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.37.0 to 8.38.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.38.0/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-version: 8.38.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 122 +++++++++++++++++++++++----------------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0c9244bf8a..20338d47fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1049,17 +1049,17 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.37.0.tgz", - "integrity": "sha512-jsuVWeIkb6ggzB+wPCsR4e6loj+rM72ohW6IBn2C+5NCvfUVY8s33iFPySSVXqtm5Hu29Ne/9bnA0JmyLmgenA==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.38.0.tgz", + "integrity": "sha512-CPoznzpuAnIOl4nhj4tRr4gIPj5AfKgkiJmGQDaq+fQnRJTYlcBjbX3wbciGmpoPf8DREufuPRe1tNMZnGdanA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.37.0", - "@typescript-eslint/type-utils": "8.37.0", - "@typescript-eslint/utils": "8.37.0", - "@typescript-eslint/visitor-keys": "8.37.0", + "@typescript-eslint/scope-manager": "8.38.0", + "@typescript-eslint/type-utils": "8.38.0", + "@typescript-eslint/utils": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -1073,7 +1073,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.37.0", + "@typescript-eslint/parser": "^8.38.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } @@ -1089,16 +1089,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.37.0.tgz", - "integrity": "sha512-kVIaQE9vrN9RLCQMQ3iyRlVJpTiDUY6woHGb30JDkfJErqrQEmtdWH3gV0PBAfGZgQXoqzXOO0T3K6ioApbbAA==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.38.0.tgz", + "integrity": "sha512-Zhy8HCvBUEfBECzIl1PKqF4p11+d0aUJS1GeUiuqK9WmOug8YCmC4h4bjyBvMyAMI9sbRczmrYL5lKg/YMbrcQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.37.0", - "@typescript-eslint/types": "8.37.0", - "@typescript-eslint/typescript-estree": "8.37.0", - "@typescript-eslint/visitor-keys": "8.37.0", + "@typescript-eslint/scope-manager": "8.38.0", + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/typescript-estree": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0", "debug": "^4.3.4" }, "engines": { @@ -1114,14 +1114,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.37.0.tgz", - "integrity": "sha512-BIUXYsbkl5A1aJDdYJCBAo8rCEbAvdquQ8AnLb6z5Lp1u3x5PNgSSx9A/zqYc++Xnr/0DVpls8iQ2cJs/izTXA==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.38.0.tgz", + "integrity": "sha512-dbK7Jvqcb8c9QfH01YB6pORpqX1mn5gDZc9n63Ak/+jD67oWXn3Gs0M6vddAN+eDXBCS5EmNWzbSxsn9SzFWWg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.37.0", - "@typescript-eslint/types": "^8.37.0", + "@typescript-eslint/tsconfig-utils": "^8.38.0", + "@typescript-eslint/types": "^8.38.0", "debug": "^4.3.4" }, "engines": { @@ -1136,14 +1136,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.37.0.tgz", - "integrity": "sha512-0vGq0yiU1gbjKob2q691ybTg9JX6ShiVXAAfm2jGf3q0hdP6/BruaFjL/ManAR/lj05AvYCH+5bbVo0VtzmjOA==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.38.0.tgz", + "integrity": "sha512-WJw3AVlFFcdT9Ri1xs/lg8LwDqgekWXWhH3iAF+1ZM+QPd7oxQ6jvtW/JPwzAScxitILUIFs0/AnQ/UWHzbATQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.37.0", - "@typescript-eslint/visitor-keys": "8.37.0" + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1154,9 +1154,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.37.0.tgz", - "integrity": "sha512-1/YHvAVTimMM9mmlPvTec9NP4bobA1RkDbMydxG8omqwJJLEW/Iy2C4adsAESIXU3WGLXFHSZUU+C9EoFWl4Zg==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.38.0.tgz", + "integrity": "sha512-Lum9RtSE3EroKk/bYns+sPOodqb2Fv50XOl/gMviMKNvanETUuUcC9ObRbzrJ4VSd2JalPqgSAavwrPiPvnAiQ==", "dev": true, "license": "MIT", "engines": { @@ -1171,15 +1171,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.37.0.tgz", - "integrity": "sha512-SPkXWIkVZxhgwSwVq9rqj/4VFo7MnWwVaRNznfQDc/xPYHjXnPfLWn+4L6FF1cAz6e7dsqBeMawgl7QjUMj4Ow==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.38.0.tgz", + "integrity": "sha512-c7jAvGEZVf0ao2z+nnz8BUaHZD09Agbh+DY7qvBQqLiz8uJzRgVPj5YvOh8I8uEiH8oIUGIfHzMwUcGVco/SJg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.37.0", - "@typescript-eslint/typescript-estree": "8.37.0", - "@typescript-eslint/utils": "8.37.0", + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/typescript-estree": "8.38.0", + "@typescript-eslint/utils": "8.38.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1196,9 +1196,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.37.0.tgz", - "integrity": "sha512-ax0nv7PUF9NOVPs+lmQ7yIE7IQmAf8LGcXbMvHX5Gm+YJUYNAl340XkGnrimxZ0elXyoQJuN5sbg6C4evKA4SQ==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.38.0.tgz", + "integrity": "sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw==", "dev": true, "license": "MIT", "engines": { @@ -1210,16 +1210,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.37.0.tgz", - "integrity": "sha512-zuWDMDuzMRbQOM+bHyU4/slw27bAUEcKSKKs3hcv2aNnc/tvE/h7w60dwVw8vnal2Pub6RT1T7BI8tFZ1fE+yg==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.38.0.tgz", + "integrity": "sha512-fooELKcAKzxux6fA6pxOflpNS0jc+nOQEEOipXFNjSlBS6fqrJOVY/whSn70SScHrcJ2LDsxWrneFoWYSVfqhQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.37.0", - "@typescript-eslint/tsconfig-utils": "8.37.0", - "@typescript-eslint/types": "8.37.0", - "@typescript-eslint/visitor-keys": "8.37.0", + "@typescript-eslint/project-service": "8.38.0", + "@typescript-eslint/tsconfig-utils": "8.38.0", + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1239,16 +1239,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.37.0.tgz", - "integrity": "sha512-TSFvkIW6gGjN2p6zbXo20FzCABbyUAuq6tBvNRGsKdsSQ6a7rnV6ADfZ7f4iI3lIiXc4F4WWvtUfDw9CJ9pO5A==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.38.0.tgz", + "integrity": "sha512-hHcMA86Hgt+ijJlrD8fX0j1j8w4C92zue/8LOPAFioIno+W0+L7KqE8QZKCcPGc/92Vs9x36w/4MPTJhqXdyvg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.37.0", - "@typescript-eslint/types": "8.37.0", - "@typescript-eslint/typescript-estree": "8.37.0" + "@typescript-eslint/scope-manager": "8.38.0", + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/typescript-estree": "8.38.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1263,13 +1263,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.37.0.tgz", - "integrity": "sha512-YzfhzcTnZVPiLfP/oeKtDp2evwvHLMe0LOy7oe+hb9KKIumLNohYS9Hgp1ifwpu42YWxhZE8yieggz6JpqO/1w==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.38.0.tgz", + "integrity": "sha512-pWrTcoFNWuwHlA9CvlfSsGWs14JxfN1TH25zM5L7o0pRLhsoZkDnTsXfQRJBEWJoV5DL0jf+Z+sxiud+K0mq1g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.37.0", + "@typescript-eslint/types": "8.38.0", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -3814,16 +3814,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.37.0.tgz", - "integrity": "sha512-TnbEjzkE9EmcO0Q2zM+GE8NQLItNAJpMmED1BdgoBMYNdqMhzlbqfdSwiRlAzEK2pA9UzVW0gzaaIzXWg2BjfA==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.38.0.tgz", + "integrity": "sha512-FsZlrYK6bPDGoLeZRuvx2v6qrM03I0U0SnfCLPs/XCCPCFD80xU9Pg09H/K+XFa68uJuZo7l/Xhs+eDRg2l3hg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.37.0", - "@typescript-eslint/parser": "8.37.0", - "@typescript-eslint/typescript-estree": "8.37.0", - "@typescript-eslint/utils": "8.37.0" + "@typescript-eslint/eslint-plugin": "8.38.0", + "@typescript-eslint/parser": "8.38.0", + "@typescript-eslint/typescript-estree": "8.38.0", + "@typescript-eslint/utils": "8.38.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" From 9108f3d003511206fed0706505235c3caec0dfec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 03:24:32 +0000 Subject: [PATCH 077/111] build(deps-dev): bump nock from 14.0.6 to 14.0.7 Bumps [nock](https://github.com/nock/nock) from 14.0.6 to 14.0.7. - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v14.0.6...v14.0.7) --- updated-dependencies: - dependency-name: nock dependency-version: 14.0.7 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index febeae31c2..e65242a497 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2977,9 +2977,9 @@ "license": "MIT" }, "node_modules/nock": { - "version": "14.0.6", - "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.6.tgz", - "integrity": "sha512-67n1OfusL/ON57fwFJ6ZurSJa/msYVQmqlz9rCel2HJYj4Zeb8v9TcmRdEW+PV2i9Fm2358umSvzZukhw/E8DA==", + "version": "14.0.7", + "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.7.tgz", + "integrity": "sha512-ubwvvhSzNPqc7Nm3a/iYolwqb7lo1zfllDKO1ODsYu3KnarmQEya5yV70ZUwhVxYIl1ePuX3W+lHw2un+pUfpQ==", "dev": true, "license": "MIT", "dependencies": { From 1e5c769b0822265aed0d2b13d2ac152a4b2781df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 03:24:44 +0000 Subject: [PATCH 078/111] build(deps-dev): bump eslint from 9.31.0 to 9.32.0 Bumps [eslint](https://github.com/eslint/eslint) from 9.31.0 to 9.32.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.31.0...v9.32.0) --- updated-dependencies: - dependency-name: eslint dependency-version: 9.32.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index febeae31c2..9b7042589b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -567,9 +567,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", - "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.1.tgz", + "integrity": "sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -628,9 +628,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.31.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.31.0.tgz", - "integrity": "sha512-LOm5OVt7D4qiKCqoiPbA7LWmI+tbw1VbTUowBcUMgQSuM6poJufkFkYDcQpo5KfgD39TnNySV26QjOh7VFpSyw==", + "version": "9.32.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.32.0.tgz", + "integrity": "sha512-BBpRFZK3eX6uMLKz8WxFOBIFFcGFJ/g8XuwjTHCqHROSIsopI+ddn/d5Cfh36+7+e5edVS8dbSHnBNhrLEX0zg==", "dev": true, "license": "MIT", "engines": { @@ -650,13 +650,13 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz", - "integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.4.tgz", + "integrity": "sha512-Ul5l+lHEcw3L5+k8POx6r74mxEYKG5kOb6Xpy2gCRW6zweT6TEhAf8vhxGgjhqrd/VO/Dirhsb+1hNpD1ue9hw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.14.0", + "@eslint/core": "^0.15.1", "levn": "^0.4.1" }, "engines": { @@ -1893,9 +1893,9 @@ } }, "node_modules/eslint": { - "version": "9.31.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.31.0.tgz", - "integrity": "sha512-QldCVh/ztyKJJZLr4jXNUByx3gR+TDYZCRXEktiZoUR3PGy4qCmSbkxcIle8GEwGpb5JBZazlaJ/CxLidXdEbQ==", + "version": "9.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.32.0.tgz", + "integrity": "sha512-LSehfdpgMeWcTZkWZVIJl+tkZ2nuSkyyB9C27MZqFWXuph7DvaowgcTvKqxvpLW1JZIk8PN7hFY3Rj9LQ7m7lg==", "dev": true, "license": "MIT", "dependencies": { @@ -1905,8 +1905,8 @@ "@eslint/config-helpers": "^0.3.0", "@eslint/core": "^0.15.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.31.0", - "@eslint/plugin-kit": "^0.3.1", + "@eslint/js": "9.32.0", + "@eslint/plugin-kit": "^0.3.4", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", @@ -2002,19 +2002,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@eslint/core": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.1.tgz", - "integrity": "sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", From 78e38f79a0654fd37d17ca419778764e34e6cecb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 03:34:34 +0000 Subject: [PATCH 079/111] build(deps-dev): bump typedoc from 0.28.7 to 0.28.8 Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.28.7 to 0.28.8. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.28.7...v0.28.8) --- updated-dependencies: - dependency-name: typedoc dependency-version: 0.28.8 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index febeae31c2..903fc334cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3777,10 +3777,11 @@ } }, "node_modules/typedoc": { - "version": "0.28.7", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.7.tgz", - "integrity": "sha512-lpz0Oxl6aidFkmS90VQDQjk/Qf2iw0IUvFqirdONBdj7jPSN9mGXhy66BcGNDxx5ZMyKKiBVAREvPEzT6Uxipw==", + "version": "0.28.8", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.8.tgz", + "integrity": "sha512-16GfLopc8icHfdvqZDqdGBoS2AieIRP2rpf9mU+MgN+gGLyEQvAO0QgOa6NJ5QNmQi0LFrDY9in4F2fUNKgJKA==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@gerrit0/mini-shiki": "^3.7.0", "lunr": "^2.3.9", From 321ab46e3ca0dd0151021318084f99dcabc016cf Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 29 Jul 2025 14:22:57 -0400 Subject: [PATCH 080/111] remove support for v0.x release line This commit disables everything related to the old v0.x release line (the master branch in git). The v0.x git branch and old release artifacts will be left in tact. --- .github/dependabot.yml | 6 ---- .github/workflows/codeql-analysis.yml | 4 +-- .github/workflows/deploy-docs.yml | 50 +++++++++++++-------------- .github/workflows/test.yml | 4 +-- pre-check.sh | 2 +- 5 files changed, 30 insertions(+), 36 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4dbff16643..2ef325edf2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,12 +6,6 @@ updates: interval: 'daily' time: '02:00' target-branch: 'main' - - package-ecosystem: 'npm' - directory: '/' - target-branch: 'master' - schedule: - interval: 'daily' - time: '01:00' - package-ecosystem: 'github-actions' directory: '/' schedule: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c96cf6f6ef..7cbe4ff05d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -14,10 +14,10 @@ name: 'CodeQL' on: push: - branches: [master, main] + branches: [main] pull_request: # The branches below must be a subset of the branches above - branches: [master, main] + branches: [main] schedule: - cron: '35 14 * * 3' diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 8037d7caaf..06c93436bd 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,29 +1,29 @@ name: Build and Deploy Docs on: - push: - branches: - - master + push: + branches: + - main jobs: - build-and-deploy-docs: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4.2.2 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - # Pre-check to validate that versions match between package.json - # and package-lock.json. Needs to run before npm install - - name: Validate package.json and package-lock.json versions - run: node version-check.js - - name: Install dependencies - run: npm ci - - name: Build docs - run: npm run docs + build-and-deploy-docs: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.2.2 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + # Pre-check to validate that versions match between package.json + # and package-lock.json. Needs to run before npm install + - name: Validate package.json and package-lock.json versions + run: node version-check.js + - name: Install dependencies + run: npm ci + - name: Build docs + run: npm run docs - - name: Deploy docs - uses: JamesIves/github-pages-deploy-action@v4.7.3 - with: - branch: gh-pages # The branch the action should deploy to. - folder: docs # The folder the action should deploy. + - name: Deploy docs + uses: JamesIves/github-pages-deploy-action@v4.7.3 + with: + branch: gh-pages # The branch the action should deploy to. + folder: docs # The folder the action should deploy. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 140d0911d3..5e9ec92d93 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,9 +2,9 @@ name: Kubernetes Javascript Client - Validation on: push: - branches: [master, main] + branches: [main] pull_request: - branches: [master, main] + branches: [main] jobs: build: diff --git a/pre-check.sh b/pre-check.sh index 5ad811e98e..18b05d8120 100644 --- a/pre-check.sh +++ b/pre-check.sh @@ -8,7 +8,7 @@ if [[ "${branch}" != "main" ]]; then fi if ! git diff --quiet; then - echo "This script must only run on a clean master branch." + echo "This script must only run on a clean main branch." echo git status exit 1 From 0150c38f7a7aec93cb064b3cfd891071bf0705aa Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 29 Jul 2025 16:56:06 -0400 Subject: [PATCH 081/111] address PR feedback --- .github/workflows/codeql-analysis.yml | 4 ++-- .github/workflows/test.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 7cbe4ff05d..c96cf6f6ef 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -14,10 +14,10 @@ name: 'CodeQL' on: push: - branches: [main] + branches: [master, main] pull_request: # The branches below must be a subset of the branches above - branches: [main] + branches: [master, main] schedule: - cron: '35 14 * * 3' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5e9ec92d93..140d0911d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,9 +2,9 @@ name: Kubernetes Javascript Client - Validation on: push: - branches: [main] + branches: [master, main] pull_request: - branches: [main] + branches: [master, main] jobs: build: From 7c8853ec6185ac7695d6495a8f1b4d12ebae2df5 Mon Sep 17 00:00:00 2001 From: Laurent Fallet Date: Wed, 30 Jul 2025 11:30:47 +0200 Subject: [PATCH 082/111] fix: typos in readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 71058d9849..c2895b731d 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ k8sApi.createNamespace({ body: namespace }).then( ); ``` -## Create a cluster configuration programatically +## Create a cluster configuration programmatically ```javascript const k8s = require('@kubernetes/client-node'); @@ -112,7 +112,7 @@ release, we will increment the minor version whenever we update the minor Kubern We switched from `request` to `fetch` as the HTTP(S) backend for the `1.0.0` release. -Generally speaking newer clients will work with older Kubernetes, but compatability isn't 100% guaranteed. +Generally speaking newer clients will work with older Kubernetes, but compatibility isn't 100% guaranteed. | client version | older versions | 1.28 | 1.29 | 1.30 | 1.31 | 1.32 | 1.33| | -------------- | -------------- | ---- | ---- | ---- | ---- | ---- |----| From a7460c112660e12b220ec5043572a835f2644e1e Mon Sep 17 00:00:00 2001 From: Simon Staszkiewicz Date: Wed, 30 Jul 2025 11:40:17 -0700 Subject: [PATCH 083/111] Update exec_auth.ts --- src/exec_auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exec_auth.ts b/src/exec_auth.ts index fbd97a26f8..c9d3d23d85 100644 --- a/src/exec_auth.ts +++ b/src/exec_auth.ts @@ -95,7 +95,7 @@ export class ExecAuth implements Authenticator { } let opts = {}; if (exec.env) { - const env = process.env; + const env = { ...process.env }; exec.env.forEach((elt) => (env[elt.name] = elt.value)); opts = { ...opts, env }; } From bd14efc49490a7196aed163043967aac5a29f4eb Mon Sep 17 00:00:00 2001 From: Simon Staszkiewicz Date: Wed, 30 Jul 2025 11:56:35 -0700 Subject: [PATCH 084/111] add regression test for exec_auth change --- src/exec_auth_test.ts | 59 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/src/exec_auth_test.ts b/src/exec_auth_test.ts index e323b5880e..7577d87cd8 100644 --- a/src/exec_auth_test.ts +++ b/src/exec_auth_test.ts @@ -538,4 +538,63 @@ describe('ExecAuth', () => { const promise = auth.applyAuthentication(user, opts); await rejects(promise, { name: 'SyntaxError' }); }); + + it('should not overwrite environment variables in process.env', async () => { + // TODO: fix this test for Windows + if (process.platform === 'win32') { + return; + } + const auth = new ExecAuth(); + let optsOut: child_process.SpawnOptions | undefined = {}; + (auth as any).execFn = ( + command: string, + args?: readonly string[], + options?: child_process.SpawnOptionsWithoutStdio, + ): child_process.ChildProcessWithoutNullStreams => { + optsOut = options; + return { + stdout: { + setEncoding: () => {}, + on: (_data: string, f: (data: Buffer | string) => void) => { + f(Buffer.from(JSON.stringify({ status: { token: 'foo' } }))); + }, + }, + stderr: { + setEncoding: () => {}, + on: () => {}, + }, + on: (op: string, f: any) => { + if (op === 'close') { + f(0); + } + }, + } as unknown as child_process.ChildProcessWithoutNullStreams; + }; + + process.env.DO_NO_OVERWRITE_ME = 'important'; + const opts = {} as https.RequestOptions; + opts.headers = {} as OutgoingHttpHeaders; + + await auth.applyAuthentication( + { + name: 'user', + authProvider: { + config: { + exec: { + command: 'echo', + env: [ + { + name: 'DO_NO_OVERWRITE_ME', + value: 'in exec', + }, + ], + }, + }, + }, + }, + opts, + ); + strictEqual(optsOut.env!.DO_NO_OVERWRITE_ME, 'in exec'); + strictEqual(process.env.DO_NO_OVERWRITE_ME, 'important'); + }); }); From 9e5c7c373ad599d4e9709feb23d01a2ba55509c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Aug 2025 03:33:57 +0000 Subject: [PATCH 085/111] build(deps-dev): bump typedoc from 0.28.8 to 0.28.9 Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.28.8 to 0.28.9. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.28.8...v0.28.9) --- updated-dependencies: - dependency-name: typedoc dependency-version: 0.28.9 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 66 ++++++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index fdf286fcfa..290120bfd9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -664,15 +664,16 @@ } }, "node_modules/@gerrit0/mini-shiki": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.7.0.tgz", - "integrity": "sha512-7iY9wg4FWXmeoFJpUL2u+tsmh0d0jcEJHAIzVxl3TG4KL493JNnisdLAILZ77zcD+z3J0keEXZ+lFzUgzQzPDg==", + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.9.1.tgz", + "integrity": "sha512-quvtbDhNf528BkMHQQd8xGJMpmA5taDZuex/JDF8ETEjS2iypXzr1hnEUVh+lTUyffFJ0JCxysUsiuUoEGIz/Q==", "dev": true, + "license": "MIT", "dependencies": { - "@shikijs/engine-oniguruma": "^3.7.0", - "@shikijs/langs": "^3.7.0", - "@shikijs/themes": "^3.7.0", - "@shikijs/types": "^3.7.0", + "@shikijs/engine-oniguruma": "^3.9.1", + "@shikijs/langs": "^3.9.1", + "@shikijs/themes": "^3.9.1", + "@shikijs/types": "^3.9.1", "@shikijs/vscode-textmate": "^10.0.2" } }, @@ -925,38 +926,42 @@ } }, "node_modules/@shikijs/engine-oniguruma": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.7.0.tgz", - "integrity": "sha512-5BxcD6LjVWsGu4xyaBC5bu8LdNgPCVBnAkWTtOCs/CZxcB22L8rcoWfv7Hh/3WooVjBZmFtyxhgvkQFedPGnFw==", + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.9.1.tgz", + "integrity": "sha512-WPlL/xqviwS3te4unSGGGfflKsuHLMI6tPdNYvgz/IygcBT6UiwDFSzjBKyebwi5GGSlXsjjdoJLIBnAplmEZw==", "dev": true, + "license": "MIT", "dependencies": { - "@shikijs/types": "3.7.0", + "@shikijs/types": "3.9.1", "@shikijs/vscode-textmate": "^10.0.2" } }, "node_modules/@shikijs/langs": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.7.0.tgz", - "integrity": "sha512-1zYtdfXLr9xDKLTGy5kb7O0zDQsxXiIsw1iIBcNOO8Yi5/Y1qDbJ+0VsFoqTlzdmneO8Ij35g7QKF8kcLyznCQ==", + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.9.1.tgz", + "integrity": "sha512-Vyy2Yv9PP3Veh3VSsIvNncOR+O93wFsNYgN2B6cCCJlS7H9SKFYc55edsqernsg8WT/zam1cfB6llJsQWLnVhA==", "dev": true, + "license": "MIT", "dependencies": { - "@shikijs/types": "3.7.0" + "@shikijs/types": "3.9.1" } }, "node_modules/@shikijs/themes": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.7.0.tgz", - "integrity": "sha512-VJx8497iZPy5zLiiCTSIaOChIcKQwR0FebwE9S3rcN0+J/GTWwQ1v/bqhTbpbY3zybPKeO8wdammqkpXc4NVjQ==", + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.9.1.tgz", + "integrity": "sha512-zAykkGECNICCMXpKeVvq04yqwaSuAIvrf8MjsU5bzskfg4XreU+O0B5wdNCYRixoB9snd3YlZ373WV5E/g5T9A==", "dev": true, + "license": "MIT", "dependencies": { - "@shikijs/types": "3.7.0" + "@shikijs/types": "3.9.1" } }, "node_modules/@shikijs/types": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.7.0.tgz", - "integrity": "sha512-MGaLeaRlSWpnP0XSAum3kP3a8vtcTsITqoEPYdt3lQG3YCdQH4DnEhodkYcNMcU0uW0RffhoD1O3e0vG5eSBBg==", + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.9.1.tgz", + "integrity": "sha512-rqM3T7a0iM1oPKz9iaH/cVgNX9Vz1HERcUcXJ94/fulgVdwqfnhXzGxO4bLrAnh/o5CPLy3IcYedogfV+Ns0Qg==", "dev": true, + "license": "MIT", "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" @@ -966,7 +971,8 @@ "version": "10.0.2", "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/estree": { "version": "1.0.7", @@ -980,6 +986,7 @@ "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/unist": "*" } @@ -1046,7 +1053,8 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.38.0", @@ -3764,13 +3772,13 @@ } }, "node_modules/typedoc": { - "version": "0.28.8", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.8.tgz", - "integrity": "sha512-16GfLopc8icHfdvqZDqdGBoS2AieIRP2rpf9mU+MgN+gGLyEQvAO0QgOa6NJ5QNmQi0LFrDY9in4F2fUNKgJKA==", + "version": "0.28.9", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.9.tgz", + "integrity": "sha512-aw45vwtwOl3QkUAmWCnLV9QW1xY+FSX2zzlit4MAfE99wX+Jij4ycnpbAWgBXsRrxmfs9LaYktg/eX5Bpthd3g==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@gerrit0/mini-shiki": "^3.7.0", + "@gerrit0/mini-shiki": "^3.9.0", "lunr": "^2.3.9", "markdown-it": "^14.1.0", "minimatch": "^9.0.5", @@ -3784,7 +3792,7 @@ "pnpm": ">= 10" }, "peerDependencies": { - "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x" + "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x" } }, "node_modules/typescript": { From 53afab54fca0e3f969f7bfa0b7885aca7a7b4049 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Aug 2025 03:37:16 +0000 Subject: [PATCH 086/111] build(deps-dev): bump nock from 14.0.7 to 14.0.8 Bumps [nock](https://github.com/nock/nock) from 14.0.7 to 14.0.8. - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v14.0.7...v14.0.8) --- updated-dependencies: - dependency-name: nock dependency-version: 14.0.8 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index fdf286fcfa..446a9b260a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -823,9 +823,9 @@ } }, "node_modules/@mswjs/interceptors": { - "version": "0.39.3", - "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.39.3.tgz", - "integrity": "sha512-9bw/wBL7pblsnOCIqvn1788S9o4h+cC5HWXg0Xhh0dOzsZ53IyfmBM+FYqpDDPbm0xjCqEqvCITloF3Dm4TXRQ==", + "version": "0.39.5", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.39.5.tgz", + "integrity": "sha512-B9nHSJYtsv79uo7QdkZ/b/WoKm20IkVSmTc/WCKarmDtFwM0dRx2ouEniqwNkzCSLn3fydzKmnMzjtfdOWt3VQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2964,13 +2964,13 @@ "license": "MIT" }, "node_modules/nock": { - "version": "14.0.7", - "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.7.tgz", - "integrity": "sha512-ubwvvhSzNPqc7Nm3a/iYolwqb7lo1zfllDKO1ODsYu3KnarmQEya5yV70ZUwhVxYIl1ePuX3W+lHw2un+pUfpQ==", + "version": "14.0.8", + "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.8.tgz", + "integrity": "sha512-5DCGrkwK1f8kxUvqvzLWb97XuDUY4/t5M3ZcogPfLGvC2wO8wjRQsIDSXj2L6e1J0Dv8xscf9wWSvGnS3OL29Q==", "dev": true, "license": "MIT", "dependencies": { - "@mswjs/interceptors": "^0.39.3", + "@mswjs/interceptors": "^0.39.5", "json-stringify-safe": "^5.0.1", "propagate": "^2.0.0" }, From d57ec4c5d8be65d9cf2b8f951c215142e8c4ebee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 08:42:02 +0000 Subject: [PATCH 087/111] build(deps-dev): bump typescript-eslint from 8.38.0 to 8.39.0 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.38.0 to 8.39.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.39.0/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-version: 8.39.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 138 +++++++++++++++++++++++----------------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/package-lock.json b/package-lock.json index 20388706eb..d11e3999c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1057,17 +1057,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.38.0.tgz", - "integrity": "sha512-CPoznzpuAnIOl4nhj4tRr4gIPj5AfKgkiJmGQDaq+fQnRJTYlcBjbX3wbciGmpoPf8DREufuPRe1tNMZnGdanA==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.39.0.tgz", + "integrity": "sha512-bhEz6OZeUR+O/6yx9Jk6ohX6H9JSFTaiY0v9/PuKT3oGK0rn0jNplLmyFUGV+a9gfYnVNwGDwS/UkLIuXNb2Rw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.38.0", - "@typescript-eslint/type-utils": "8.38.0", - "@typescript-eslint/utils": "8.38.0", - "@typescript-eslint/visitor-keys": "8.38.0", + "@typescript-eslint/scope-manager": "8.39.0", + "@typescript-eslint/type-utils": "8.39.0", + "@typescript-eslint/utils": "8.39.0", + "@typescript-eslint/visitor-keys": "8.39.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -1081,9 +1081,9 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.38.0", + "@typescript-eslint/parser": "^8.39.0", "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { @@ -1097,16 +1097,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.38.0.tgz", - "integrity": "sha512-Zhy8HCvBUEfBECzIl1PKqF4p11+d0aUJS1GeUiuqK9WmOug8YCmC4h4bjyBvMyAMI9sbRczmrYL5lKg/YMbrcQ==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.39.0.tgz", + "integrity": "sha512-g3WpVQHngx0aLXn6kfIYCZxM6rRJlWzEkVpqEFLT3SgEDsp9cpCbxxgwnE504q4H+ruSDh/VGS6nqZIDynP+vg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.38.0", - "@typescript-eslint/types": "8.38.0", - "@typescript-eslint/typescript-estree": "8.38.0", - "@typescript-eslint/visitor-keys": "8.38.0", + "@typescript-eslint/scope-manager": "8.39.0", + "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/typescript-estree": "8.39.0", + "@typescript-eslint/visitor-keys": "8.39.0", "debug": "^4.3.4" }, "engines": { @@ -1118,18 +1118,18 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.38.0.tgz", - "integrity": "sha512-dbK7Jvqcb8c9QfH01YB6pORpqX1mn5gDZc9n63Ak/+jD67oWXn3Gs0M6vddAN+eDXBCS5EmNWzbSxsn9SzFWWg==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.39.0.tgz", + "integrity": "sha512-CTzJqaSq30V/Z2Og9jogzZt8lJRR5TKlAdXmWgdu4hgcC9Kww5flQ+xFvMxIBWVNdxJO7OifgdOK4PokMIWPew==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.38.0", - "@typescript-eslint/types": "^8.38.0", + "@typescript-eslint/tsconfig-utils": "^8.39.0", + "@typescript-eslint/types": "^8.39.0", "debug": "^4.3.4" }, "engines": { @@ -1140,18 +1140,18 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.38.0.tgz", - "integrity": "sha512-WJw3AVlFFcdT9Ri1xs/lg8LwDqgekWXWhH3iAF+1ZM+QPd7oxQ6jvtW/JPwzAScxitILUIFs0/AnQ/UWHzbATQ==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.39.0.tgz", + "integrity": "sha512-8QOzff9UKxOh6npZQ/4FQu4mjdOCGSdO3p44ww0hk8Vu+IGbg0tB/H1LcTARRDzGCC8pDGbh2rissBuuoPgH8A==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.38.0", - "@typescript-eslint/visitor-keys": "8.38.0" + "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/visitor-keys": "8.39.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1162,9 +1162,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.38.0.tgz", - "integrity": "sha512-Lum9RtSE3EroKk/bYns+sPOodqb2Fv50XOl/gMviMKNvanETUuUcC9ObRbzrJ4VSd2JalPqgSAavwrPiPvnAiQ==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.39.0.tgz", + "integrity": "sha512-Fd3/QjmFV2sKmvv3Mrj8r6N8CryYiCS8Wdb/6/rgOXAWGcFuc+VkQuG28uk/4kVNVZBQuuDHEDUpo/pQ32zsIQ==", "dev": true, "license": "MIT", "engines": { @@ -1175,19 +1175,19 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.38.0.tgz", - "integrity": "sha512-c7jAvGEZVf0ao2z+nnz8BUaHZD09Agbh+DY7qvBQqLiz8uJzRgVPj5YvOh8I8uEiH8oIUGIfHzMwUcGVco/SJg==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.39.0.tgz", + "integrity": "sha512-6B3z0c1DXVT2vYA9+z9axjtc09rqKUPRmijD5m9iv8iQpHBRYRMBcgxSiKTZKm6FwWw1/cI4v6em35OsKCiN5Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.38.0", - "@typescript-eslint/typescript-estree": "8.38.0", - "@typescript-eslint/utils": "8.38.0", + "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/typescript-estree": "8.39.0", + "@typescript-eslint/utils": "8.39.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1200,13 +1200,13 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.38.0.tgz", - "integrity": "sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.39.0.tgz", + "integrity": "sha512-ArDdaOllnCj3yn/lzKn9s0pBQYmmyme/v1HbGIGB0GB/knFI3fWMHloC+oYTJW46tVbYnGKTMDK4ah1sC2v0Kg==", "dev": true, "license": "MIT", "engines": { @@ -1218,16 +1218,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.38.0.tgz", - "integrity": "sha512-fooELKcAKzxux6fA6pxOflpNS0jc+nOQEEOipXFNjSlBS6fqrJOVY/whSn70SScHrcJ2LDsxWrneFoWYSVfqhQ==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.39.0.tgz", + "integrity": "sha512-ndWdiflRMvfIgQRpckQQLiB5qAKQ7w++V4LlCHwp62eym1HLB/kw7D9f2e8ytONls/jt89TEasgvb+VwnRprsw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.38.0", - "@typescript-eslint/tsconfig-utils": "8.38.0", - "@typescript-eslint/types": "8.38.0", - "@typescript-eslint/visitor-keys": "8.38.0", + "@typescript-eslint/project-service": "8.39.0", + "@typescript-eslint/tsconfig-utils": "8.39.0", + "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/visitor-keys": "8.39.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1243,20 +1243,20 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/utils": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.38.0.tgz", - "integrity": "sha512-hHcMA86Hgt+ijJlrD8fX0j1j8w4C92zue/8LOPAFioIno+W0+L7KqE8QZKCcPGc/92Vs9x36w/4MPTJhqXdyvg==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.39.0.tgz", + "integrity": "sha512-4GVSvNA0Vx1Ktwvf4sFE+exxJ3QGUorQG1/A5mRfRNZtkBT2xrA/BCO2H0eALx/PnvCS6/vmYwRdDA41EoffkQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.38.0", - "@typescript-eslint/types": "8.38.0", - "@typescript-eslint/typescript-estree": "8.38.0" + "@typescript-eslint/scope-manager": "8.39.0", + "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/typescript-estree": "8.39.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1267,17 +1267,17 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.38.0.tgz", - "integrity": "sha512-pWrTcoFNWuwHlA9CvlfSsGWs14JxfN1TH25zM5L7o0pRLhsoZkDnTsXfQRJBEWJoV5DL0jf+Z+sxiud+K0mq1g==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.39.0.tgz", + "integrity": "sha512-ldgiJ+VAhQCfIjeOgu8Kj5nSxds0ktPOSO9p4+0VDH2R2pLvQraaM5Oen2d7NxzMCm+Sn/vJT+mv2H5u6b/3fA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/types": "8.39.0", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -3810,16 +3810,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.38.0.tgz", - "integrity": "sha512-FsZlrYK6bPDGoLeZRuvx2v6qrM03I0U0SnfCLPs/XCCPCFD80xU9Pg09H/K+XFa68uJuZo7l/Xhs+eDRg2l3hg==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.39.0.tgz", + "integrity": "sha512-lH8FvtdtzcHJCkMOKnN73LIn6SLTpoojgJqDAxPm1jCR14eWSGPX8ul/gggBdPMk/d5+u9V854vTYQ8T5jF/1Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.38.0", - "@typescript-eslint/parser": "8.38.0", - "@typescript-eslint/typescript-estree": "8.38.0", - "@typescript-eslint/utils": "8.38.0" + "@typescript-eslint/eslint-plugin": "8.39.0", + "@typescript-eslint/parser": "8.39.0", + "@typescript-eslint/typescript-estree": "8.39.0", + "@typescript-eslint/utils": "8.39.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3830,7 +3830,7 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/uc.micro": { From 876880b9b2b0fecf2d11639bb88e7a6ec83d3294 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 10:04:58 +0000 Subject: [PATCH 088/111] build(deps-dev): bump typescript from 5.8.3 to 5.9.2 Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.8.3 to 5.9.2. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.8.3...v5.9.2) --- updated-dependencies: - dependency-name: typescript dependency-version: 5.9.2 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index d11e3999c2..e16133621a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "ts-mockito": "^2.3.1", "tsx": "^4.19.1", "typedoc": "^0.28.0", - "typescript": "~5.8.2", + "typescript": "~5.9.2", "typescript-eslint": "^8.26.0" } }, @@ -3796,9 +3796,9 @@ } }, "node_modules/typescript": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", - "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", + "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/package.json b/package.json index 173117514f..f3251039bc 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "ts-mockito": "^2.3.1", "tsx": "^4.19.1", "typedoc": "^0.28.0", - "typescript": "~5.8.2", + "typescript": "~5.9.2", "typescript-eslint": "^8.26.0" }, "bugs": { From bebf4ee358fec90366b293ee0e06067ae171849c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 11:12:29 +0000 Subject: [PATCH 089/111] build(deps): bump @types/node from 24.1.0 to 24.2.0 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.1.0 to 24.2.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 24.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 20388706eb..eecff0dbee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1022,12 +1022,12 @@ } }, "node_modules/@types/node": { - "version": "24.1.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz", - "integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==", + "version": "24.2.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.0.tgz", + "integrity": "sha512-3xyG3pMCq3oYCNg7/ZP+E1ooTaGB4cG8JWRsqqOYQdbWNY4zbaV0Ennrd7stjiJEFZCaybcIgpTjJWHRfBSIDw==", "license": "MIT", "dependencies": { - "undici-types": "~7.8.0" + "undici-types": "~7.10.0" } }, "node_modules/@types/node-fetch": { @@ -3841,9 +3841,9 @@ "license": "MIT" }, "node_modules/undici-types": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", - "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", "license": "MIT" }, "node_modules/uri-js": { From e5dd474a3d8891fd978b566c6733a33d27ff0629 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 02:18:13 +0000 Subject: [PATCH 090/111] build(deps): bump openid-client from 6.6.2 to 6.6.3 Bumps [openid-client](https://github.com/panva/openid-client) from 6.6.2 to 6.6.3. - [Release notes](https://github.com/panva/openid-client/releases) - [Changelog](https://github.com/panva/openid-client/blob/main/CHANGELOG.md) - [Commits](https://github.com/panva/openid-client/compare/v6.6.2...v6.6.3) --- updated-dependencies: - dependency-name: openid-client dependency-version: 6.6.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index ab2cd5b185..3409cbb746 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2670,9 +2670,9 @@ } }, "node_modules/jose": { - "version": "6.0.11", - "resolved": "https://registry.npmjs.org/jose/-/jose-6.0.11.tgz", - "integrity": "sha512-QxG7EaliDARm1O1S8BGakqncGT9s25bKL1WSf6/oa17Tkqwi8D2ZNglqCF+DsYF88/rV66Q/Q2mFAy697E1DUg==", + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.0.12.tgz", + "integrity": "sha512-T8xypXs8CpmiIi78k0E+Lk7T2zlK4zDyg+o1CZ4AkOHgDg98ogdP2BeZ61lTFKFyoEwJ9RgAgN+SdM3iPgNonQ==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/panva" @@ -3007,9 +3007,10 @@ } }, "node_modules/oauth4webapi": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.5.5.tgz", - "integrity": "sha512-1K88D2GiAydGblHo39NBro5TebGXa+7tYoyIbxvqv3+haDDry7CBE1eSYuNbOSsYCCU6y0gdynVZAkm4YPw4hg==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.6.1.tgz", + "integrity": "sha512-b39+drVyA4aNUptFOhkkmGWnG/BE7dT29SW/8PVYElqp7j/DBqzm5SS1G+MUD07XlTcBOAG+6Cb/35Cx2kHIuQ==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/panva" } @@ -3024,12 +3025,13 @@ } }, "node_modules/openid-client": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-6.6.2.tgz", - "integrity": "sha512-Xya5TNMnnZuTM6DbHdB4q0S3ig2NTAELnii/ASie1xDEr8iiB8zZbO871OWBdrw++sd3hW6bqWjgcmSy1RTWHA==", + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-6.6.3.tgz", + "integrity": "sha512-sYYFJsyN21bjf/QepIU/t6w22tEUT+rYVPf1VZOSQwC+s1hAkyZpvAbFNLMrnrYMS/H74MctEHna2jPLvWbkCA==", + "license": "MIT", "dependencies": { - "jose": "^6.0.11", - "oauth4webapi": "^3.5.4" + "jose": "^6.0.12", + "oauth4webapi": "^3.6.1" }, "funding": { "url": "https://github.com/sponsors/panva" From 073249bb67ac85247843e07868f2d720a7529096 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Aug 2025 02:52:01 +0000 Subject: [PATCH 091/111] build(deps-dev): bump nock from 14.0.8 to 14.0.9 Bumps [nock](https://github.com/nock/nock) from 14.0.8 to 14.0.9. - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v14.0.8...v14.0.9) --- updated-dependencies: - dependency-name: nock dependency-version: 14.0.9 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3409cbb746..b709186e38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2972,9 +2972,9 @@ "license": "MIT" }, "node_modules/nock": { - "version": "14.0.8", - "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.8.tgz", - "integrity": "sha512-5DCGrkwK1f8kxUvqvzLWb97XuDUY4/t5M3ZcogPfLGvC2wO8wjRQsIDSXj2L6e1J0Dv8xscf9wWSvGnS3OL29Q==", + "version": "14.0.9", + "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.9.tgz", + "integrity": "sha512-aVIPgW9WVyb3XPCqfrwETc+hazxzgt8/QvARHAhC6BYHtTsZONUjlXoIB8EGmwqUBkKvOew4yqkGRBmwctdCrw==", "dev": true, "license": "MIT", "dependencies": { From 66f8f1716daf7201af9f57800bb71587a04d94f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 04:01:47 +0000 Subject: [PATCH 092/111] build(deps-dev): bump typedoc from 0.28.9 to 0.28.10 Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.28.9 to 0.28.10. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.28.9...v0.28.10) --- updated-dependencies: - dependency-name: typedoc dependency-version: 0.28.10 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b709186e38..770abf4613 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3774,9 +3774,9 @@ } }, "node_modules/typedoc": { - "version": "0.28.9", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.9.tgz", - "integrity": "sha512-aw45vwtwOl3QkUAmWCnLV9QW1xY+FSX2zzlit4MAfE99wX+Jij4ycnpbAWgBXsRrxmfs9LaYktg/eX5Bpthd3g==", + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.10.tgz", + "integrity": "sha512-zYvpjS2bNJ30SoNYfHSRaFpBMZAsL7uwKbWwqoCNFWjcPnI3e/mPLh2SneH9mX7SJxtDpvDgvd9/iZxGbo7daw==", "dev": true, "license": "Apache-2.0", "dependencies": { From b66f16d7b5ecd4733c54e12070a356cec03c6a5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 04:04:13 +0000 Subject: [PATCH 093/111] build(deps): bump @types/node from 24.2.0 to 24.2.1 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.2.0 to 24.2.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 24.2.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b709186e38..f2055c5db5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1022,9 +1022,9 @@ } }, "node_modules/@types/node": { - "version": "24.2.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.0.tgz", - "integrity": "sha512-3xyG3pMCq3oYCNg7/ZP+E1ooTaGB4cG8JWRsqqOYQdbWNY4zbaV0Ennrd7stjiJEFZCaybcIgpTjJWHRfBSIDw==", + "version": "24.2.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.1.tgz", + "integrity": "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==", "license": "MIT", "dependencies": { "undici-types": "~7.10.0" From b88e2345015c3514f351b2f667d2e89556aa25e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 04:05:51 +0000 Subject: [PATCH 094/111] build(deps-dev): bump @eslint/js from 9.32.0 to 9.33.0 Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.32.0 to 9.33.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/commits/v9.33.0/packages/js) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-version: 9.33.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b709186e38..1a18089bec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -628,9 +628,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.32.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.32.0.tgz", - "integrity": "sha512-BBpRFZK3eX6uMLKz8WxFOBIFFcGFJ/g8XuwjTHCqHROSIsopI+ddn/d5Cfh36+7+e5edVS8dbSHnBNhrLEX0zg==", + "version": "9.33.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.33.0.tgz", + "integrity": "sha512-5K1/mKhWaMfreBGJTwval43JJmkip0RmM+3+IuqupeSKNC/Th2Kc7ucaq5ovTSra/OOKB9c58CGSz3QMVbWt0A==", "dev": true, "license": "MIT", "engines": { @@ -2010,6 +2010,19 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/@eslint/js": { + "version": "9.32.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.32.0.tgz", + "integrity": "sha512-BBpRFZK3eX6uMLKz8WxFOBIFFcGFJ/g8XuwjTHCqHROSIsopI+ddn/d5Cfh36+7+e5edVS8dbSHnBNhrLEX0zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", From a43601fd3fbcea4da71179ea97bd0076444d6f8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 11:29:34 +0000 Subject: [PATCH 095/111] build(deps-dev): bump eslint from 9.32.0 to 9.33.0 Bumps [eslint](https://github.com/eslint/eslint) from 9.32.0 to 9.33.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.32.0...v9.33.0) --- updated-dependencies: - dependency-name: eslint dependency-version: 9.33.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 48 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/package-lock.json b/package-lock.json index b154ec3da9..7dbaf8fe84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -558,18 +558,19 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.0.tgz", - "integrity": "sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", + "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/core": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.1.tgz", - "integrity": "sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -650,13 +651,13 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.4.tgz", - "integrity": "sha512-Ul5l+lHEcw3L5+k8POx6r74mxEYKG5kOb6Xpy2gCRW6zweT6TEhAf8vhxGgjhqrd/VO/Dirhsb+1hNpD1ue9hw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.15.1", + "@eslint/core": "^0.15.2", "levn": "^0.4.1" }, "engines": { @@ -1901,20 +1902,20 @@ } }, "node_modules/eslint": { - "version": "9.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.32.0.tgz", - "integrity": "sha512-LSehfdpgMeWcTZkWZVIJl+tkZ2nuSkyyB9C27MZqFWXuph7DvaowgcTvKqxvpLW1JZIk8PN7hFY3Rj9LQ7m7lg==", + "version": "9.33.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.33.0.tgz", + "integrity": "sha512-TS9bTNIryDzStCpJN93aC5VRSW3uTx9sClUn4B87pwiCaJh220otoI0X8mJKr+VcPtniMdN8GKjlwgWGUv5ZKA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.21.0", - "@eslint/config-helpers": "^0.3.0", - "@eslint/core": "^0.15.0", + "@eslint/config-helpers": "^0.3.1", + "@eslint/core": "^0.15.2", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.32.0", - "@eslint/plugin-kit": "^0.3.4", + "@eslint/js": "9.33.0", + "@eslint/plugin-kit": "^0.3.5", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", @@ -2010,19 +2011,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@eslint/js": { - "version": "9.32.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.32.0.tgz", - "integrity": "sha512-BBpRFZK3eX6uMLKz8WxFOBIFFcGFJ/g8XuwjTHCqHROSIsopI+ddn/d5Cfh36+7+e5edVS8dbSHnBNhrLEX0zg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - } - }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", From b8505deb9f4c80f3797a9770668c4fec18245890 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 12:24:10 +0000 Subject: [PATCH 096/111] build(deps-dev): bump typescript-eslint from 8.39.0 to 8.39.1 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.39.0 to 8.39.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.39.1/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-version: 8.39.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 122 +++++++++++++++++++++++----------------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7dbaf8fe84..ed3aa91882 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1058,17 +1058,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.39.0.tgz", - "integrity": "sha512-bhEz6OZeUR+O/6yx9Jk6ohX6H9JSFTaiY0v9/PuKT3oGK0rn0jNplLmyFUGV+a9gfYnVNwGDwS/UkLIuXNb2Rw==", + "version": "8.39.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.39.1.tgz", + "integrity": "sha512-yYegZ5n3Yr6eOcqgj2nJH8cH/ZZgF+l0YIdKILSDjYFRjgYQMgv/lRjV5Z7Up04b9VYUondt8EPMqg7kTWgJ2g==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.39.0", - "@typescript-eslint/type-utils": "8.39.0", - "@typescript-eslint/utils": "8.39.0", - "@typescript-eslint/visitor-keys": "8.39.0", + "@typescript-eslint/scope-manager": "8.39.1", + "@typescript-eslint/type-utils": "8.39.1", + "@typescript-eslint/utils": "8.39.1", + "@typescript-eslint/visitor-keys": "8.39.1", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -1082,7 +1082,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.39.0", + "@typescript-eslint/parser": "^8.39.1", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } @@ -1098,16 +1098,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.39.0.tgz", - "integrity": "sha512-g3WpVQHngx0aLXn6kfIYCZxM6rRJlWzEkVpqEFLT3SgEDsp9cpCbxxgwnE504q4H+ruSDh/VGS6nqZIDynP+vg==", + "version": "8.39.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.39.1.tgz", + "integrity": "sha512-pUXGCuHnnKw6PyYq93lLRiZm3vjuslIy7tus1lIQTYVK9bL8XBgJnCWm8a0KcTtHC84Yya1Q6rtll+duSMj0dg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.39.0", - "@typescript-eslint/types": "8.39.0", - "@typescript-eslint/typescript-estree": "8.39.0", - "@typescript-eslint/visitor-keys": "8.39.0", + "@typescript-eslint/scope-manager": "8.39.1", + "@typescript-eslint/types": "8.39.1", + "@typescript-eslint/typescript-estree": "8.39.1", + "@typescript-eslint/visitor-keys": "8.39.1", "debug": "^4.3.4" }, "engines": { @@ -1123,14 +1123,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.39.0.tgz", - "integrity": "sha512-CTzJqaSq30V/Z2Og9jogzZt8lJRR5TKlAdXmWgdu4hgcC9Kww5flQ+xFvMxIBWVNdxJO7OifgdOK4PokMIWPew==", + "version": "8.39.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.39.1.tgz", + "integrity": "sha512-8fZxek3ONTwBu9ptw5nCKqZOSkXshZB7uAxuFF0J/wTMkKydjXCzqqga7MlFMpHi9DoG4BadhmTkITBcg8Aybw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.39.0", - "@typescript-eslint/types": "^8.39.0", + "@typescript-eslint/tsconfig-utils": "^8.39.1", + "@typescript-eslint/types": "^8.39.1", "debug": "^4.3.4" }, "engines": { @@ -1145,14 +1145,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.39.0.tgz", - "integrity": "sha512-8QOzff9UKxOh6npZQ/4FQu4mjdOCGSdO3p44ww0hk8Vu+IGbg0tB/H1LcTARRDzGCC8pDGbh2rissBuuoPgH8A==", + "version": "8.39.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.39.1.tgz", + "integrity": "sha512-RkBKGBrjgskFGWuyUGz/EtD8AF/GW49S21J8dvMzpJitOF1slLEbbHnNEtAHtnDAnx8qDEdRrULRnWVx27wGBw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.39.0", - "@typescript-eslint/visitor-keys": "8.39.0" + "@typescript-eslint/types": "8.39.1", + "@typescript-eslint/visitor-keys": "8.39.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1163,9 +1163,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.39.0.tgz", - "integrity": "sha512-Fd3/QjmFV2sKmvv3Mrj8r6N8CryYiCS8Wdb/6/rgOXAWGcFuc+VkQuG28uk/4kVNVZBQuuDHEDUpo/pQ32zsIQ==", + "version": "8.39.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.39.1.tgz", + "integrity": "sha512-ePUPGVtTMR8XMU2Hee8kD0Pu4NDE1CN9Q1sxGSGd/mbOtGZDM7pnhXNJnzW63zk/q+Z54zVzj44HtwXln5CvHA==", "dev": true, "license": "MIT", "engines": { @@ -1180,15 +1180,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.39.0.tgz", - "integrity": "sha512-6B3z0c1DXVT2vYA9+z9axjtc09rqKUPRmijD5m9iv8iQpHBRYRMBcgxSiKTZKm6FwWw1/cI4v6em35OsKCiN5Q==", + "version": "8.39.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.39.1.tgz", + "integrity": "sha512-gu9/ahyatyAdQbKeHnhT4R+y3YLtqqHyvkfDxaBYk97EcbfChSJXyaJnIL3ygUv7OuZatePHmQvuH5ru0lnVeA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.39.0", - "@typescript-eslint/typescript-estree": "8.39.0", - "@typescript-eslint/utils": "8.39.0", + "@typescript-eslint/types": "8.39.1", + "@typescript-eslint/typescript-estree": "8.39.1", + "@typescript-eslint/utils": "8.39.1", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1205,9 +1205,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.39.0.tgz", - "integrity": "sha512-ArDdaOllnCj3yn/lzKn9s0pBQYmmyme/v1HbGIGB0GB/knFI3fWMHloC+oYTJW46tVbYnGKTMDK4ah1sC2v0Kg==", + "version": "8.39.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.39.1.tgz", + "integrity": "sha512-7sPDKQQp+S11laqTrhHqeAbsCfMkwJMrV7oTDvtDds4mEofJYir414bYKUEb8YPUm9QL3U+8f6L6YExSoAGdQw==", "dev": true, "license": "MIT", "engines": { @@ -1219,16 +1219,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.39.0.tgz", - "integrity": "sha512-ndWdiflRMvfIgQRpckQQLiB5qAKQ7w++V4LlCHwp62eym1HLB/kw7D9f2e8ytONls/jt89TEasgvb+VwnRprsw==", + "version": "8.39.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.39.1.tgz", + "integrity": "sha512-EKkpcPuIux48dddVDXyQBlKdeTPMmALqBUbEk38McWv0qVEZwOpVJBi7ugK5qVNgeuYjGNQxrrnoM/5+TI/BPw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.39.0", - "@typescript-eslint/tsconfig-utils": "8.39.0", - "@typescript-eslint/types": "8.39.0", - "@typescript-eslint/visitor-keys": "8.39.0", + "@typescript-eslint/project-service": "8.39.1", + "@typescript-eslint/tsconfig-utils": "8.39.1", + "@typescript-eslint/types": "8.39.1", + "@typescript-eslint/visitor-keys": "8.39.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1248,16 +1248,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.39.0.tgz", - "integrity": "sha512-4GVSvNA0Vx1Ktwvf4sFE+exxJ3QGUorQG1/A5mRfRNZtkBT2xrA/BCO2H0eALx/PnvCS6/vmYwRdDA41EoffkQ==", + "version": "8.39.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.39.1.tgz", + "integrity": "sha512-VF5tZ2XnUSTuiqZFXCZfZs1cgkdd3O/sSYmdo2EpSyDlC86UM/8YytTmKnehOW3TGAlivqTDT6bS87B/GQ/jyg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.39.0", - "@typescript-eslint/types": "8.39.0", - "@typescript-eslint/typescript-estree": "8.39.0" + "@typescript-eslint/scope-manager": "8.39.1", + "@typescript-eslint/types": "8.39.1", + "@typescript-eslint/typescript-estree": "8.39.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1272,13 +1272,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.39.0.tgz", - "integrity": "sha512-ldgiJ+VAhQCfIjeOgu8Kj5nSxds0ktPOSO9p4+0VDH2R2pLvQraaM5Oen2d7NxzMCm+Sn/vJT+mv2H5u6b/3fA==", + "version": "8.39.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.39.1.tgz", + "integrity": "sha512-W8FQi6kEh2e8zVhQ0eeRnxdvIoOkAp/CPAahcNio6nO9dsIwb9b34z90KOlheoyuVf6LSOEdjlkxSkapNEc+4A==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/types": "8.39.1", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -3813,16 +3813,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.39.0.tgz", - "integrity": "sha512-lH8FvtdtzcHJCkMOKnN73LIn6SLTpoojgJqDAxPm1jCR14eWSGPX8ul/gggBdPMk/d5+u9V854vTYQ8T5jF/1Q==", + "version": "8.39.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.39.1.tgz", + "integrity": "sha512-GDUv6/NDYngUlNvwaHM1RamYftxf782IyEDbdj3SeaIHHv8fNQVRC++fITT7kUJV/5rIA/tkoRSSskt6osEfqg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.39.0", - "@typescript-eslint/parser": "8.39.0", - "@typescript-eslint/typescript-estree": "8.39.0", - "@typescript-eslint/utils": "8.39.0" + "@typescript-eslint/eslint-plugin": "8.39.1", + "@typescript-eslint/parser": "8.39.1", + "@typescript-eslint/typescript-estree": "8.39.1", + "@typescript-eslint/utils": "8.39.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" From 3bd129da99630de01bb2bed45fa4e3f0e1fdd8a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 13:35:41 +0000 Subject: [PATCH 097/111] build(deps): bump actions/checkout from 4.2.2 to 5.0.0 Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.2.2...v5.0.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/deploy-docs.yml | 2 +- .github/workflows/generate-javascript.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c96cf6f6ef..e2daf7ed29 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,7 +38,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.2.2 + uses: actions/checkout@v5.0.0 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 06c93436bd..6fd4f0f63b 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4.2.2 + uses: actions/checkout@v5.0.0 - name: Setup Node.js uses: actions/setup-node@v4 with: diff --git a/.github/workflows/generate-javascript.yml b/.github/workflows/generate-javascript.yml index 06de1bfe18..670026eae3 100644 --- a/.github/workflows/generate-javascript.yml +++ b/.github/workflows/generate-javascript.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Javascript - uses: actions/checkout@v4.2.2 + uses: actions/checkout@v5.0.0 - name: Setup Node uses: actions/setup-node@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 74eee0c6bf..58f77ae599 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: environment: production steps: - name: Checkout Javascript - uses: actions/checkout@v4.2.2 + uses: actions/checkout@v5.0.0 - name: Setup Node uses: actions/setup-node@v4 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 140d0911d3..565dd2a53e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: node: ['24', '23', '22', '20', '18'] name: Node ${{ matrix.node }} validation steps: - - uses: actions/checkout@v4.2.2 + - uses: actions/checkout@v5.0.0 - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} From bff11cd1a1b3f6078f68e1ff17d973432321b8bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 03:16:36 +0000 Subject: [PATCH 098/111] build(deps-dev): bump nock from 14.0.9 to 14.0.10 Bumps [nock](https://github.com/nock/nock) from 14.0.9 to 14.0.10. - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v14.0.9...v14.0.10) --- updated-dependencies: - dependency-name: nock dependency-version: 14.0.10 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ed3aa91882..60de90fbbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2973,9 +2973,9 @@ "license": "MIT" }, "node_modules/nock": { - "version": "14.0.9", - "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.9.tgz", - "integrity": "sha512-aVIPgW9WVyb3XPCqfrwETc+hazxzgt8/QvARHAhC6BYHtTsZONUjlXoIB8EGmwqUBkKvOew4yqkGRBmwctdCrw==", + "version": "14.0.10", + "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.10.tgz", + "integrity": "sha512-Q7HjkpyPeLa0ZVZC5qpxBt5EyLczFJ91MEewQiIi9taWuA0KB/MDJlUWtON+7dGouVdADTQsf9RA7TZk6D8VMw==", "dev": true, "license": "MIT", "dependencies": { From a5e02efc8fd28dbbe9d99c1aa5c375021f868a81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 03:42:43 +0000 Subject: [PATCH 099/111] build(deps): bump openid-client from 6.6.3 to 6.6.4 Bumps [openid-client](https://github.com/panva/openid-client) from 6.6.3 to 6.6.4. - [Release notes](https://github.com/panva/openid-client/releases) - [Changelog](https://github.com/panva/openid-client/blob/main/CHANGELOG.md) - [Commits](https://github.com/panva/openid-client/compare/v6.6.3...v6.6.4) --- updated-dependencies: - dependency-name: openid-client dependency-version: 6.6.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index ed3aa91882..6656ddf90d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3008,9 +3008,9 @@ } }, "node_modules/oauth4webapi": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.6.1.tgz", - "integrity": "sha512-b39+drVyA4aNUptFOhkkmGWnG/BE7dT29SW/8PVYElqp7j/DBqzm5SS1G+MUD07XlTcBOAG+6Cb/35Cx2kHIuQ==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.7.0.tgz", + "integrity": "sha512-Q52wTPUWPsVLVVmTViXPQFMW2h2xv2jnDGxypjpelCFKaOjLsm7AxYuOk1oQgFm95VNDbuggasu9htXrz6XwKw==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/panva" @@ -3026,13 +3026,13 @@ } }, "node_modules/openid-client": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-6.6.3.tgz", - "integrity": "sha512-sYYFJsyN21bjf/QepIU/t6w22tEUT+rYVPf1VZOSQwC+s1hAkyZpvAbFNLMrnrYMS/H74MctEHna2jPLvWbkCA==", + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-6.6.4.tgz", + "integrity": "sha512-PLWVhRksRnNH05sqeuCX/PR+1J70NyZcAcPske+FeF732KKONd3v0p5Utx1ro1iLfCglH8B3/+dA1vqIHDoIiA==", "license": "MIT", "dependencies": { "jose": "^6.0.12", - "oauth4webapi": "^3.6.1" + "oauth4webapi": "^3.7.0" }, "funding": { "url": "https://github.com/sponsors/panva" From f7fc4d7fa75f316ad74b018798d7035d75453e32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 03:47:20 +0000 Subject: [PATCH 100/111] build(deps-dev): bump tsx from 4.20.3 to 4.20.4 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.20.3 to 4.20.4. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.20.3...v4.20.4) --- updated-dependencies: - dependency-name: tsx dependency-version: 4.20.4 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ed3aa91882..134b2befea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3742,9 +3742,9 @@ "license": "0BSD" }, "node_modules/tsx": { - "version": "4.20.3", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.3.tgz", - "integrity": "sha512-qjbnuR9Tr+FJOMBqJCW5ehvIo/buZq7vH7qD7JziU98h6l3qGy0a/yPFjwO+y0/T7GFpNgNAvEcPPVfyT8rrPQ==", + "version": "4.20.4", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.4.tgz", + "integrity": "sha512-yyxBKfORQ7LuRt/BQKBXrpcq59ZvSW0XxwfjAt3w2/8PmdxaFzijtMhTawprSHhpzeM5BgU2hXHG3lklIERZXg==", "dev": true, "license": "MIT", "dependencies": { From 66cc219a89a1865690ea804bc7acaa7f2a10362f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Str=C3=BCbing?= Date: Wed, 13 Aug 2025 08:03:47 +0000 Subject: [PATCH 101/111] chore: update openapi generator commit --- settings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings b/settings index 2f38b8ee97..4954878e7e 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=3e032bfcfd74b03f33fa5fb3d073286daf5cdbe1 From 65a65dba5d471655b1e29370a67c054f594819cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Str=C3=BCbing?= Date: Wed, 13 Aug 2025 08:04:37 +0000 Subject: [PATCH 102/111] chore: 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/models/ObjectSerializer.ts | 9 +- src/gen/types/ObservableAPI.ts | 31358 +++------------------------ src/gen/types/PromiseAPI.ts | 22648 ++----------------- 11 files changed, 5318 insertions(+), 48809 deletions(-) diff --git a/src/gen/.openapi-generator/COMMIT b/src/gen/.openapi-generator/COMMIT index 8e14816441..2e148d692c 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 : 3e032bfcfd74b03f33fa5fb3d073286daf5cdbe1 +Actual Commit : 3e032bfcfd74b03f33fa5fb3d073286daf5cdbe1 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/models/ObjectSerializer.ts b/src/gen/models/ObjectSerializer.ts index 2826206717..c0c8bc6fb4 100644 --- a/src/gen/models/ObjectSerializer.ts +++ b/src/gen/models/ObjectSerializer.ts @@ -2228,13 +2228,16 @@ export class ObjectSerializer { } return transformedData; } else if (type === "Date") { + if (!(data instanceof Date)) { + return data; + } if (format == "date") { let month = data.getMonth()+1 - month = month < 10 ? "0" + month.toString() : month.toString() + let monthStr = month < 10 ? "0" + month.toString() : month.toString() let day = data.getDate(); - day = day < 10 ? "0" + day.toString() : day.toString(); + let dayStr = day < 10 ? "0" + day.toString() : day.toString(); - return data.getFullYear() + "-" + month + "-" + day; + return data.getFullYear() + "-" + monthStr + "-" + dayStr; } else { return data.toISOString(); } 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(); } From adb26a115ec42fd75ba830eed9f3705a300e0c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Str=C3=BCbing?= Date: Wed, 13 Aug 2025 08:08:44 +0000 Subject: [PATCH 103/111] chore: update node-fetch and node-fetch types --- package-lock.json | 12 ++++++------ package.json | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index ed3aa91882..c99cc53b46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,14 +11,14 @@ "dependencies": { "@types/js-yaml": "^4.0.1", "@types/node": "^24.0.0", - "@types/node-fetch": "^2.6.9", + "@types/node-fetch": "^2.6.13", "@types/stream-buffers": "^3.0.3", "form-data": "^4.0.0", "hpagent": "^1.2.0", "isomorphic-ws": "^5.0.0", "js-yaml": "^4.1.0", "jsonpath-plus": "^10.3.0", - "node-fetch": "^2.6.9", + "node-fetch": "^2.7.0", "openid-client": "^6.1.3", "rfc4648": "^1.3.0", "socks-proxy-agent": "^8.0.4", @@ -1032,13 +1032,13 @@ } }, "node_modules/@types/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==", + "version": "2.6.13", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.13.tgz", + "integrity": "sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw==", "license": "MIT", "dependencies": { "@types/node": "*", - "form-data": "^4.0.0" + "form-data": "^4.0.4" } }, "node_modules/@types/stream-buffers": { diff --git a/package.json b/package.json index f3251039bc..9903e21cd6 100644 --- a/package.json +++ b/package.json @@ -57,14 +57,14 @@ "dependencies": { "@types/js-yaml": "^4.0.1", "@types/node": "^24.0.0", - "@types/node-fetch": "^2.6.9", + "@types/node-fetch": "^2.6.13", "@types/stream-buffers": "^3.0.3", "form-data": "^4.0.0", "hpagent": "^1.2.0", "isomorphic-ws": "^5.0.0", "js-yaml": "^4.1.0", "jsonpath-plus": "^10.3.0", - "node-fetch": "^2.6.9", + "node-fetch": "^2.7.0", "openid-client": "^6.1.3", "rfc4648": "^1.3.0", "socks-proxy-agent": "^8.0.4", From 5351aba23eb6a79c5ff97af63a3226fa5749ce46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Str=C3=BCbing?= Date: Thu, 14 Aug 2025 06:57:59 +0000 Subject: [PATCH 104/111] chore: adjust tsconfig --- tsconfig-with-tests.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tsconfig-with-tests.json b/tsconfig-with-tests.json index 98928a3edd..0542a3e9d5 100644 --- a/tsconfig-with-tests.json +++ b/tsconfig-with-tests.json @@ -1,4 +1,9 @@ { "extends": "./tsconfig.json", - "exclude": [] + "exclude": [], + "compilerOptions": { + "paths": { + "node-fetch/externals": ["./node_modules/@types/node-fetch/externals.d.ts"] + } + } } From cf7e03a5bd1a10ef7cbf73ca10b2e5ec52de5f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Str=C3=BCbing?= Date: Thu, 14 Aug 2025 07:00:39 +0000 Subject: [PATCH 105/111] chore: adjust tsconfig --- tsconfig.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 20caf8fc24..18424c2e5c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,10 @@ "importHelpers": true, "skipLibCheck": true, "esModuleInterop": true, - "useDefineForClassFields": false + "useDefineForClassFields": false, + "paths": { + "node-fetch/externals": ["./node_modules/@types/node-fetch/externals.d.ts"] + } // enable this in the future // "declarationMap": true }, From 58797a1a13b0d911c5619b5826b1f43f78bc87b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 03:59:39 +0000 Subject: [PATCH 106/111] build(deps): bump @types/node from 24.2.1 to 24.3.0 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.2.1 to 24.3.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 24.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 95fbade6e0..788bdf4701 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1023,9 +1023,9 @@ } }, "node_modules/@types/node": { - "version": "24.2.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.1.tgz", - "integrity": "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==", + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz", + "integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==", "license": "MIT", "dependencies": { "undici-types": "~7.10.0" From 3a90635f1f9ae8035e9ede9f6828f1269d6a0f56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 12:58:39 +0000 Subject: [PATCH 107/111] build(deps-dev): bump typescript-eslint from 8.39.1 to 8.40.0 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.39.1 to 8.40.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.40.0/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-version: 8.40.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 122 +++++++++++++++++++++++----------------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/package-lock.json b/package-lock.json index 788bdf4701..979cc9b27b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1058,17 +1058,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.39.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.39.1.tgz", - "integrity": "sha512-yYegZ5n3Yr6eOcqgj2nJH8cH/ZZgF+l0YIdKILSDjYFRjgYQMgv/lRjV5Z7Up04b9VYUondt8EPMqg7kTWgJ2g==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.40.0.tgz", + "integrity": "sha512-w/EboPlBwnmOBtRbiOvzjD+wdiZdgFeo17lkltrtn7X37vagKKWJABvyfsJXTlHe6XBzugmYgd4A4nW+k8Mixw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.39.1", - "@typescript-eslint/type-utils": "8.39.1", - "@typescript-eslint/utils": "8.39.1", - "@typescript-eslint/visitor-keys": "8.39.1", + "@typescript-eslint/scope-manager": "8.40.0", + "@typescript-eslint/type-utils": "8.40.0", + "@typescript-eslint/utils": "8.40.0", + "@typescript-eslint/visitor-keys": "8.40.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -1082,7 +1082,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.39.1", + "@typescript-eslint/parser": "^8.40.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } @@ -1098,16 +1098,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.39.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.39.1.tgz", - "integrity": "sha512-pUXGCuHnnKw6PyYq93lLRiZm3vjuslIy7tus1lIQTYVK9bL8XBgJnCWm8a0KcTtHC84Yya1Q6rtll+duSMj0dg==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.40.0.tgz", + "integrity": "sha512-jCNyAuXx8dr5KJMkecGmZ8KI61KBUhkCob+SD+C+I5+Y1FWI2Y3QmY4/cxMCC5WAsZqoEtEETVhUiUMIGCf6Bw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.39.1", - "@typescript-eslint/types": "8.39.1", - "@typescript-eslint/typescript-estree": "8.39.1", - "@typescript-eslint/visitor-keys": "8.39.1", + "@typescript-eslint/scope-manager": "8.40.0", + "@typescript-eslint/types": "8.40.0", + "@typescript-eslint/typescript-estree": "8.40.0", + "@typescript-eslint/visitor-keys": "8.40.0", "debug": "^4.3.4" }, "engines": { @@ -1123,14 +1123,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.39.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.39.1.tgz", - "integrity": "sha512-8fZxek3ONTwBu9ptw5nCKqZOSkXshZB7uAxuFF0J/wTMkKydjXCzqqga7MlFMpHi9DoG4BadhmTkITBcg8Aybw==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.40.0.tgz", + "integrity": "sha512-/A89vz7Wf5DEXsGVvcGdYKbVM9F7DyFXj52lNYUDS1L9yJfqjW/fIp5PgMuEJL/KeqVTe2QSbXAGUZljDUpArw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.39.1", - "@typescript-eslint/types": "^8.39.1", + "@typescript-eslint/tsconfig-utils": "^8.40.0", + "@typescript-eslint/types": "^8.40.0", "debug": "^4.3.4" }, "engines": { @@ -1145,14 +1145,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.39.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.39.1.tgz", - "integrity": "sha512-RkBKGBrjgskFGWuyUGz/EtD8AF/GW49S21J8dvMzpJitOF1slLEbbHnNEtAHtnDAnx8qDEdRrULRnWVx27wGBw==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.40.0.tgz", + "integrity": "sha512-y9ObStCcdCiZKzwqsE8CcpyuVMwRouJbbSrNuThDpv16dFAj429IkM6LNb1dZ2m7hK5fHyzNcErZf7CEeKXR4w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.39.1", - "@typescript-eslint/visitor-keys": "8.39.1" + "@typescript-eslint/types": "8.40.0", + "@typescript-eslint/visitor-keys": "8.40.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1163,9 +1163,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.39.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.39.1.tgz", - "integrity": "sha512-ePUPGVtTMR8XMU2Hee8kD0Pu4NDE1CN9Q1sxGSGd/mbOtGZDM7pnhXNJnzW63zk/q+Z54zVzj44HtwXln5CvHA==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.40.0.tgz", + "integrity": "sha512-jtMytmUaG9d/9kqSl/W3E3xaWESo4hFDxAIHGVW/WKKtQhesnRIJSAJO6XckluuJ6KDB5woD1EiqknriCtAmcw==", "dev": true, "license": "MIT", "engines": { @@ -1180,15 +1180,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.39.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.39.1.tgz", - "integrity": "sha512-gu9/ahyatyAdQbKeHnhT4R+y3YLtqqHyvkfDxaBYk97EcbfChSJXyaJnIL3ygUv7OuZatePHmQvuH5ru0lnVeA==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.40.0.tgz", + "integrity": "sha512-eE60cK4KzAc6ZrzlJnflXdrMqOBaugeukWICO2rB0KNvwdIMaEaYiywwHMzA1qFpTxrLhN9Lp4E/00EgWcD3Ow==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.39.1", - "@typescript-eslint/typescript-estree": "8.39.1", - "@typescript-eslint/utils": "8.39.1", + "@typescript-eslint/types": "8.40.0", + "@typescript-eslint/typescript-estree": "8.40.0", + "@typescript-eslint/utils": "8.40.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1205,9 +1205,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.39.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.39.1.tgz", - "integrity": "sha512-7sPDKQQp+S11laqTrhHqeAbsCfMkwJMrV7oTDvtDds4mEofJYir414bYKUEb8YPUm9QL3U+8f6L6YExSoAGdQw==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.40.0.tgz", + "integrity": "sha512-ETdbFlgbAmXHyFPwqUIYrfc12ArvpBhEVgGAxVYSwli26dn8Ko+lIo4Su9vI9ykTZdJn+vJprs/0eZU0YMAEQg==", "dev": true, "license": "MIT", "engines": { @@ -1219,16 +1219,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.39.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.39.1.tgz", - "integrity": "sha512-EKkpcPuIux48dddVDXyQBlKdeTPMmALqBUbEk38McWv0qVEZwOpVJBi7ugK5qVNgeuYjGNQxrrnoM/5+TI/BPw==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.40.0.tgz", + "integrity": "sha512-k1z9+GJReVVOkc1WfVKs1vBrR5MIKKbdAjDTPvIK3L8De6KbFfPFt6BKpdkdk7rZS2GtC/m6yI5MYX+UsuvVYQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.39.1", - "@typescript-eslint/tsconfig-utils": "8.39.1", - "@typescript-eslint/types": "8.39.1", - "@typescript-eslint/visitor-keys": "8.39.1", + "@typescript-eslint/project-service": "8.40.0", + "@typescript-eslint/tsconfig-utils": "8.40.0", + "@typescript-eslint/types": "8.40.0", + "@typescript-eslint/visitor-keys": "8.40.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1248,16 +1248,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.39.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.39.1.tgz", - "integrity": "sha512-VF5tZ2XnUSTuiqZFXCZfZs1cgkdd3O/sSYmdo2EpSyDlC86UM/8YytTmKnehOW3TGAlivqTDT6bS87B/GQ/jyg==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.40.0.tgz", + "integrity": "sha512-Cgzi2MXSZyAUOY+BFwGs17s7ad/7L+gKt6Y8rAVVWS+7o6wrjeFN4nVfTpbE25MNcxyJ+iYUXflbs2xR9h4UBg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.39.1", - "@typescript-eslint/types": "8.39.1", - "@typescript-eslint/typescript-estree": "8.39.1" + "@typescript-eslint/scope-manager": "8.40.0", + "@typescript-eslint/types": "8.40.0", + "@typescript-eslint/typescript-estree": "8.40.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1272,13 +1272,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.39.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.39.1.tgz", - "integrity": "sha512-W8FQi6kEh2e8zVhQ0eeRnxdvIoOkAp/CPAahcNio6nO9dsIwb9b34z90KOlheoyuVf6LSOEdjlkxSkapNEc+4A==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.40.0.tgz", + "integrity": "sha512-8CZ47QwalyRjsypfwnbI3hKy5gJDPmrkLjkgMxhi0+DZZ2QNx2naS6/hWoVYUHU7LU2zleF68V9miaVZvhFfTA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.39.1", + "@typescript-eslint/types": "8.40.0", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -3813,16 +3813,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.39.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.39.1.tgz", - "integrity": "sha512-GDUv6/NDYngUlNvwaHM1RamYftxf782IyEDbdj3SeaIHHv8fNQVRC++fITT7kUJV/5rIA/tkoRSSskt6osEfqg==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.40.0.tgz", + "integrity": "sha512-Xvd2l+ZmFDPEt4oj1QEXzA4A2uUK6opvKu3eGN9aGjB8au02lIVcLyi375w94hHyejTOmzIU77L8ol2sRg9n7Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.39.1", - "@typescript-eslint/parser": "8.39.1", - "@typescript-eslint/typescript-estree": "8.39.1", - "@typescript-eslint/utils": "8.39.1" + "@typescript-eslint/eslint-plugin": "8.40.0", + "@typescript-eslint/parser": "8.40.0", + "@typescript-eslint/typescript-estree": "8.40.0", + "@typescript-eslint/utils": "8.40.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" From 14908014c3db4fb4d5a3d7a422e50d9760d28091 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Tue, 19 Aug 2025 18:53:30 +0000 Subject: [PATCH 108/111] regen --- settings | 2 +- src/gen/.openapi-generator/COMMIT | 4 ++-- src/gen/http/http.ts | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/settings b/settings index 4954878e7e..06c43a14ef 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=3e032bfcfd74b03f33fa5fb3d073286daf5cdbe1 +export OPENAPI_GENERATOR_COMMIT=d06ed32df0a30fe12a1c7ba98722c12e867b6060 diff --git a/src/gen/.openapi-generator/COMMIT b/src/gen/.openapi-generator/COMMIT index 2e148d692c..a56708a808 100644 --- a/src/gen/.openapi-generator/COMMIT +++ b/src/gen/.openapi-generator/COMMIT @@ -1,2 +1,2 @@ -Requested Commit/Tag : 3e032bfcfd74b03f33fa5fb3d073286daf5cdbe1 -Actual Commit : 3e032bfcfd74b03f33fa5fb3d073286daf5cdbe1 +Requested Commit/Tag : d06ed32df0a30fe12a1c7ba98722c12e867b6060 +Actual Commit : d06ed32df0a30fe12a1c7ba98722c12e867b6060 diff --git a/src/gen/http/http.ts b/src/gen/http/http.ts index 525eee647c..79bcf792e0 100644 --- a/src/gen/http/http.ts +++ b/src/gen/http/http.ts @@ -3,7 +3,6 @@ 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'; From 0ae5ddfbdd5ea9f31b40c458b936f1dcdba94f59 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Tue, 19 Aug 2025 18:58:40 +0000 Subject: [PATCH 109/111] update test --- src/watch.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/watch.ts b/src/watch.ts index 98db927d45..4c51399a62 100644 --- a/src/watch.ts +++ b/src/watch.ts @@ -39,9 +39,10 @@ export class Watch { const requestInit = await this.config.applyToFetchOptions({}); const controller = new AbortController(); + const timeoutSignal = AbortSignal.timeout(30000); + requestInit.signal = AbortSignal.any([controller.signal, timeoutSignal]); requestInit.signal = controller.signal as AbortSignal; requestInit.method = 'GET'; - requestInit.timeout = 30000; let doneCalled: boolean = false; const doneCallOnce = (err: any) => { From c663ee7feb5e110f72a5c7a5a55324bb23200819 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 21 Aug 2025 17:15:37 +0000 Subject: [PATCH 110/111] update tsconfig --- package.json | 2 +- tsconfig-with-tests.json | 7 +------ tsconfig.json | 5 +---- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 9903e21cd6..052b8a1178 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "lint": "eslint \".\" && prettier --check \"./src/**/*.ts\"", "clean": "rm -Rf node_modules/ dist/", "build": "tsc", - "build-with-tests": "tsc --project tsconfig-with-tests.json && cp 'src/test/echo space.js' dist/test", + "build-with-tests": "tsc && cp 'src/test/echo space.js' dist/test", "generate": "./generate-client.sh", "watch": "tsc --watch", "test": "c8 node --test --test-reporter=spec --import tsx src/*_test.ts", diff --git a/tsconfig-with-tests.json b/tsconfig-with-tests.json index 0542a3e9d5..98928a3edd 100644 --- a/tsconfig-with-tests.json +++ b/tsconfig-with-tests.json @@ -1,9 +1,4 @@ { "extends": "./tsconfig.json", - "exclude": [], - "compilerOptions": { - "paths": { - "node-fetch/externals": ["./node_modules/@types/node-fetch/externals.d.ts"] - } - } + "exclude": [] } diff --git a/tsconfig.json b/tsconfig.json index 18424c2e5c..20caf8fc24 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,10 +16,7 @@ "importHelpers": true, "skipLibCheck": true, "esModuleInterop": true, - "useDefineForClassFields": false, - "paths": { - "node-fetch/externals": ["./node_modules/@types/node-fetch/externals.d.ts"] - } + "useDefineForClassFields": false // enable this in the future // "declarationMap": true }, From 3754a208e86291ad02210c4151a12aee4a473149 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 21 Aug 2025 17:23:05 +0000 Subject: [PATCH 111/111] revert --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 052b8a1178..9903e21cd6 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "lint": "eslint \".\" && prettier --check \"./src/**/*.ts\"", "clean": "rm -Rf node_modules/ dist/", "build": "tsc", - "build-with-tests": "tsc && cp 'src/test/echo space.js' dist/test", + "build-with-tests": "tsc --project tsconfig-with-tests.json && cp 'src/test/echo space.js' dist/test", "generate": "./generate-client.sh", "watch": "tsc --watch", "test": "c8 node --test --test-reporter=spec --import tsx src/*_test.ts",