Skip to content

Commit 85b7319

Browse files
committed
fix: temporary code changes for the SDK
1 parent 663580a commit 85b7319

File tree

9 files changed

+329
-1
lines changed

9 files changed

+329
-1
lines changed

packages/kafka-management-sdk/src/generated/api/default-api.ts

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ import { MetricsInstantQueryList } from '../model';
3737
// @ts-ignore
3838
import { MetricsRangeQueryList } from '../model';
3939
// @ts-ignore
40+
import { SupportedKafkaInstanceTypesList } from '../model';
41+
// @ts-ignore
4042
import { VersionMetadata } from '../model';
4143
/**
4244
* DefaultApi - axios parameter creator
@@ -262,6 +264,58 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
262264

263265

264266

267+
setSearchParams(localVarUrlObj, localVarQueryParameter);
268+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
269+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
270+
271+
return {
272+
url: toPathString(localVarUrlObj),
273+
options: localVarRequestOptions,
274+
};
275+
},
276+
/**
277+
*
278+
* @summary Returns the list of supported Kafka instance types and sizes filtered by cloud provider and region
279+
* @param {string} cloudId ID of the supported cloud provider
280+
* @param {string} cloudRegion Name of the supported cloud provider region
281+
* @param {string} [page] Page index
282+
* @param {string} [size] Number of items in each page
283+
* @param {*} [options] Override http request option.
284+
* @throws {RequiredError}
285+
*/
286+
getInstanceTypesByCloudProviderAndRegion: async (cloudId: string, cloudRegion: string, page?: string, size?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
287+
// verify required parameter 'cloudId' is not null or undefined
288+
assertParamExists('getInstanceTypesByCloudProviderAndRegion', 'cloudId', cloudId)
289+
// verify required parameter 'cloudRegion' is not null or undefined
290+
assertParamExists('getInstanceTypesByCloudProviderAndRegion', 'cloudRegion', cloudRegion)
291+
const localVarPath = `/api/kafkas_mgmt/v1/instance_types/{cloud_id}/{cloud_region}`
292+
.replace(`{${"cloud_id"}}`, encodeURIComponent(String(cloudId)))
293+
.replace(`{${"cloud_region"}}`, encodeURIComponent(String(cloudRegion)));
294+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
295+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
296+
let baseOptions;
297+
if (configuration) {
298+
baseOptions = configuration.baseOptions;
299+
}
300+
301+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
302+
const localVarHeaderParameter = {} as any;
303+
const localVarQueryParameter = {} as any;
304+
305+
// authentication Bearer required
306+
// http bearer authentication required
307+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
308+
309+
if (page !== undefined) {
310+
localVarQueryParameter['page'] = page;
311+
}
312+
313+
if (size !== undefined) {
314+
localVarQueryParameter['size'] = size;
315+
}
316+
317+
318+
265319
setSearchParams(localVarUrlObj, localVarQueryParameter);
266320
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
267321
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -608,6 +662,20 @@ export const DefaultApiFp = function(configuration?: Configuration) {
608662
const localVarAxiosArgs = await localVarAxiosParamCreator.getCloudProviders(page, size, options);
609663
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
610664
},
665+
/**
666+
*
667+
* @summary Returns the list of supported Kafka instance types and sizes filtered by cloud provider and region
668+
* @param {string} cloudId ID of the supported cloud provider
669+
* @param {string} cloudRegion Name of the supported cloud provider region
670+
* @param {string} [page] Page index
671+
* @param {string} [size] Number of items in each page
672+
* @param {*} [options] Override http request option.
673+
* @throws {RequiredError}
674+
*/
675+
async getInstanceTypesByCloudProviderAndRegion(cloudId: string, cloudRegion: string, page?: string, size?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SupportedKafkaInstanceTypesList>> {
676+
const localVarAxiosArgs = await localVarAxiosParamCreator.getInstanceTypesByCloudProviderAndRegion(cloudId, cloudRegion, page, size, options);
677+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
678+
},
611679
/**
612680
*
613681
* @summary Returns a Kafka request by ID
@@ -747,6 +815,19 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
747815
getCloudProviders(page?: string, size?: string, options?: any): AxiosPromise<CloudProviderList> {
748816
return localVarFp.getCloudProviders(page, size, options).then((request) => request(axios, basePath));
749817
},
818+
/**
819+
*
820+
* @summary Returns the list of supported Kafka instance types and sizes filtered by cloud provider and region
821+
* @param {string} cloudId ID of the supported cloud provider
822+
* @param {string} cloudRegion Name of the supported cloud provider region
823+
* @param {string} [page] Page index
824+
* @param {string} [size] Number of items in each page
825+
* @param {*} [options] Override http request option.
826+
* @throws {RequiredError}
827+
*/
828+
getInstanceTypesByCloudProviderAndRegion(cloudId: string, cloudRegion: string, page?: string, size?: string, options?: any): AxiosPromise<SupportedKafkaInstanceTypesList> {
829+
return localVarFp.getInstanceTypesByCloudProviderAndRegion(cloudId, cloudRegion, page, size, options).then((request) => request(axios, basePath));
830+
},
750831
/**
751832
*
752833
* @summary Returns a Kafka request by ID
@@ -879,6 +960,19 @@ export interface DefaultApiInterface {
879960
*/
880961
getCloudProviders(page?: string, size?: string, options?: AxiosRequestConfig): AxiosPromise<CloudProviderList>;
881962

963+
/**
964+
*
965+
* @summary Returns the list of supported Kafka instance types and sizes filtered by cloud provider and region
966+
* @param {string} cloudId ID of the supported cloud provider
967+
* @param {string} cloudRegion Name of the supported cloud provider region
968+
* @param {string} [page] Page index
969+
* @param {string} [size] Number of items in each page
970+
* @param {*} [options] Override http request option.
971+
* @throws {RequiredError}
972+
* @memberof DefaultApiInterface
973+
*/
974+
getInstanceTypesByCloudProviderAndRegion(cloudId: string, cloudRegion: string, page?: string, size?: string, options?: AxiosRequestConfig): AxiosPromise<SupportedKafkaInstanceTypesList>;
975+
882976
/**
883977
*
884978
* @summary Returns a Kafka request by ID
@@ -1021,6 +1115,21 @@ export class DefaultApi extends BaseAPI implements DefaultApiInterface {
10211115
return DefaultApiFp(this.configuration).getCloudProviders(page, size, options).then((request) => request(this.axios, this.basePath));
10221116
}
10231117

1118+
/**
1119+
*
1120+
* @summary Returns the list of supported Kafka instance types and sizes filtered by cloud provider and region
1121+
* @param {string} cloudId ID of the supported cloud provider
1122+
* @param {string} cloudRegion Name of the supported cloud provider region
1123+
* @param {string} [page] Page index
1124+
* @param {string} [size] Number of items in each page
1125+
* @param {*} [options] Override http request option.
1126+
* @throws {RequiredError}
1127+
* @memberof DefaultApi
1128+
*/
1129+
public getInstanceTypesByCloudProviderAndRegion(cloudId: string, cloudRegion: string, page?: string, size?: string, options?: AxiosRequestConfig) {
1130+
return DefaultApiFp(this.configuration).getInstanceTypesByCloudProviderAndRegion(cloudId, cloudRegion, page, size, options).then((request) => request(this.axios, this.basePath));
1131+
}
1132+
10241133
/**
10251134
*
10261135
* @summary Returns a Kafka request by ID

packages/kafka-management-sdk/src/generated/model/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ export * from './service-account-list-all-of';
3030
export * from './service-account-list-item';
3131
export * from './service-account-list-item-all-of';
3232
export * from './service-account-request';
33+
export * from './supported-kafka-instance-type';
34+
export * from './supported-kafka-instance-types-list';
35+
export * from './supported-kafka-instance-types-list-all-of';
36+
export * from './supported-kafka-size';
3337
export * from './values';
3438
export * from './version-metadata';
3539
export * from './version-metadata-all-of';

packages/kafka-management-sdk/src/generated/model/kafka-request-all-of.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,11 @@ export interface KafkaRequestAllOf {
104104
* @memberof KafkaRequestAllOf
105105
*/
106106
'kafka_storage_size'?: string;
107+
/**
108+
*
109+
* @type {string}
110+
* @memberof KafkaRequestAllOf
111+
*/
112+
'size_id'?: string;
107113
}
108114

packages/kafka-management-sdk/src/generated/model/kafka-request-payload.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,11 @@ export interface KafkaRequestPayload {
5050
* @memberof KafkaRequestPayload
5151
*/
5252
'reauthentication_enabled'?: boolean | null;
53+
/**
54+
* kafka plan in a format of <instance_type>.<size_id>
55+
* @type {string}
56+
* @memberof KafkaRequestPayload
57+
*/
58+
'plan'?: string;
5359
}
5460

packages/kafka-management-sdk/src/generated/model/region-capacity-list-item.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,19 @@ export interface RegionCapacityListItem {
2525
* @type {string}
2626
* @memberof RegionCapacityListItem
2727
*/
28-
'instance_type'?: string;
28+
'instance_type': string;
2929
/**
3030
* flag indicating whether the capacity for the instance type in the region is reached
3131
* @type {boolean}
3232
* @memberof RegionCapacityListItem
33+
* @deprecated
3334
*/
3435
'max_capacity_reached': boolean;
36+
/**
37+
* list of available Kafka instance sizes that can be created in this region when taking account current capacity and regional limits
38+
* @type {Array<string>}
39+
* @memberof RegionCapacityListItem
40+
*/
41+
'available_sizes': Array<string>;
3542
}
3643

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* Kafka Service Fleet Manager
5+
* Kafka Service Fleet Manager is a Rest API to manage Kafka instances.
6+
*
7+
* The version of the OpenAPI document: 1.3.0
8+
*
9+
*
10+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11+
* https://openapi-generator.tech
12+
* Do not edit the class manually.
13+
*/
14+
15+
16+
import { SupportedKafkaSize } from './supported-kafka-size';
17+
18+
/**
19+
* Supported Kafka instance type
20+
* @export
21+
* @interface SupportedKafkaInstanceType
22+
*/
23+
export interface SupportedKafkaInstanceType {
24+
/**
25+
* Indicates the type of this object. Will be \'SupportedKafkaInstanceType\' link.
26+
* @type {string}
27+
* @memberof SupportedKafkaInstanceType
28+
*/
29+
'kind'?: string;
30+
/**
31+
* Unique identifier of the Kafka instance type.
32+
* @type {string}
33+
* @memberof SupportedKafkaInstanceType
34+
*/
35+
'id'?: string;
36+
/**
37+
* A list of Kafka instance sizes available for this instance type
38+
* @type {Array<SupportedKafkaSize>}
39+
* @memberof SupportedKafkaInstanceType
40+
*/
41+
'sizes'?: Array<SupportedKafkaSize>;
42+
}
43+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* Kafka Service Fleet Manager
5+
* Kafka Service Fleet Manager is a Rest API to manage Kafka instances.
6+
*
7+
* The version of the OpenAPI document: 1.3.0
8+
*
9+
*
10+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11+
* https://openapi-generator.tech
12+
* Do not edit the class manually.
13+
*/
14+
15+
16+
import { SupportedKafkaInstanceType } from './supported-kafka-instance-type';
17+
18+
/**
19+
*
20+
* @export
21+
* @interface SupportedKafkaInstanceTypesListAllOf
22+
*/
23+
export interface SupportedKafkaInstanceTypesListAllOf {
24+
/**
25+
*
26+
* @type {Array<SupportedKafkaInstanceType>}
27+
* @memberof SupportedKafkaInstanceTypesListAllOf
28+
*/
29+
'items'?: Array<SupportedKafkaInstanceType>;
30+
}
31+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* Kafka Service Fleet Manager
5+
* Kafka Service Fleet Manager is a Rest API to manage Kafka instances.
6+
*
7+
* The version of the OpenAPI document: 1.3.0
8+
*
9+
*
10+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11+
* https://openapi-generator.tech
12+
* Do not edit the class manually.
13+
*/
14+
15+
16+
import { List } from './list';
17+
import { SupportedKafkaInstanceType } from './supported-kafka-instance-type';
18+
import { SupportedKafkaInstanceTypesListAllOf } from './supported-kafka-instance-types-list-all-of';
19+
20+
/**
21+
* @type SupportedKafkaInstanceTypesList
22+
* @export
23+
*/
24+
export type SupportedKafkaInstanceTypesList = List & SupportedKafkaInstanceTypesListAllOf;
25+
26+

0 commit comments

Comments
 (0)