Skip to content

Commit

Permalink
fix(kafka-mgmt/v1): update for kafka-mgmt/v1 SDK (#612)
Browse files Browse the repository at this point in the history
Co-authored-by: app-services-ci <app-services-ci@users.noreply.github.com>
  • Loading branch information
app-services-ci and app-services-ci authored Jan 9, 2023
1 parent afc78fb commit ab0ae68
Show file tree
Hide file tree
Showing 2 changed files with 180 additions and 4 deletions.
88 changes: 84 additions & 4 deletions .openapi/kas-fleet-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -977,8 +977,8 @@ paths:
examples:
400InvalidClusterIdExample:
$ref: '#/components/examples/400InvalidClusterIdExample'
400MInvalidExternalClusterIdExample:
$ref: '#/components/examples/400MInvalidExternalClusterIdExample'
400InvalidExternalClusterIdExample:
$ref: '#/components/examples/400InvalidExternalClusterIdExample'
description: Validation errors occurred
"401":
content:
Expand Down Expand Up @@ -1019,7 +1019,87 @@ paths:
security:
- Bearer: [ ]
tags:
- enterprise-dataplane-clusters
- enterprise-dataplane-clusters
/api/kafkas_mgmt/v1/clusters/{id}:
delete:
tags:
- enterprise-dataplane-clusters
operationId: deleteEnterpriseClusterById
parameters:
- in: query
name: async
description: Perform the action in an asynchronous manner
schema:
type: boolean
required: true
- in: query
name: force
description: |-
When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster.
When skipped and enterprise cluster has any kafkas associated with it, the request will fail.
schema:
type: boolean
required: false
- in: path
name: id
description: ID of the enterprise data plane cluster
schema:
type: string
required: true
responses:
"202":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Enterprise cluster deletion accepted
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
400DeletionExample:
$ref: '#/components/examples/400DeletionExample'
description: Validation errors occurred
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
401Example:
$ref: '#/components/examples/401Example'
description: Auth token is invalid
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
403Example:
$ref: '#/components/examples/403Example'
description: User not authorized to access the service
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
404DeleteExample:
$ref: '#/components/examples/404DeleteExample'
description: No Enterprise cluster with specified ID exists
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
500DeleteExample:
$ref: '#/components/examples/500DeleteExample'
description: Unexpected error occurred
security:
- Bearer: [ ]

components:
schemas:
Expand Down Expand Up @@ -2166,7 +2246,7 @@ components:
code: "KAFKAS-MGMT-45"
reason: "Enterprise cluster ID is invalid"
operation_id: "1lWDGuybIrEnxrAem724gqkkiDv"
400MInvalidExternalClusterIdExample:
400InvalidExternalClusterIdExample:
value:
id: "46"
kind: "Error"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,55 @@ import { EnterpriseOsdClusterPayload } from '../model';
*/
export const EnterpriseDataplaneClustersApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @param {boolean} async Perform the action in an asynchronous manner
* @param {string} id ID of the enterprise data plane cluster
* @param {boolean} [force] When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster. When skipped and enterprise cluster has any kafkas associated with it, the request will fail.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteEnterpriseClusterById: async (async: boolean, id: string, force?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'async' is not null or undefined
assertParamExists('deleteEnterpriseClusterById', 'async', async)
// verify required parameter 'id' is not null or undefined
assertParamExists('deleteEnterpriseClusterById', 'id', id)
const localVarPath = `/api/kafkas_mgmt/v1/clusters/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}

const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication Bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)

if (async !== undefined) {
localVarQueryParameter['async'] = async;
}

if (force !== undefined) {
localVarQueryParameter['force'] = force;
}



setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* List all Enterprise OSD clusters
* @param {*} [options] Override http request option.
Expand Down Expand Up @@ -114,6 +163,18 @@ export const EnterpriseDataplaneClustersApiAxiosParamCreator = function (configu
export const EnterpriseDataplaneClustersApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = EnterpriseDataplaneClustersApiAxiosParamCreator(configuration)
return {
/**
*
* @param {boolean} async Perform the action in an asynchronous manner
* @param {string} id ID of the enterprise data plane cluster
* @param {boolean} [force] When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster. When skipped and enterprise cluster has any kafkas associated with it, the request will fail.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteEnterpriseClusterById(async: boolean, id: string, force?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Error>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteEnterpriseClusterById(async, id, force, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* List all Enterprise OSD clusters
* @param {*} [options] Override http request option.
Expand Down Expand Up @@ -143,6 +204,17 @@ export const EnterpriseDataplaneClustersApiFp = function(configuration?: Configu
export const EnterpriseDataplaneClustersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = EnterpriseDataplaneClustersApiFp(configuration)
return {
/**
*
* @param {boolean} async Perform the action in an asynchronous manner
* @param {string} id ID of the enterprise data plane cluster
* @param {boolean} [force] When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster. When skipped and enterprise cluster has any kafkas associated with it, the request will fail.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteEnterpriseClusterById(async: boolean, id: string, force?: boolean, options?: any): AxiosPromise<Error> {
return localVarFp.deleteEnterpriseClusterById(async, id, force, options).then((request) => request(axios, basePath));
},
/**
* List all Enterprise OSD clusters
* @param {*} [options] Override http request option.
Expand All @@ -169,6 +241,17 @@ export const EnterpriseDataplaneClustersApiFactory = function (configuration?: C
* @interface EnterpriseDataplaneClustersApi
*/
export interface EnterpriseDataplaneClustersApiInterface {
/**
*
* @param {boolean} async Perform the action in an asynchronous manner
* @param {string} id ID of the enterprise data plane cluster
* @param {boolean} [force] When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster. When skipped and enterprise cluster has any kafkas associated with it, the request will fail.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EnterpriseDataplaneClustersApiInterface
*/
deleteEnterpriseClusterById(async: boolean, id: string, force?: boolean, options?: AxiosRequestConfig): AxiosPromise<Error>;

/**
* List all Enterprise OSD clusters
* @param {*} [options] Override http request option.
Expand All @@ -195,6 +278,19 @@ export interface EnterpriseDataplaneClustersApiInterface {
* @extends {BaseAPI}
*/
export class EnterpriseDataplaneClustersApi extends BaseAPI implements EnterpriseDataplaneClustersApiInterface {
/**
*
* @param {boolean} async Perform the action in an asynchronous manner
* @param {string} id ID of the enterprise data plane cluster
* @param {boolean} [force] When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster. When skipped and enterprise cluster has any kafkas associated with it, the request will fail.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EnterpriseDataplaneClustersApi
*/
public deleteEnterpriseClusterById(async: boolean, id: string, force?: boolean, options?: AxiosRequestConfig) {
return EnterpriseDataplaneClustersApiFp(this.configuration).deleteEnterpriseClusterById(async, id, force, options).then((request) => request(this.axios, this.basePath));
}

/**
* List all Enterprise OSD clusters
* @param {*} [options] Override http request option.
Expand Down

0 comments on commit ab0ae68

Please sign in to comment.