diff --git a/ui/.openapi_config.yaml b/ui/.openapi_config.yaml index 53b146b77..a3e91a17a 100644 --- a/ui/.openapi_config.yaml +++ b/ui/.openapi_config.yaml @@ -1,3 +1,4 @@ enumPropertyNaming: original modelPropertyNaming: original -supportsES6: true \ No newline at end of file +supportsES6: true +validateSpec: false diff --git a/ui/package.json b/ui/package.json index 581d6d63a..cec0f9494 100644 --- a/ui/package.json +++ b/ui/package.json @@ -5,7 +5,7 @@ "build": "max build", "dev": "max dev", "format": "prettier --cache --write .", - "gen:api": "openapi-generator-cli generate -i ../internal/dashboard/generated/swagger/swagger.yaml -g typescript-axios -c .openapi_config.yaml -o ./src/api/generated", + "gen:api": "openapi-generator-cli generate -i ./generated/doc.json -g typescript-axios -c .openapi_config.yaml -o ./src/api/generated", "postinstall": "max setup", "lint": "eslint src", "oic:clear": "oic --configPath ./must.cjs --clear", diff --git a/ui/src/api/generated/api.ts b/ui/src/api/generated/api.ts index fa9840301..39dbf7b91 100644 --- a/ui/src/api/generated/api.ts +++ b/ui/src/api/generated/api.ts @@ -389,6 +389,43 @@ export interface AlertAlertFilter { } +/** + * + * @export + * @interface AlertAnalyzeParam + */ +export interface AlertAnalyzeParam { + /** + * + * @type {number} + * @memberof AlertAnalyzeParam + */ + 'endsAt': number; + /** + * + * @type {OceanbaseOBInstance} + * @memberof AlertAnalyzeParam + */ + 'instance': OceanbaseOBInstance; + /** + * + * @type {string} + * @memberof AlertAnalyzeParam + */ + 'resultPath'?: string; + /** + * + * @type {string} + * @memberof AlertAnalyzeParam + */ + 'rule': string; + /** + * + * @type {number} + * @memberof AlertAnalyzeParam + */ + 'startsAt': number; +} /** * * @export @@ -445,16 +482,34 @@ export interface CommonAffinitySpec { 'key'?: string; /** * + * @type {string} + * @memberof CommonAffinitySpec + */ + 'operator'?: string; + /** + * + * @type {boolean} + * @memberof CommonAffinitySpec + */ + 'preferred'?: boolean; + /** + * Enum: NODE, POD, POD_ANTI * @type {CommonAffinityType} * @memberof CommonAffinitySpec */ 'type'?: CommonAffinityType; /** * - * @type {string} + * @type {Array} * @memberof CommonAffinitySpec */ - 'value'?: string; + 'values'?: Array; + /** + * + * @type {number} + * @memberof CommonAffinitySpec + */ + 'weight'?: number; } @@ -537,7 +592,7 @@ export interface CommonStorageSpec { * @type {number} * @memberof CommonStorageSpec */ - 'size'?: number; + 'size': number; /** * * @type {string} @@ -545,6 +600,43 @@ export interface CommonStorageSpec { */ 'storageClass'?: string; } +/** + * + * @export + * @interface CommonTolerationSpec + */ +export interface CommonTolerationSpec { + /** + * + * @type {string} + * @memberof CommonTolerationSpec + */ + 'effect'?: string; + /** + * + * @type {string} + * @memberof CommonTolerationSpec + */ + 'key'?: string; + /** + * + * @type {string} + * @memberof CommonTolerationSpec + */ + 'operator'?: string; + /** + * + * @type {number} + * @memberof CommonTolerationSpec + */ + 'tolerationSeconds'?: number; + /** + * + * @type {string} + * @memberof CommonTolerationSpec + */ + 'value'?: string; +} /** * * @export @@ -645,6 +737,31 @@ export interface CreateOBPROXY200Response { */ 'successful': boolean; } +/** + * + * @export + * @interface CreateOrUpdateInspectionPolicy200Response + */ +export interface CreateOrUpdateInspectionPolicy200Response { + /** + * + * @type {InspectionPolicy} + * @memberof CreateOrUpdateInspectionPolicy200Response + */ + 'data': InspectionPolicy; + /** + * + * @type {string} + * @memberof CreateOrUpdateInspectionPolicy200Response + */ + 'message': string; + /** + * + * @type {boolean} + * @memberof CreateOrUpdateInspectionPolicy200Response + */ + 'successful': boolean; +} /** * * @export @@ -798,25 +915,50 @@ export interface CreateTenant200Response { /** * * @export - * @interface DeleteOBCluster200Response + * @interface DeleteInspectionPolicy200Response */ -export interface DeleteOBCluster200Response { +export interface DeleteInspectionPolicy200Response { /** * * @type {boolean} - * @memberof DeleteOBCluster200Response + * @memberof DeleteInspectionPolicy200Response */ 'data': boolean; /** * * @type {string} - * @memberof DeleteOBCluster200Response + * @memberof DeleteInspectionPolicy200Response + */ + 'message': string; + /** + * + * @type {boolean} + * @memberof DeleteInspectionPolicy200Response + */ + 'successful': boolean; +} +/** + * + * @export + * @interface DiagnoseAlert200Response + */ +export interface DiagnoseAlert200Response { + /** + * + * @type {JobJob} + * @memberof DiagnoseAlert200Response + */ + 'data': JobJob; + /** + * + * @type {string} + * @memberof DiagnoseAlert200Response */ 'message': string; /** * * @type {boolean} - * @memberof DeleteOBCluster200Response + * @memberof DiagnoseAlert200Response */ 'successful': boolean; } @@ -845,6 +987,31 @@ export interface GetBackupPolicy200Response { */ 'successful': boolean; } +/** + * + * @export + * @interface GetInspectionReport200Response + */ +export interface GetInspectionReport200Response { + /** + * + * @type {InspectionReport} + * @memberof GetInspectionReport200Response + */ + 'data': InspectionReport; + /** + * + * @type {string} + * @memberof GetInspectionReport200Response + */ + 'message': string; + /** + * + * @type {boolean} + * @memberof GetInspectionReport200Response + */ + 'successful': boolean; +} /** * * @export @@ -973,5077 +1140,7735 @@ export interface GetStatistics200Response { /** * * @export - * @interface ListAlerts200Response + * @interface InspectionInspectionItem */ -export interface ListAlerts200Response { - /** - * - * @type {Array} - * @memberof ListAlerts200Response - */ - 'data': Array; +export interface InspectionInspectionItem { /** * * @type {string} - * @memberof ListAlerts200Response + * @memberof InspectionInspectionItem */ - 'message': string; + 'name': string; /** * - * @type {boolean} - * @memberof ListAlerts200Response + * @type {Array} + * @memberof InspectionInspectionItem */ - 'successful': boolean; + 'results'?: Array; } /** * * @export - * @interface ListAllAccounts200Response + * @enum {string} */ -export interface ListAllAccounts200Response { - /** - * - * @type {Array} - * @memberof ListAllAccounts200Response - */ - 'data': Array; + +export const InspectionInspectionScenario = { + ScenarioBasic: 'basic', + ScenarioPerformance: 'performance' +} as const; + +export type InspectionInspectionScenario = typeof InspectionInspectionScenario[keyof typeof InspectionInspectionScenario]; + + +/** + * + * @export + * @interface InspectionInspectionScheduleConfig + */ +export interface InspectionInspectionScheduleConfig { /** * * @type {string} - * @memberof ListAllAccounts200Response + * @memberof InspectionInspectionScheduleConfig */ - 'message': string; + 'crontab': string; /** * - * @type {boolean} - * @memberof ListAllAccounts200Response + * @type {InspectionInspectionScenario} + * @memberof InspectionInspectionScheduleConfig */ - 'successful': boolean; + 'scenario': InspectionInspectionScenario; } + + /** * * @export - * @interface ListAllMetrics200Response + * @enum {string} */ -export interface ListAllMetrics200Response { + +export const InspectionInspectionScheduleStatus = { + ScheduleEnabled: 'enabled', + ScheduleDisabled: 'disabled' +} as const; + +export type InspectionInspectionScheduleStatus = typeof InspectionInspectionScheduleStatus[keyof typeof InspectionInspectionScheduleStatus]; + + +/** + * + * @export + * @interface InspectionPolicy + */ +export interface InspectionPolicy { /** * - * @type {Array} - * @memberof ListAllMetrics200Response + * @type {Array} + * @memberof InspectionPolicy */ - 'data': Array; + 'latestReports'?: Array; /** * - * @type {string} - * @memberof ListAllMetrics200Response + * @type {ResponseOBClusterMeta} + * @memberof InspectionPolicy */ - 'message': string; + 'obCluster': ResponseOBClusterMeta; /** * - * @type {boolean} - * @memberof ListAllMetrics200Response + * @type {Array} + * @memberof InspectionPolicy */ - 'successful': boolean; + 'scheduleConfig'?: Array; + /** + * + * @type {InspectionInspectionScheduleStatus} + * @memberof InspectionPolicy + */ + 'status': InspectionInspectionScheduleStatus; } + + /** * * @export - * @interface ListAllPolicies200Response + * @interface InspectionReport */ -export interface ListAllPolicies200Response { +export interface InspectionReport { /** * - * @type {Array} - * @memberof ListAllPolicies200Response + * @type {number} + * @memberof InspectionReport */ - 'data': Array; + 'finishTime'?: number; /** * * @type {string} - * @memberof ListAllPolicies200Response - */ - 'message': string; - /** - * - * @type {boolean} - * @memberof ListAllPolicies200Response + * @memberof InspectionReport */ - 'successful': boolean; -} -/** - * - * @export - * @interface ListAllRoles200Response - */ -export interface ListAllRoles200Response { + 'id': string; /** * - * @type {Array} - * @memberof ListAllRoles200Response + * @type {ResponseOBClusterMeta} + * @memberof InspectionReport */ - 'data': Array; + 'obCluster': ResponseOBClusterMeta; /** * - * @type {string} - * @memberof ListAllRoles200Response + * @type {InspectionResultDetail} + * @memberof InspectionReport */ - 'message': string; + 'resultDetail'?: InspectionResultDetail; /** * - * @type {boolean} - * @memberof ListAllRoles200Response + * @type {InspectionResultStatistics} + * @memberof InspectionReport */ - 'successful': boolean; -} -/** - * - * @export - * @interface ListAllTenants200Response - */ -export interface ListAllTenants200Response { + 'resultStatistics': InspectionResultStatistics; /** * - * @type {Array} - * @memberof ListAllTenants200Response + * @type {InspectionInspectionScenario} + * @memberof InspectionReport */ - 'data': Array; + 'scenario': InspectionInspectionScenario; /** * - * @type {string} - * @memberof ListAllTenants200Response + * @type {number} + * @memberof InspectionReport */ - 'message': string; + 'startTime'?: number; /** * - * @type {boolean} - * @memberof ListAllTenants200Response + * @type {JobJobStatus} + * @memberof InspectionReport */ - 'successful': boolean; + 'status': JobJobStatus; } + + /** * * @export - * @interface ListBackupJobs200Response + * @interface InspectionReportBriefInfo */ -export interface ListBackupJobs200Response { +export interface InspectionReportBriefInfo { /** * - * @type {Array} - * @memberof ListBackupJobs200Response + * @type {number} + * @memberof InspectionReportBriefInfo */ - 'data': Array; + 'finishTime'?: number; /** * * @type {string} - * @memberof ListBackupJobs200Response + * @memberof InspectionReportBriefInfo */ - 'message': string; + 'id': string; /** * - * @type {boolean} - * @memberof ListBackupJobs200Response + * @type {ResponseOBClusterMeta} + * @memberof InspectionReportBriefInfo */ - 'successful': boolean; + 'obCluster': ResponseOBClusterMeta; + /** + * + * @type {InspectionResultStatistics} + * @memberof InspectionReportBriefInfo + */ + 'resultStatistics': InspectionResultStatistics; + /** + * + * @type {InspectionInspectionScenario} + * @memberof InspectionReportBriefInfo + */ + 'scenario': InspectionInspectionScenario; + /** + * + * @type {number} + * @memberof InspectionReportBriefInfo + */ + 'startTime'?: number; + /** + * + * @type {JobJobStatus} + * @memberof InspectionReportBriefInfo + */ + 'status': JobJobStatus; } + + /** * * @export - * @interface ListK8sEvents200Response + * @interface InspectionResultDetail */ -export interface ListK8sEvents200Response { +export interface InspectionResultDetail { /** * - * @type {Array} - * @memberof ListK8sEvents200Response + * @type {Array} + * @memberof InspectionResultDetail */ - 'data': Array; + 'criticalItems'?: Array; /** * - * @type {string} - * @memberof ListK8sEvents200Response + * @type {Array} + * @memberof InspectionResultDetail */ - 'message': string; + 'failedItems'?: Array; /** * - * @type {boolean} - * @memberof ListK8sEvents200Response + * @type {Array} + * @memberof InspectionResultDetail */ - 'successful': boolean; + 'moderateItems'?: Array; + /** + * + * @type {Array} + * @memberof InspectionResultDetail + */ + 'negligibleItems'?: Array; } /** * * @export - * @interface ListK8sNamespaces200Response + * @interface InspectionResultStatistics */ -export interface ListK8sNamespaces200Response { +export interface InspectionResultStatistics { /** * - * @type {Array} - * @memberof ListK8sNamespaces200Response + * @type {number} + * @memberof InspectionResultStatistics */ - 'data': Array; + 'criticalCount'?: number; /** * - * @type {string} - * @memberof ListK8sNamespaces200Response + * @type {number} + * @memberof InspectionResultStatistics */ - 'message': string; + 'failedCount'?: number; /** * - * @type {boolean} - * @memberof ListK8sNamespaces200Response + * @type {number} + * @memberof InspectionResultStatistics */ - 'successful': boolean; + 'moderateCount'?: number; + /** + * + * @type {number} + * @memberof InspectionResultStatistics + */ + 'negligibleCount'?: number; } /** * * @export - * @interface ListK8sNodes200Response + * @interface JobJob */ -export interface ListK8sNodes200Response { +export interface JobJob { /** * - * @type {Array} - * @memberof ListK8sNodes200Response + * @type {number} + * @memberof JobJob */ - 'data': Array; + 'finishTime'?: number; /** * * @type {string} - * @memberof ListK8sNodes200Response + * @memberof JobJob */ - 'message': string; + 'id': string; /** * - * @type {boolean} - * @memberof ListK8sNodes200Response + * @type {string} + * @memberof JobJob */ - 'successful': boolean; + 'name': string; + /** + * + * @type {JobJobResult} + * @memberof JobJob + */ + 'result'?: JobJobResult; + /** + * + * @type {number} + * @memberof JobJob + */ + 'startTime'?: number; + /** + * + * @type {JobJobStatus} + * @memberof JobJob + */ + 'status': JobJobStatus; } + + /** * * @export - * @interface ListK8sStorageClasses200Response + * @interface JobJobResult */ -export interface ListK8sStorageClasses200Response { +export interface JobJobResult { /** * - * @type {Array} - * @memberof ListK8sStorageClasses200Response + * @type {string} + * @memberof JobJobResult */ - 'data': Array; + 'attachmentId'?: string; /** * - * @type {string} - * @memberof ListK8sStorageClasses200Response + * @type {number} + * @memberof JobJobResult */ - 'message': string; + 'exitCode': number; /** * - * @type {boolean} - * @memberof ListK8sStorageClasses200Response + * @type {string} + * @memberof JobJobResult */ - 'successful': boolean; + 'output'?: string; } /** * * @export - * @interface ListOBClusterResources200Response + * @enum {string} */ -export interface ListOBClusterResources200Response { + +export const JobJobStatus = { + JobStatusSuccessful: 'successful', + JobStatusFailed: 'failed', + JobStatusRunning: 'running', + JobStatusPending: 'pending' +} as const; + +export type JobJobStatus = typeof JobJobStatus[keyof typeof JobJobStatus]; + + +/** + * + * @export + * @interface ListAlerts200Response + */ +export interface ListAlerts200Response { /** * - * @type {ResponseOBClusterResources} - * @memberof ListOBClusterResources200Response + * @type {Array} + * @memberof ListAlerts200Response */ - 'data': ResponseOBClusterResources; + 'data': Array; /** * * @type {string} - * @memberof ListOBClusterResources200Response + * @memberof ListAlerts200Response */ 'message': string; /** * * @type {boolean} - * @memberof ListOBClusterResources200Response + * @memberof ListAlerts200Response */ 'successful': boolean; } /** * * @export - * @interface ListOBClusters200Response + * @interface ListAllAccounts200Response */ -export interface ListOBClusters200Response { +export interface ListAllAccounts200Response { /** * - * @type {Array} - * @memberof ListOBClusters200Response + * @type {Array} + * @memberof ListAllAccounts200Response */ - 'data': Array; + 'data': Array; /** * * @type {string} - * @memberof ListOBClusters200Response + * @memberof ListAllAccounts200Response */ 'message': string; /** * * @type {boolean} - * @memberof ListOBClusters200Response + * @memberof ListAllAccounts200Response */ 'successful': boolean; } /** * * @export - * @interface ListOBProxies200Response + * @interface ListAllMetrics200Response */ -export interface ListOBProxies200Response { +export interface ListAllMetrics200Response { /** * - * @type {Array} - * @memberof ListOBProxies200Response + * @type {Array} + * @memberof ListAllMetrics200Response */ - 'data': Array; + 'data': Array; /** * * @type {string} - * @memberof ListOBProxies200Response + * @memberof ListAllMetrics200Response */ 'message': string; /** * * @type {boolean} - * @memberof ListOBProxies200Response + * @memberof ListAllMetrics200Response */ 'successful': boolean; } /** * * @export - * @interface ListOBProxyParameters200Response + * @interface ListAllPolicies200Response */ -export interface ListOBProxyParameters200Response { +export interface ListAllPolicies200Response { /** * - * @type {Array} - * @memberof ListOBProxyParameters200Response + * @type {Array} + * @memberof ListAllPolicies200Response */ - 'data': Array; + 'data': Array; /** * * @type {string} - * @memberof ListOBProxyParameters200Response + * @memberof ListAllPolicies200Response */ 'message': string; /** * * @type {boolean} - * @memberof ListOBProxyParameters200Response + * @memberof ListAllPolicies200Response */ 'successful': boolean; } /** * * @export - * @interface ListReceiverTemplates200Response + * @interface ListAllRoles200Response */ -export interface ListReceiverTemplates200Response { +export interface ListAllRoles200Response { /** * - * @type {Array} - * @memberof ListReceiverTemplates200Response + * @type {Array} + * @memberof ListAllRoles200Response */ - 'data': Array; + 'data': Array; /** * * @type {string} - * @memberof ListReceiverTemplates200Response + * @memberof ListAllRoles200Response */ 'message': string; /** * * @type {boolean} - * @memberof ListReceiverTemplates200Response + * @memberof ListAllRoles200Response */ 'successful': boolean; } /** * * @export - * @interface ListReceivers200Response + * @interface ListAllTenants200Response */ -export interface ListReceivers200Response { +export interface ListAllTenants200Response { /** * - * @type {Array} - * @memberof ListReceivers200Response + * @type {Array} + * @memberof ListAllTenants200Response */ - 'data': Array; + 'data': Array; /** * * @type {string} - * @memberof ListReceivers200Response + * @memberof ListAllTenants200Response */ 'message': string; /** * * @type {boolean} - * @memberof ListReceivers200Response + * @memberof ListAllTenants200Response */ 'successful': boolean; } /** * * @export - * @interface ListRoutes200Response + * @interface ListBackupJobs200Response */ -export interface ListRoutes200Response { +export interface ListBackupJobs200Response { /** * - * @type {Array} - * @memberof ListRoutes200Response + * @type {Array} + * @memberof ListBackupJobs200Response */ - 'data': Array; + 'data': Array; /** * * @type {string} - * @memberof ListRoutes200Response + * @memberof ListBackupJobs200Response */ 'message': string; /** * * @type {boolean} - * @memberof ListRoutes200Response + * @memberof ListBackupJobs200Response */ 'successful': boolean; } /** * * @export - * @interface ListRules200Response + * @interface ListInspectionPolicies200Response */ -export interface ListRules200Response { +export interface ListInspectionPolicies200Response { /** * - * @type {Array} - * @memberof ListRules200Response + * @type {Array} + * @memberof ListInspectionPolicies200Response */ - 'data': Array; + 'data': Array; /** * * @type {string} - * @memberof ListRules200Response + * @memberof ListInspectionPolicies200Response */ 'message': string; /** * * @type {boolean} - * @memberof ListRules200Response + * @memberof ListInspectionPolicies200Response */ 'successful': boolean; } /** * * @export - * @interface ListSilencers200Response + * @interface ListInspectionReports200Response */ -export interface ListSilencers200Response { +export interface ListInspectionReports200Response { /** * - * @type {Array} - * @memberof ListSilencers200Response + * @type {Array} + * @memberof ListInspectionReports200Response */ - 'data': Array; + 'data': Array; /** * * @type {string} - * @memberof ListSilencers200Response + * @memberof ListInspectionReports200Response */ 'message': string; /** * * @type {boolean} - * @memberof ListSilencers200Response + * @memberof ListInspectionReports200Response */ 'successful': boolean; } /** * * @export - * @interface ModelsK8sEvent + * @interface ListK8sEvents200Response */ -export interface ModelsK8sEvent { +export interface ListK8sEvents200Response { /** * - * @type {number} - * @memberof ModelsK8sEvent + * @type {Array} + * @memberof ListK8sEvents200Response */ - 'count'?: number; + 'data': Array; /** * * @type {string} - * @memberof ModelsK8sEvent + * @memberof ListK8sEvents200Response */ - 'firstTimestamp'?: string; + 'message': string; /** * - * @type {string} - * @memberof ModelsK8sEvent + * @type {boolean} + * @memberof ListK8sEvents200Response */ - 'kind'?: string; + 'successful': boolean; +} +/** + * + * @export + * @interface ListK8sNamespaces200Response + */ +export interface ListK8sNamespaces200Response { /** * - * @type {string} - * @memberof ModelsK8sEvent + * @type {Array} + * @memberof ListK8sNamespaces200Response */ - 'lastTimestamp'?: string; + 'data': Array; /** * * @type {string} - * @memberof ModelsK8sEvent + * @memberof ListK8sNamespaces200Response */ - 'message'?: string; + 'message': string; /** * - * @type {string} - * @memberof ModelsK8sEvent + * @type {boolean} + * @memberof ListK8sNamespaces200Response */ - 'name'?: string; - /** - * - * @type {string} - * @memberof ModelsK8sEvent + 'successful': boolean; +} +/** + * + * @export + * @interface ListK8sNodes200Response + */ +export interface ListK8sNodes200Response { + /** + * + * @type {Array} + * @memberof ListK8sNodes200Response */ - 'namespace'?: string; + 'data': Array; /** * * @type {string} - * @memberof ModelsK8sEvent + * @memberof ListK8sNodes200Response */ - 'reason'?: string; + 'message': string; /** * - * @type {string} - * @memberof ModelsK8sEvent + * @type {boolean} + * @memberof ListK8sNodes200Response */ - 'resourceName'?: string; + 'successful': boolean; } /** * * @export - * @interface ModelsOBBackupPolicy + * @interface ListK8sStorageClasses200Response */ -export interface ModelsOBBackupPolicy { +export interface ListK8sStorageClasses200Response { /** * - * @type {string} - * @memberof ModelsOBBackupPolicy + * @type {Array} + * @memberof ListK8sStorageClasses200Response */ - 'archiveDestType'?: string; + 'data': Array; /** * * @type {string} - * @memberof ModelsOBBackupPolicy + * @memberof ListK8sStorageClasses200Response */ - 'archiveSwitchPieceInterval'?: string; + 'message': string; /** * - * @type {string} - * @memberof ModelsOBBackupPolicy + * @type {boolean} + * @memberof ListK8sStorageClasses200Response */ - 'bakDataDestType'?: string; + 'successful': boolean; +} +/** + * + * @export + * @interface ListOBClusterResources200Response + */ +export interface ListOBClusterResources200Response { /** * - * @type {string} - * @memberof ModelsOBBackupPolicy + * @type {ResponseOBClusterResources} + * @memberof ListOBClusterResources200Response */ - 'bakDataFullCrontab'?: string; + 'data': ResponseOBClusterResources; /** * * @type {string} - * @memberof ModelsOBBackupPolicy + * @memberof ListOBClusterResources200Response */ - 'bakDataIncrCrontab'?: string; + 'message': string; /** * * @type {boolean} - * @memberof ModelsOBBackupPolicy + * @memberof ListOBClusterResources200Response */ - 'encryptBakData'?: boolean; + 'successful': boolean; +} +/** + * + * @export + * @interface ListOBClusters200Response + */ +export interface ListOBClusters200Response { /** * - * @type {string} - * @memberof ModelsOBBackupPolicy + * @type {Array} + * @memberof ListOBClusters200Response */ - 'name'?: string; + 'data': Array; /** * * @type {string} - * @memberof ModelsOBBackupPolicy + * @memberof ListOBClusters200Response */ - 'namespace'?: string; + 'message': string; /** * - * @type {string} - * @memberof ModelsOBBackupPolicy + * @type {boolean} + * @memberof ListOBClusters200Response */ - 'runningFlow'?: string; + 'successful': boolean; +} +/** + * + * @export + * @interface ListOBProxies200Response + */ +export interface ListOBProxies200Response { /** * - * @type {string} - * @memberof ModelsOBBackupPolicy + * @type {Array} + * @memberof ListOBProxies200Response */ - 'runningTask'?: string; + 'data': Array; /** * * @type {string} - * @memberof ModelsOBBackupPolicy + * @memberof ListOBProxies200Response */ - 'status'?: string; + 'message': string; /** * - * @type {string} - * @memberof ModelsOBBackupPolicy + * @type {boolean} + * @memberof ListOBProxies200Response */ - 'taskStatus'?: string; + 'successful': boolean; +} +/** + * + * @export + * @interface ListOBProxyParameters200Response + */ +export interface ListOBProxyParameters200Response { /** * - * @type {string} - * @memberof ModelsOBBackupPolicy + * @type {Array} + * @memberof ListOBProxyParameters200Response */ - 'tenantCR'?: string; + 'data': Array; /** * * @type {string} - * @memberof ModelsOBBackupPolicy + * @memberof ListOBProxyParameters200Response */ - 'tenantName'?: string; + 'message': string; /** * - * @type {string} - * @memberof ModelsOBBackupPolicy + * @type {boolean} + * @memberof ListOBProxyParameters200Response */ - 'uid'?: string; + 'successful': boolean; } /** * * @export - * @interface ModelsOBCluster + * @interface ListOBTenantDatabases200Response */ -export interface ModelsOBCluster { +export interface ListOBTenantDatabases200Response { /** * - * @type {number} - * @memberof ModelsOBCluster + * @type {Array} + * @memberof ListOBTenantDatabases200Response */ - 'clusterId'?: number; + 'data': Array; /** * * @type {string} - * @memberof ModelsOBCluster + * @memberof ListOBTenantDatabases200Response */ - 'clusterMode'?: string; + 'message': string; /** * - * @type {string} - * @memberof ModelsOBCluster + * @type {boolean} + * @memberof ListOBTenantDatabases200Response */ - 'clusterName'?: string; + 'successful': boolean; +} +/** + * + * @export + * @interface ListReceiverTemplates200Response + */ +export interface ListReceiverTemplates200Response { /** * - * @type {boolean} - * @memberof ModelsOBCluster + * @type {Array} + * @memberof ListReceiverTemplates200Response */ - 'configuredBackupVolume'?: boolean; + 'data': Array; /** * - * @type {boolean} - * @memberof ModelsOBCluster + * @type {string} + * @memberof ListReceiverTemplates200Response */ - 'configuredMonitor'?: boolean; + 'message': string; /** * - * @type {number} - * @memberof ModelsOBCluster + * @type {boolean} + * @memberof ListReceiverTemplates200Response */ - 'cpu'?: number; + 'successful': boolean; +} +/** + * + * @export + * @interface ListReceivers200Response + */ +export interface ListReceivers200Response { /** * - * @type {ModelsStorageSpec} - * @memberof ModelsOBCluster + * @type {Array} + * @memberof ListReceivers200Response */ - 'dataStorage'?: ModelsStorageSpec; + 'data': Array; /** * * @type {string} - * @memberof ModelsOBCluster + * @memberof ListReceivers200Response */ - 'image'?: string; + 'message': string; /** * * @type {boolean} - * @memberof ModelsOBCluster + * @memberof ListReceivers200Response */ - 'independentPVC'?: boolean; + 'successful': boolean; +} +/** + * + * @export + * @interface ListRoutes200Response + */ +export interface ListRoutes200Response { /** * - * @type {number} - * @memberof ModelsOBCluster + * @type {Array} + * @memberof ListRoutes200Response */ - 'memory'?: number; + 'data': Array; /** * * @type {string} - * @memberof ModelsOBCluster + * @memberof ListRoutes200Response */ - 'name'?: string; + 'message': string; /** * - * @type {string} - * @memberof ModelsOBCluster + * @type {boolean} + * @memberof ListRoutes200Response */ - 'namespace'?: string; + 'successful': boolean; +} +/** + * + * @export + * @interface ListRules200Response + */ +export interface ListRules200Response { /** * - * @type {ModelsStorageSpec} - * @memberof ModelsOBCluster + * @type {Array} + * @memberof ListRules200Response */ - 'redoLogStorage'?: ModelsStorageSpec; + 'data': Array; /** * * @type {string} - * @memberof ModelsOBCluster + * @memberof ListRules200Response */ - 'runningFlow'?: string; + 'message': string; /** * - * @type {string} - * @memberof ModelsOBCluster + * @type {boolean} + * @memberof ListRules200Response */ - 'runningTask'?: string; + 'successful': boolean; +} +/** + * + * @export + * @interface ListSilencers200Response + */ +export interface ListSilencers200Response { /** * - * @type {boolean} - * @memberof ModelsOBCluster + * @type {Array} + * @memberof ListSilencers200Response */ - 'singlePVC'?: boolean; + 'data': Array; /** * * @type {string} - * @memberof ModelsOBCluster + * @memberof ListSilencers200Response */ - 'status'?: string; + 'message': string; /** * - * @type {ModelsStorageSpec} - * @memberof ModelsOBCluster + * @type {boolean} + * @memberof ListSilencers200Response */ - 'sysLogStorage'?: ModelsStorageSpec; + 'successful': boolean; +} +/** + * + * @export + * @interface ListSqlMetrics200Response + */ +export interface ListSqlMetrics200Response { /** * - * @type {string} - * @memberof ModelsOBCluster + * @type {Array} + * @memberof ListSqlMetrics200Response */ - 'taskStatus'?: string; + 'data': Array; /** * * @type {string} - * @memberof ModelsOBCluster + * @memberof ListSqlMetrics200Response */ - 'uid'?: string; + 'message': string; /** * - * @type {Array} - * @memberof ModelsOBCluster + * @type {boolean} + * @memberof ListSqlMetrics200Response */ - 'zones'?: Array; + 'successful': boolean; } /** * * @export - * @interface ModelsOBServer + * @interface ListSuspiciousSqls200Response */ -export interface ModelsOBServer { - /** - * - * @type {string} - * @memberof ModelsOBServer - */ - 'clusterCR'?: string; +export interface ListSuspiciousSqls200Response { /** * - * @type {number} - * @memberof ModelsOBServer + * @type {Array} + * @memberof ListSuspiciousSqls200Response */ - 'clusterId'?: number; + 'data': Array; /** * * @type {string} - * @memberof ModelsOBServer + * @memberof ListSuspiciousSqls200Response */ - 'clusterName'?: string; + 'message': string; /** * - * @type {string} - * @memberof ModelsOBServer + * @type {boolean} + * @memberof ListSuspiciousSqls200Response */ - 'cni'?: string; + 'successful': boolean; +} +/** + * + * @export + * @interface ModelsK8sEvent + */ +export interface ModelsK8sEvent { /** * - * @type {string} - * @memberof ModelsOBServer + * @type {number} + * @memberof ModelsK8sEvent */ - 'image'?: string; + 'count'?: number; /** * * @type {string} - * @memberof ModelsOBServer + * @memberof ModelsK8sEvent */ - 'name'?: string; + 'firstTimestamp'?: string; /** * * @type {string} - * @memberof ModelsOBServer + * @memberof ModelsK8sEvent */ - 'namespace'?: string; + 'kind'?: string; /** * * @type {string} - * @memberof ModelsOBServer + * @memberof ModelsK8sEvent */ - 'podIPHash'?: string; + 'lastTimestamp'?: string; /** * * @type {string} - * @memberof ModelsOBServer + * @memberof ModelsK8sEvent */ - 'podPhase'?: string; + 'message'?: string; /** * * @type {string} - * @memberof ModelsOBServer + * @memberof ModelsK8sEvent */ - 'runningFlow'?: string; + 'name'?: string; /** * * @type {string} - * @memberof ModelsOBServer + * @memberof ModelsK8sEvent */ - 'runningTask'?: string; + 'namespace'?: string; /** * * @type {string} - * @memberof ModelsOBServer + * @memberof ModelsK8sEvent */ - 'serviceIPHash'?: string; + 'reason'?: string; /** * * @type {string} - * @memberof ModelsOBServer + * @memberof ModelsK8sEvent */ - 'status'?: string; + 'resourceName'?: string; +} +/** + * + * @export + * @interface ModelsOBBackupPolicy + */ +export interface ModelsOBBackupPolicy { /** * * @type {string} - * @memberof ModelsOBServer + * @memberof ModelsOBBackupPolicy */ - 'taskStatus'?: string; + 'archiveDestType'?: string; /** * * @type {string} - * @memberof ModelsOBServer + * @memberof ModelsOBBackupPolicy */ - 'uid'?: string; + 'archiveSwitchPieceInterval'?: string; /** * * @type {string} - * @memberof ModelsOBServer + * @memberof ModelsOBBackupPolicy */ - 'zoneName'?: string; -} -/** - * - * @export - * @interface ModelsOBTenant - */ -export interface ModelsOBTenant { + 'bakDataDestType'?: string; /** * * @type {string} - * @memberof ModelsOBTenant + * @memberof ModelsOBBackupPolicy */ - 'archiveDestType'?: string; + 'bakDataFullCrontab'?: string; /** * * @type {string} - * @memberof ModelsOBTenant + * @memberof ModelsOBBackupPolicy */ - 'bakDataDestType'?: string; + 'bakDataIncrCrontab'?: string; /** * - * @type {string} - * @memberof ModelsOBTenant + * @type {boolean} + * @memberof ModelsOBBackupPolicy */ - 'clusterName'?: string; + 'encryptBakData'?: boolean; /** * * @type {string} - * @memberof ModelsOBTenant + * @memberof ModelsOBBackupPolicy */ 'name'?: string; /** * * @type {string} - * @memberof ModelsOBTenant + * @memberof ModelsOBBackupPolicy */ 'namespace'?: string; /** * * @type {string} - * @memberof ModelsOBTenant - */ - 'primaryTenant'?: string; - /** - * - * @type {string} - * @memberof ModelsOBTenant + * @memberof ModelsOBBackupPolicy */ 'runningFlow'?: string; /** * * @type {string} - * @memberof ModelsOBTenant + * @memberof ModelsOBBackupPolicy */ 'runningTask'?: string; /** * * @type {string} - * @memberof ModelsOBTenant + * @memberof ModelsOBBackupPolicy */ 'status'?: string; /** * * @type {string} - * @memberof ModelsOBTenant + * @memberof ModelsOBBackupPolicy */ 'taskStatus'?: string; /** * * @type {string} - * @memberof ModelsOBTenant + * @memberof ModelsOBBackupPolicy */ - 'tenantName'?: string; + 'tenantCR'?: string; /** * * @type {string} - * @memberof ModelsOBTenant - */ - 'tenantRole'?: string; - /** - * - * @type {Array} - * @memberof ModelsOBTenant + * @memberof ModelsOBBackupPolicy */ - 'topology'?: Array; + 'tenantName'?: string; /** * * @type {string} - * @memberof ModelsOBTenant + * @memberof ModelsOBBackupPolicy */ 'uid'?: string; - /** - * - * @type {number} - * @memberof ModelsOBTenant - */ - 'unitNumber'?: number; } /** * * @export - * @interface ModelsOBTenantResourcePool + * @interface ModelsOBCluster */ -export interface ModelsOBTenantResourcePool { +export interface ModelsOBCluster { /** * * @type {number} - * @memberof ModelsOBTenantResourcePool + * @memberof ModelsOBCluster */ - 'IOPSWeight'?: number; + 'clusterId'?: number; /** * - * @type {number} - * @memberof ModelsOBTenantResourcePool + * @type {string} + * @memberof ModelsOBCluster */ - 'logDiskSize'?: number; + 'clusterMode'?: string; /** * - * @type {number} - * @memberof ModelsOBTenantResourcePool + * @type {string} + * @memberof ModelsOBCluster */ - 'maxCPU'?: number; + 'clusterName'?: string; /** * - * @type {number} - * @memberof ModelsOBTenantResourcePool + * @type {boolean} + * @memberof ModelsOBCluster */ - 'maxIOPS'?: number; + 'configuredBackupVolume'?: boolean; /** * - * @type {number} - * @memberof ModelsOBTenantResourcePool + * @type {boolean} + * @memberof ModelsOBCluster */ - 'memorySize'?: number; + 'configuredMonitor'?: boolean; /** * * @type {number} - * @memberof ModelsOBTenantResourcePool + * @memberof ModelsOBCluster */ - 'minCPU'?: number; + 'cpu'?: number; /** * - * @type {number} - * @memberof ModelsOBTenantResourcePool + * @type {ModelsStorageSpec} + * @memberof ModelsOBCluster */ - 'minIOPS'?: number; + 'dataStorage'?: ModelsStorageSpec; /** * - * @type {number} - * @memberof ModelsOBTenantResourcePool + * @type {string} + * @memberof ModelsOBCluster */ - 'priority'?: number; + 'image'?: string; /** * - * @type {string} - * @memberof ModelsOBTenantResourcePool + * @type {boolean} + * @memberof ModelsOBCluster */ - 'type'?: string; + 'independentPVC'?: boolean; /** * * @type {number} - * @memberof ModelsOBTenantResourcePool + * @memberof ModelsOBCluster */ - 'unitNumber'?: number; + 'memory'?: number; /** * * @type {string} - * @memberof ModelsOBTenantResourcePool + * @memberof ModelsOBCluster */ - 'zone'?: string; -} -/** - * - * @export - * @interface ModelsOBZone - */ -export interface ModelsOBZone { + 'name'?: string; /** * * @type {string} - * @memberof ModelsOBZone + * @memberof ModelsOBCluster */ - 'clusterCR'?: string; + 'namespace'?: string; /** * - * @type {number} - * @memberof ModelsOBZone + * @type {ModelsStorageSpec} + * @memberof ModelsOBCluster */ - 'clusterId'?: number; + 'redoLogStorage'?: ModelsStorageSpec; /** * * @type {string} - * @memberof ModelsOBZone + * @memberof ModelsOBCluster */ - 'clusterName'?: string; + 'runningFlow'?: string; /** * * @type {string} - * @memberof ModelsOBZone + * @memberof ModelsOBCluster */ - 'image'?: string; + 'runningTask'?: string; /** * - * @type {string} - * @memberof ModelsOBZone - */ - 'name'?: string; - /** - * - * @type {string} - * @memberof ModelsOBZone - */ - 'namespace'?: string; - /** - * - * @type {string} - * @memberof ModelsOBZone + * @type {boolean} + * @memberof ModelsOBCluster */ - 'runningFlow'?: string; + 'singlePVC'?: boolean; /** * * @type {string} - * @memberof ModelsOBZone + * @memberof ModelsOBCluster */ - 'runningTask'?: string; + 'status'?: string; /** * - * @type {string} - * @memberof ModelsOBZone + * @type {ModelsStorageSpec} + * @memberof ModelsOBCluster */ - 'status'?: string; + 'sysLogStorage'?: ModelsStorageSpec; /** * * @type {string} - * @memberof ModelsOBZone + * @memberof ModelsOBCluster */ 'taskStatus'?: string; /** * * @type {string} - * @memberof ModelsOBZone + * @memberof ModelsOBCluster */ 'uid'?: string; -} -/** - * - * @export - * @interface ModelsOBZoneStatus - */ -export interface ModelsOBZoneStatus { - /** - * - * @type {number} - * @memberof ModelsOBZoneStatus - */ - 'replica'?: number; - /** - * - * @type {string} - * @memberof ModelsOBZoneStatus - */ - 'status'?: string; /** * - * @type {string} - * @memberof ModelsOBZoneStatus + * @type {Array} + * @memberof ModelsOBCluster */ - 'zoneName'?: string; + 'zones'?: Array; } /** * * @export - * @interface ModelsStorageSpec + * @interface ModelsOBServer */ -export interface ModelsStorageSpec { +export interface ModelsOBServer { /** * * @type {string} - * @memberof ModelsStorageSpec + * @memberof ModelsOBServer */ - 'storageClass'?: string; + 'clusterCR'?: string; /** * * @type {number} - * @memberof ModelsStorageSpec + * @memberof ModelsOBServer */ - 'storageSize'?: number; -} -/** - * - * @export - * @interface ObproxyConfigItem - */ -export interface ObproxyConfigItem { + 'clusterId'?: number; /** * * @type {string} - * @memberof ObproxyConfigItem + * @memberof ModelsOBServer */ - 'info'?: string; + 'clusterName'?: string; /** * * @type {string} - * @memberof ObproxyConfigItem - */ - 'name'?: string; - /** - * - * @type {boolean} - * @memberof ObproxyConfigItem + * @memberof ModelsOBServer */ - 'needReboot'?: boolean; + 'cni'?: string; /** * * @type {string} - * @memberof ObproxyConfigItem + * @memberof ModelsOBServer */ - 'value'?: string; + 'image'?: string; /** * * @type {string} - * @memberof ObproxyConfigItem + * @memberof ModelsOBServer */ - 'visibleLevel'?: string; -} -/** - * - * @export - * @interface ObproxyCreateOBProxyParam - */ -export interface ObproxyCreateOBProxyParam { + 'name'?: string; /** * * @type {string} - * @memberof ObproxyCreateOBProxyParam + * @memberof ModelsOBServer */ - 'image': string; + 'namespace'?: string; /** * * @type {string} - * @memberof ObproxyCreateOBProxyParam + * @memberof ModelsOBServer */ - 'name': string; + 'podIPHash'?: string; /** * * @type {string} - * @memberof ObproxyCreateOBProxyParam + * @memberof ModelsOBServer */ - 'namespace': string; + 'podPhase'?: string; /** * - * @type {ObproxyK8sObject} - * @memberof ObproxyCreateOBProxyParam + * @type {string} + * @memberof ModelsOBServer */ - 'obCluster': ObproxyK8sObject; + 'runningFlow'?: string; /** * - * @type {Array} - * @memberof ObproxyCreateOBProxyParam + * @type {string} + * @memberof ModelsOBServer */ - 'parameters'?: Array; + 'runningTask'?: string; /** * * @type {string} - * @memberof ObproxyCreateOBProxyParam + * @memberof ModelsOBServer */ - 'proxyClusterName': string; + 'serviceIPHash'?: string; /** - * Password should be encrypted + * * @type {string} - * @memberof ObproxyCreateOBProxyParam + * @memberof ModelsOBServer */ - 'proxySysPassword': string; + 'status'?: string; /** * - * @type {number} - * @memberof ObproxyCreateOBProxyParam + * @type {string} + * @memberof ModelsOBServer */ - 'replicas': number; + 'taskStatus'?: string; /** * - * @type {CommonResourceSpec} - * @memberof ObproxyCreateOBProxyParam + * @type {string} + * @memberof ModelsOBServer */ - 'resource': CommonResourceSpec; + 'uid'?: string; /** * * @type {string} - * @memberof ObproxyCreateOBProxyParam + * @memberof ModelsOBServer */ - 'serviceType': ObproxyCreateOBProxyParamServiceTypeEnum; + 'zoneName'?: string; } - -export const ObproxyCreateOBProxyParamServiceTypeEnum = { - ClusterIP: 'ClusterIP', - NodePort: 'NodePort', - LoadBalancer: 'LoadBalancer', - ExternalName: 'ExternalName' -} as const; - -export type ObproxyCreateOBProxyParamServiceTypeEnum = typeof ObproxyCreateOBProxyParamServiceTypeEnum[keyof typeof ObproxyCreateOBProxyParamServiceTypeEnum]; - /** * * @export - * @interface ObproxyK8sObject + * @interface ModelsOBTenant */ -export interface ObproxyK8sObject { +export interface ModelsOBTenant { /** * * @type {string} - * @memberof ObproxyK8sObject + * @memberof ModelsOBTenant */ - 'name': string; + 'archiveDestType'?: string; /** * * @type {string} - * @memberof ObproxyK8sObject - */ - 'namespace': string; -} -/** - * - * @export - * @interface ObproxyOBProxy - */ -export interface ObproxyOBProxy { - /** - * - * @type {number} - * @memberof ObproxyOBProxy + * @memberof ModelsOBTenant */ - 'creationTime': number; + 'bakDataDestType'?: string; /** * * @type {string} - * @memberof ObproxyOBProxy + * @memberof ModelsOBTenant */ - 'image': string; + 'clusterName'?: string; /** * * @type {string} - * @memberof ObproxyOBProxy + * @memberof ModelsOBTenant */ - 'name': string; + 'name'?: string; /** * * @type {string} - * @memberof ObproxyOBProxy + * @memberof ModelsOBTenant */ - 'namespace': string; + 'namespace'?: string; /** * - * @type {ObproxyK8sObject} - * @memberof ObproxyOBProxy + * @type {string} + * @memberof ModelsOBTenant */ - 'obCluster': ObproxyK8sObject; + 'primaryTenant'?: string; /** * - * @type {Array} - * @memberof ObproxyOBProxy + * @type {string} + * @memberof ModelsOBTenant */ - 'parameters': Array; + 'runningFlow'?: string; /** * - * @type {Array} - * @memberof ObproxyOBProxy + * @type {string} + * @memberof ModelsOBTenant */ - 'pods': Array; + 'runningTask'?: string; /** * * @type {string} - * @memberof ObproxyOBProxy + * @memberof ModelsOBTenant */ - 'proxyClusterName': string; + 'status'?: string; /** * * @type {string} - * @memberof ObproxyOBProxy + * @memberof ModelsOBTenant */ - 'proxySysSecret': string; + 'taskStatus'?: string; /** * - * @type {number} - * @memberof ObproxyOBProxy + * @type {string} + * @memberof ModelsOBTenant */ - 'replicas': number; + 'tenantName'?: string; /** * - * @type {CommonResourceSpec} - * @memberof ObproxyOBProxy + * @type {string} + * @memberof ModelsOBTenant */ - 'resource': CommonResourceSpec; + 'tenantRole'?: string; /** * - * @type {ResponseK8sService} - * @memberof ObproxyOBProxy + * @type {Array} + * @memberof ModelsOBTenant */ - 'service': ResponseK8sService; + 'topology'?: Array; /** * * @type {string} - * @memberof ObproxyOBProxy + * @memberof ModelsOBTenant */ - 'serviceIp': string; + 'uid'?: string; /** * - * @type {string} - * @memberof ObproxyOBProxy + * @type {number} + * @memberof ModelsOBTenant */ - 'serviceType': string; - /** - * - * @type {string} - * @memberof ObproxyOBProxy - */ - 'status': ObproxyOBProxyStatusEnum; + 'unitNumber'?: number; } - -export const ObproxyOBProxyStatusEnum = { - Running: 'Running', - Pending: 'Pending' -} as const; - -export type ObproxyOBProxyStatusEnum = typeof ObproxyOBProxyStatusEnum[keyof typeof ObproxyOBProxyStatusEnum]; - /** * * @export - * @interface ObproxyOBProxyOverview + * @interface ModelsOBTenantResourcePool */ -export interface ObproxyOBProxyOverview { +export interface ModelsOBTenantResourcePool { /** * * @type {number} - * @memberof ObproxyOBProxyOverview + * @memberof ModelsOBTenantResourcePool */ - 'creationTime': number; + 'IOPSWeight'?: number; /** * - * @type {string} - * @memberof ObproxyOBProxyOverview + * @type {number} + * @memberof ModelsOBTenantResourcePool */ - 'image': string; + 'logDiskSize'?: number; /** * - * @type {string} - * @memberof ObproxyOBProxyOverview + * @type {number} + * @memberof ModelsOBTenantResourcePool */ - 'name': string; + 'maxCPU'?: number; /** * - * @type {string} - * @memberof ObproxyOBProxyOverview + * @type {number} + * @memberof ModelsOBTenantResourcePool */ - 'namespace': string; + 'maxIOPS'?: number; /** * - * @type {ObproxyK8sObject} - * @memberof ObproxyOBProxyOverview + * @type {number} + * @memberof ModelsOBTenantResourcePool */ - 'obCluster': ObproxyK8sObject; + 'memorySize'?: number; /** * - * @type {string} - * @memberof ObproxyOBProxyOverview + * @type {number} + * @memberof ModelsOBTenantResourcePool */ - 'proxyClusterName': string; + 'minCPU'?: number; /** * * @type {number} - * @memberof ObproxyOBProxyOverview + * @memberof ModelsOBTenantResourcePool */ - 'replicas': number; + 'minIOPS'?: number; /** * - * @type {string} - * @memberof ObproxyOBProxyOverview + * @type {number} + * @memberof ModelsOBTenantResourcePool */ - 'serviceIp': string; + 'priority'?: number; /** * * @type {string} - * @memberof ObproxyOBProxyOverview + * @memberof ModelsOBTenantResourcePool */ - 'serviceType': string; + 'type'?: string; + /** + * + * @type {number} + * @memberof ModelsOBTenantResourcePool + */ + 'unitNumber'?: number; /** * * @type {string} - * @memberof ObproxyOBProxyOverview + * @memberof ModelsOBTenantResourcePool */ - 'status': ObproxyOBProxyOverviewStatusEnum; + 'zone'?: string; } - -export const ObproxyOBProxyOverviewStatusEnum = { - Running: 'Running', - Pending: 'Pending' -} as const; - -export type ObproxyOBProxyOverviewStatusEnum = typeof ObproxyOBProxyOverviewStatusEnum[keyof typeof ObproxyOBProxyOverviewStatusEnum]; - /** * * @export - * @interface ObproxyPatchOBProxyParam + * @interface ModelsOBZone */ -export interface ObproxyPatchOBProxyParam { +export interface ModelsOBZone { /** * * @type {string} - * @memberof ObproxyPatchOBProxyParam - */ - 'image'?: string; - /** - * - * @type {Array} - * @memberof ObproxyPatchOBProxyParam + * @memberof ModelsOBZone */ - 'parameters'?: Array; + 'clusterCR'?: string; /** * * @type {number} - * @memberof ObproxyPatchOBProxyParam + * @memberof ModelsOBZone */ - 'replicas'?: number; + 'clusterId'?: number; /** * - * @type {CommonResourceSpec} - * @memberof ObproxyPatchOBProxyParam + * @type {string} + * @memberof ModelsOBZone */ - 'resource'?: CommonResourceSpec; + 'clusterName'?: string; /** * * @type {string} - * @memberof ObproxyPatchOBProxyParam + * @memberof ModelsOBZone */ - 'serviceType'?: ObproxyPatchOBProxyParamServiceTypeEnum; -} - -export const ObproxyPatchOBProxyParamServiceTypeEnum = { - ClusterIP: 'ClusterIP', - NodePort: 'NodePort', - LoadBalancer: 'LoadBalancer', - ExternalName: 'ExternalName' -} as const; - -export type ObproxyPatchOBProxyParamServiceTypeEnum = typeof ObproxyPatchOBProxyParamServiceTypeEnum[keyof typeof ObproxyPatchOBProxyParamServiceTypeEnum]; - -/** - * - * @export - * @interface OceanbaseOBInstance - */ -export interface OceanbaseOBInstance { + 'image'?: string; /** * * @type {string} - * @memberof OceanbaseOBInstance + * @memberof ModelsOBZone */ - 'obcluster'?: string; + 'name'?: string; /** * * @type {string} - * @memberof OceanbaseOBInstance + * @memberof ModelsOBZone */ - 'observer'?: string; + 'namespace'?: string; /** * * @type {string} - * @memberof OceanbaseOBInstance + * @memberof ModelsOBZone */ - 'obtenant'?: string; + 'runningFlow'?: string; /** - * obzone may exist in labels + * * @type {string} - * @memberof OceanbaseOBInstance + * @memberof ModelsOBZone */ - 'obzone'?: string; + 'runningTask'?: string; /** * - * @type {OceanbaseOBInstanceType} - * @memberof OceanbaseOBInstance + * @type {string} + * @memberof ModelsOBZone */ - 'type': OceanbaseOBInstanceType; -} - - -/** - * - * @export - * @enum {string} - */ - -export const OceanbaseOBInstanceType = { - TypeUnknown: 'unknown', - TypeOBCluster: 'obcluster', - TypeOBZone: 'obzone', - TypeOBTenant: 'obtenant', - TypeOBServer: 'observer' -} as const; - -export type OceanbaseOBInstanceType = typeof OceanbaseOBInstanceType[keyof typeof OceanbaseOBInstanceType]; - - -/** - * - * @export - * @interface ParamChangeTenantRole - */ -export interface ParamChangeTenantRole { + 'status'?: string; /** * - * @type {boolean} - * @memberof ParamChangeTenantRole + * @type {string} + * @memberof ModelsOBZone */ - 'failover'?: boolean; + 'taskStatus'?: string; /** * - * @type {boolean} - * @memberof ParamChangeTenantRole + * @type {string} + * @memberof ModelsOBZone */ - 'switchover'?: boolean; + 'uid'?: string; } /** * * @export - * @interface ParamChangeUserPassword + * @interface ModelsOBZoneStatus */ -export interface ParamChangeUserPassword { +export interface ModelsOBZoneStatus { + /** + * + * @type {number} + * @memberof ModelsOBZoneStatus + */ + 'replica'?: number; /** * * @type {string} - * @memberof ParamChangeUserPassword + * @memberof ModelsOBZoneStatus */ - 'password': string; + 'status'?: string; /** - * Description: The user name of the database account, only root is supported now. + * * @type {string} - * @memberof ParamChangeUserPassword + * @memberof ModelsOBZoneStatus */ - 'user': string; + 'zoneName'?: string; } /** * * @export - * @interface ParamConfigurableInfo + * @interface ModelsStorageSpec */ -export interface ParamConfigurableInfo { +export interface ModelsStorageSpec { /** * * @type {string} - * @memberof ParamConfigurableInfo + * @memberof ModelsStorageSpec */ - 'odcURL'?: string; + 'storageClass'?: string; + /** + * + * @type {number} + * @memberof ModelsStorageSpec + */ + 'storageSize'?: number; } /** * * @export - * @interface ParamCreateBackupPolicy + * @interface ObproxyConfigItem */ -export interface ParamCreateBackupPolicy { +export interface ObproxyConfigItem { /** * * @type {string} - * @memberof ParamCreateBackupPolicy + * @memberof ObproxyConfigItem */ - 'archivePath': string; + 'info'?: string; /** * * @type {string} - * @memberof ParamCreateBackupPolicy + * @memberof ObproxyConfigItem */ - 'bakDataPath': string; + 'name'?: string; /** * - * @type {string} - * @memberof ParamCreateBackupPolicy - */ - 'bakEncryptionPassword'?: string; - /** - * Enum: NFS, OSS - * @type {string} - * @memberof ParamCreateBackupPolicy + * @type {boolean} + * @memberof ObproxyConfigItem */ - 'destType': string; + 'needReboot'?: boolean; /** * - * @type {number} - * @memberof ParamCreateBackupPolicy + * @type {string} + * @memberof ObproxyConfigItem */ - 'jobKeepDays'?: number; + 'value'?: string; /** * * @type {string} - * @memberof ParamCreateBackupPolicy + * @memberof ObproxyConfigItem */ - 'ossAccessId'?: string; + 'visibleLevel'?: string; +} +/** + * + * @export + * @interface ObproxyCreateOBProxyParam + */ +export interface ObproxyCreateOBProxyParam { /** * * @type {string} - * @memberof ParamCreateBackupPolicy + * @memberof ObproxyCreateOBProxyParam */ - 'ossAccessKey'?: string; + 'image': string; /** * - * @type {number} - * @memberof ParamCreateBackupPolicy + * @type {string} + * @memberof ObproxyCreateOBProxyParam */ - 'pieceIntervalDays'?: number; + 'name': string; /** * - * @type {number} - * @memberof ParamCreateBackupPolicy + * @type {string} + * @memberof ObproxyCreateOBProxyParam */ - 'recoveryDays'?: number; + 'namespace': string; /** * - * @type {Array} - * @memberof ParamCreateBackupPolicy + * @type {ObproxyK8sObject} + * @memberof ObproxyCreateOBProxyParam */ - 'scheduleDates'?: Array; + 'obCluster': ObproxyK8sObject; /** - * Description: HH:MM Example: 04:00 + * + * @type {Array} + * @memberof ObproxyCreateOBProxyParam + */ + 'parameters'?: Array; + /** + * * @type {string} - * @memberof ParamCreateBackupPolicy + * @memberof ObproxyCreateOBProxyParam */ - 'scheduleTime'?: string; + 'proxyClusterName': string; /** - * Enum: Weekly, Monthly + * Password should be encrypted * @type {string} - * @memberof ParamCreateBackupPolicy + * @memberof ObproxyCreateOBProxyParam */ - 'scheduleType'?: string; + 'proxySysPassword': string; + /** + * + * @type {number} + * @memberof ObproxyCreateOBProxyParam + */ + 'replicas': number; + /** + * + * @type {CommonResourceSpec} + * @memberof ObproxyCreateOBProxyParam + */ + 'resource': CommonResourceSpec; + /** + * + * @type {string} + * @memberof ObproxyCreateOBProxyParam + */ + 'serviceType': ObproxyCreateOBProxyParamServiceTypeEnum; } + +export const ObproxyCreateOBProxyParamServiceTypeEnum = { + ClusterIP: 'ClusterIP', + NodePort: 'NodePort', + LoadBalancer: 'LoadBalancer', + ExternalName: 'ExternalName' +} as const; + +export type ObproxyCreateOBProxyParamServiceTypeEnum = typeof ObproxyCreateOBProxyParamServiceTypeEnum[keyof typeof ObproxyCreateOBProxyParamServiceTypeEnum]; + /** * * @export - * @interface ParamCreateNamespaceParam + * @interface ObproxyK8sObject */ -export interface ParamCreateNamespaceParam { +export interface ObproxyK8sObject { /** * * @type {string} - * @memberof ParamCreateNamespaceParam + * @memberof ObproxyK8sObject */ - 'namespace'?: string; + 'name': string; + /** + * + * @type {string} + * @memberof ObproxyK8sObject + */ + 'namespace': string; } /** * * @export - * @interface ParamCreateOBClusterParam + * @interface ObproxyOBProxy */ -export interface ParamCreateOBClusterParam { +export interface ObproxyOBProxy { /** * - * @type {ParamNFSVolumeSpec} - * @memberof ParamCreateOBClusterParam + * @type {number} + * @memberof ObproxyOBProxy */ - 'backupVolume'?: ParamNFSVolumeSpec; + 'creationTime': number; /** * - * @type {number} - * @memberof ParamCreateOBClusterParam + * @type {string} + * @memberof ObproxyOBProxy */ - 'clusterId'?: number; + 'image': string; /** * * @type {string} - * @memberof ParamCreateOBClusterParam + * @memberof ObproxyOBProxy */ - 'clusterName'?: string; + 'name': string; /** * - * @type {CommonClusterMode} - * @memberof ParamCreateOBClusterParam + * @type {string} + * @memberof ObproxyOBProxy */ - 'mode'?: CommonClusterMode; + 'namespace': string; /** * - * @type {ParamMonitorSpec} - * @memberof ParamCreateOBClusterParam + * @type {ObproxyK8sObject} + * @memberof ObproxyOBProxy */ - 'monitor'?: ParamMonitorSpec; + 'obCluster': ObproxyK8sObject; + /** + * + * @type {Array} + * @memberof ObproxyOBProxy + */ + 'parameters': Array; + /** + * + * @type {Array} + * @memberof ObproxyOBProxy + */ + 'pods': Array; /** * * @type {string} - * @memberof ParamCreateOBClusterParam + * @memberof ObproxyOBProxy */ - 'name'?: string; + 'proxyClusterName': string; /** * * @type {string} - * @memberof ParamCreateOBClusterParam + * @memberof ObproxyOBProxy */ - 'namespace'?: string; + 'proxySysSecret': string; /** * - * @type {ParamOBServerSpec} - * @memberof ParamCreateOBClusterParam + * @type {number} + * @memberof ObproxyOBProxy */ - 'observer'?: ParamOBServerSpec; + 'replicas': number; /** * - * @type {Array} - * @memberof ParamCreateOBClusterParam + * @type {CommonResourceSpec} + * @memberof ObproxyOBProxy */ - 'parameters'?: Array; + 'resource': CommonResourceSpec; + /** + * + * @type {ResponseK8sService} + * @memberof ObproxyOBProxy + */ + 'service': ResponseK8sService; /** * * @type {string} - * @memberof ParamCreateOBClusterParam + * @memberof ObproxyOBProxy */ - 'rootPassword'?: string; + 'serviceIp': string; /** * - * @type {Array} - * @memberof ParamCreateOBClusterParam + * @type {string} + * @memberof ObproxyOBProxy */ - 'topology'?: Array; + 'serviceType': string; + /** + * + * @type {string} + * @memberof ObproxyOBProxy + */ + 'status': ObproxyOBProxyStatusEnum; } +export const ObproxyOBProxyStatusEnum = { + Running: 'Running', + Pending: 'Pending' +} as const; + +export type ObproxyOBProxyStatusEnum = typeof ObproxyOBProxyStatusEnum[keyof typeof ObproxyOBProxyStatusEnum]; /** * * @export - * @interface ParamCreateOBTenantParam + * @interface ObproxyOBProxyOverview */ -export interface ParamCreateOBTenantParam { +export interface ObproxyOBProxyOverview { /** * - * @type {string} - * @memberof ParamCreateOBTenantParam + * @type {number} + * @memberof ObproxyOBProxyOverview */ - 'charset'?: string; + 'creationTime': number; /** * * @type {string} - * @memberof ParamCreateOBTenantParam + * @memberof ObproxyOBProxyOverview */ - 'connectWhiteList'?: string; + 'image': string; /** * * @type {string} - * @memberof ParamCreateOBTenantParam + * @memberof ObproxyOBProxyOverview */ 'name': string; /** * * @type {string} - * @memberof ParamCreateOBTenantParam + * @memberof ObproxyOBProxyOverview */ 'namespace': string; /** * - * @type {string} - * @memberof ParamCreateOBTenantParam - */ - 'obcluster': string; - /** - * - * @type {Array} - * @memberof ParamCreateOBTenantParam + * @type {ObproxyK8sObject} + * @memberof ObproxyOBProxyOverview */ - 'pools': Array; + 'obCluster': ObproxyK8sObject; /** * * @type {string} - * @memberof ParamCreateOBTenantParam + * @memberof ObproxyOBProxyOverview */ - 'rootPassword': string; + 'proxyClusterName': string; /** * - * @type {ParamTenantSourceSpec} - * @memberof ParamCreateOBTenantParam + * @type {number} + * @memberof ObproxyOBProxyOverview */ - 'source'?: ParamTenantSourceSpec; + 'replicas': number; /** * * @type {string} - * @memberof ParamCreateOBTenantParam - */ - 'tenantName': string; - /** - * Enum: Primary, Standby - * @type {string} - * @memberof ParamCreateOBTenantParam + * @memberof ObproxyOBProxyOverview */ - 'tenantRole'?: string; + 'serviceIp': string; /** * - * @type {ParamUnitConfig} - * @memberof ParamCreateOBTenantParam + * @type {string} + * @memberof ObproxyOBProxyOverview */ - 'unitConfig': ParamUnitConfig; + 'serviceType': string; /** * - * @type {number} - * @memberof ParamCreateOBTenantParam + * @type {string} + * @memberof ObproxyOBProxyOverview */ - 'unitNum': number; + 'status': ObproxyOBProxyOverviewStatusEnum; } + +export const ObproxyOBProxyOverviewStatusEnum = { + Running: 'Running', + Pending: 'Pending' +} as const; + +export type ObproxyOBProxyOverviewStatusEnum = typeof ObproxyOBProxyOverviewStatusEnum[keyof typeof ObproxyOBProxyOverviewStatusEnum]; + /** * * @export - * @interface ParamLoginParam + * @interface ObproxyPatchOBProxyParam */ -export interface ParamLoginParam { +export interface ObproxyPatchOBProxyParam { /** * * @type {string} - * @memberof ParamLoginParam - */ - 'password'?: string; - /** - * - * @type {string} - * @memberof ParamLoginParam - */ - 'username'?: string; -} -/** - * - * @export - * @interface ParamMetricQuery - */ -export interface ParamMetricQuery { - /** - * - * @type {Array} - * @memberof ParamMetricQuery + * @memberof ObproxyPatchOBProxyParam */ - 'groupLabels'?: Array; + 'image'?: string; /** * * @type {Array} - * @memberof ParamMetricQuery + * @memberof ObproxyPatchOBProxyParam */ - 'labels'?: Array; + 'parameters'?: Array; /** * - * @type {Array} - * @memberof ParamMetricQuery + * @type {number} + * @memberof ObproxyPatchOBProxyParam */ - 'metrics'?: Array; + 'replicas'?: number; /** * - * @type {ParamQueryRange} - * @memberof ParamMetricQuery + * @type {CommonResourceSpec} + * @memberof ObproxyPatchOBProxyParam */ - 'queryRange'?: ParamQueryRange; -} -/** - * - * @export - * @interface ParamMonitorSpec - */ -export interface ParamMonitorSpec { + 'resource'?: CommonResourceSpec; /** * * @type {string} - * @memberof ParamMonitorSpec - */ - 'image'?: string; - /** - * - * @type {CommonResourceSpec} - * @memberof ParamMonitorSpec + * @memberof ObproxyPatchOBProxyParam */ - 'resource'?: CommonResourceSpec; + 'serviceType'?: ObproxyPatchOBProxyParamServiceTypeEnum; } + +export const ObproxyPatchOBProxyParamServiceTypeEnum = { + ClusterIP: 'ClusterIP', + NodePort: 'NodePort', + LoadBalancer: 'LoadBalancer', + ExternalName: 'ExternalName' +} as const; + +export type ObproxyPatchOBProxyParamServiceTypeEnum = typeof ObproxyPatchOBProxyParamServiceTypeEnum[keyof typeof ObproxyPatchOBProxyParamServiceTypeEnum]; + /** * * @export - * @interface ParamNFSVolumeSpec + * @interface OceanbaseOBInstance */ -export interface ParamNFSVolumeSpec { +export interface OceanbaseOBInstance { /** * * @type {string} - * @memberof ParamNFSVolumeSpec + * @memberof OceanbaseOBInstance */ - 'address'?: string; + 'obcluster'?: string; /** * * @type {string} - * @memberof ParamNFSVolumeSpec + * @memberof OceanbaseOBInstance */ - 'path'?: string; -} -/** - * - * @export - * @interface ParamOBServerSpec - */ -export interface ParamOBServerSpec { + 'observer'?: string; /** * * @type {string} - * @memberof ParamOBServerSpec + * @memberof OceanbaseOBInstance */ - 'image'?: string; + 'obtenant'?: string; /** - * - * @type {CommonResourceSpec} - * @memberof ParamOBServerSpec + * obzone may exist in labels + * @type {string} + * @memberof OceanbaseOBInstance */ - 'resource'?: CommonResourceSpec; + 'obzone'?: string; /** * - * @type {ParamOBServerStorageSpec} - * @memberof ParamOBServerSpec + * @type {OceanbaseOBInstanceType} + * @memberof OceanbaseOBInstance */ - 'storage'?: ParamOBServerStorageSpec; + 'type': OceanbaseOBInstanceType; } + + /** * * @export - * @interface ParamOBServerStorageSpec + * @enum {string} */ -export interface ParamOBServerStorageSpec { - /** - * - * @type {CommonStorageSpec} - * @memberof ParamOBServerStorageSpec - */ - 'data'?: CommonStorageSpec; - /** - * - * @type {CommonStorageSpec} - * @memberof ParamOBServerStorageSpec - */ - 'log'?: CommonStorageSpec; - /** - * - * @type {CommonStorageSpec} - * @memberof ParamOBServerStorageSpec - */ - 'redoLog'?: CommonStorageSpec; -} + +export const OceanbaseOBInstanceType = { + TypeUnknown: 'unknown', + TypeOBCluster: 'obcluster', + TypeOBZone: 'obzone', + TypeOBTenant: 'obtenant', + TypeOBServer: 'observer' +} as const; + +export type OceanbaseOBInstanceType = typeof OceanbaseOBInstanceType[keyof typeof OceanbaseOBInstanceType]; + + /** * * @export - * @interface ParamPatchTenant + * @enum {string} */ -export interface ParamPatchTenant { - /** - * Deprecated Description: Deprecated, use PATCH /obtenants/:namespace/:name/pools/:zoneName instead - * @type {ParamPatchUnitConfig} - * @memberof ParamPatchTenant - */ - 'unitConfig'?: ParamPatchUnitConfig; - /** - * - * @type {number} - * @memberof ParamPatchTenant - */ - 'unitNum'?: number; -} + +export const ParamBackupDestType = { + BackupDestNFS: 'NFS', + BackupDestOSS: 'OSS', + BackupDestCOS: 'COS', + BackupDestS3: 'S3', + BackupDestS3Compatible: 'S3_COMPATIBLE' +} as const; + +export type ParamBackupDestType = typeof ParamBackupDestType[keyof typeof ParamBackupDestType]; + + /** * * @export - * @interface ParamPatchUnitConfig + * @interface ParamChangeTenantRole */ -export interface ParamPatchUnitConfig { +export interface ParamChangeTenantRole { /** * - * @type {Array} - * @memberof ParamPatchUnitConfig + * @type {boolean} + * @memberof ParamChangeTenantRole */ - 'pools': Array; + 'failover'?: boolean; /** * - * @type {ParamUnitConfig} - * @memberof ParamPatchUnitConfig + * @type {boolean} + * @memberof ParamChangeTenantRole */ - 'unitConfig': ParamUnitConfig; + 'switchover'?: boolean; } /** * * @export - * @interface ParamQueryRange + * @interface ParamChangeUserPassword */ -export interface ParamQueryRange { - /** - * - * @type {number} - * @memberof ParamQueryRange - */ - 'endTimestamp'?: number; +export interface ParamChangeUserPassword { /** * - * @type {number} - * @memberof ParamQueryRange + * @type {string} + * @memberof ParamChangeUserPassword */ - 'startTimestamp'?: number; + 'password': string; /** - * - * @type {number} - * @memberof ParamQueryRange + * Description: The user name of the database account, only root is supported now. + * @type {string} + * @memberof ParamChangeUserPassword */ - 'step'?: number; + 'user': string; } /** * * @export - * @interface ParamReplayStandbyLog + * @interface ParamConfigurableInfo */ -export interface ParamReplayStandbyLog { +export interface ParamConfigurableInfo { /** * * @type {string} - * @memberof ParamReplayStandbyLog - */ - 'timestamp'?: string; - /** - * - * @type {boolean} - * @memberof ParamReplayStandbyLog + * @memberof ParamConfigurableInfo */ - 'unlimited'?: boolean; + 'odcURL'?: string; } /** * * @export - * @interface ParamResetPasswordParam + * @interface ParamCreateBackupPolicy */ -export interface ParamResetPasswordParam { +export interface ParamCreateBackupPolicy { /** - * + * Used for COS * @type {string} - * @memberof ParamResetPasswordParam + * @memberof ParamCreateBackupPolicy */ - 'oldPassword'?: string; + 'appId'?: string; /** * * @type {string} - * @memberof ParamResetPasswordParam + * @memberof ParamCreateBackupPolicy */ - 'password': string; -} -/** - * - * @export - * @interface ParamResourcePoolSpec - */ -export interface ParamResourcePoolSpec { + 'archivePath': string; /** * - * @type {number} - * @memberof ParamResourcePoolSpec + * @type {string} + * @memberof ParamCreateBackupPolicy */ - 'priority'?: number; + 'bakDataPath': string; /** - * Enum: Readonly, Full + * * @type {string} - * @memberof ParamResourcePoolSpec + * @memberof ParamCreateBackupPolicy */ - 'type'?: string; + 'bakEncryptionPassword'?: string; + /** + * Enum: NFS, OSS, COS, S3, S3_COMPATIBLE + * @type {ParamBackupDestType} + * @memberof ParamCreateBackupPolicy + */ + 'destType': ParamBackupDestType; /** * * @type {string} - * @memberof ParamResourcePoolSpec + * @memberof ParamCreateBackupPolicy */ - 'zone': string; -} -/** - * - * @export - * @interface ParamRestoreSourceSpec - */ -export interface ParamRestoreSourceSpec { + 'host'?: string; /** * - * @type {string} - * @memberof ParamRestoreSourceSpec + * @type {number} + * @memberof ParamCreateBackupPolicy */ - 'archiveSource': string; + 'jobKeepDays'?: number; /** - * + * Used for non-NFS * @type {string} - * @memberof ParamRestoreSourceSpec + * @memberof ParamCreateBackupPolicy */ - 'bakDataSource': string; + 'ossAccessId'?: string; /** * * @type {string} - * @memberof ParamRestoreSourceSpec + * @memberof ParamCreateBackupPolicy */ - 'bakEncryptionPassword'?: string; + 'ossAccessKey'?: string; /** * - * @type {string} - * @memberof ParamRestoreSourceSpec + * @type {number} + * @memberof ParamCreateBackupPolicy */ - 'ossAccessId'?: string; + 'pieceIntervalDays'?: number; /** * - * @type {string} - * @memberof ParamRestoreSourceSpec + * @type {number} + * @memberof ParamCreateBackupPolicy */ - 'ossAccessKey'?: string; + 'recoveryDays'?: number; /** - * Enum: OSS, NFS + * Used for S3 * @type {string} - * @memberof ParamRestoreSourceSpec + * @memberof ParamCreateBackupPolicy */ - 'type': string; + 'region'?: string; /** * - * @type {ParamRestoreUntilConfig} - * @memberof ParamRestoreSourceSpec + * @type {Array} + * @memberof ParamCreateBackupPolicy */ - 'until'?: ParamRestoreUntilConfig; -} -/** - * - * @export - * @interface ParamRestoreUntilConfig - */ -export interface ParamRestoreUntilConfig { + 'scheduleDates'?: Array; /** - * + * Description: HH:MM Example: 04:00 * @type {string} - * @memberof ParamRestoreUntilConfig + * @memberof ParamCreateBackupPolicy */ - 'timestamp'?: string; + 'scheduleTime'?: string; /** - * - * @type {boolean} - * @memberof ParamRestoreUntilConfig + * Enum: Weekly, Monthly + * @type {string} + * @memberof ParamCreateBackupPolicy */ - 'unlimited'?: boolean; + 'scheduleType'?: string; } + + /** * * @export - * @interface ParamScaleOBServerParam + * @interface ParamCreateNamespaceParam */ -export interface ParamScaleOBServerParam { +export interface ParamCreateNamespaceParam { /** * - * @type {number} - * @memberof ParamScaleOBServerParam + * @type {string} + * @memberof ParamCreateNamespaceParam */ - 'replicas'?: number; + 'namespace'?: string; } /** * * @export - * @interface ParamScheduleDate + * @interface ParamCreateOBClusterParam */ -export interface ParamScheduleDate { +export interface ParamCreateOBClusterParam { /** - * Enum: Full, Incremental - * @type {string} - * @memberof ParamScheduleDate + * + * @type {ParamNFSVolumeSpec} + * @memberof ParamCreateOBClusterParam */ - 'backupType': string; + 'backupVolume'?: ParamNFSVolumeSpec; /** - * Description: 1-31 for monthly, 1-7 for weekly + * * @type {number} - * @memberof ParamScheduleDate + * @memberof ParamCreateOBClusterParam */ - 'day': number; -} -/** - * - * @export - * @interface ParamTenantPoolSpec - */ -export interface ParamTenantPoolSpec { + 'clusterId'?: number; /** * - * @type {number} - * @memberof ParamTenantPoolSpec + * @type {string} + * @memberof ParamCreateOBClusterParam */ - 'priority'?: number; + 'clusterName'?: string; /** * - * @type {ParamUnitConfig} - * @memberof ParamTenantPoolSpec + * @type {boolean} + * @memberof ParamCreateOBClusterParam */ - 'unitConfig'?: ParamUnitConfig; -} -/** - * - * @export - * @interface ParamTenantSourceSpec - */ -export interface ParamTenantSourceSpec { + 'deletionProtection'?: boolean; /** * - * @type {ParamRestoreSourceSpec} - * @memberof ParamTenantSourceSpec + * @type {CommonClusterMode} + * @memberof ParamCreateOBClusterParam */ - 'restore'?: ParamRestoreSourceSpec; + 'mode'?: CommonClusterMode; + /** + * + * @type {ParamMonitorSpec} + * @memberof ParamCreateOBClusterParam + */ + 'monitor'?: ParamMonitorSpec; /** * * @type {string} - * @memberof ParamTenantSourceSpec + * @memberof ParamCreateOBClusterParam */ - 'tenant'?: string; -} -/** - * - * @export - * @interface ParamUnitConfig - */ -export interface ParamUnitConfig { + 'name'?: string; /** * * @type {string} - * @memberof ParamUnitConfig + * @memberof ParamCreateOBClusterParam */ - 'cpuCount': string; + 'namespace'?: string; /** * - * @type {number} - * @memberof ParamUnitConfig + * @type {ParamOBServerSpec} + * @memberof ParamCreateOBClusterParam */ - 'iopsWeight'?: number; + 'observer'?: ParamOBServerSpec; /** * - * @type {string} - * @memberof ParamUnitConfig + * @type {Array} + * @memberof ParamCreateOBClusterParam */ - 'logDiskSize'?: string; + 'parameters'?: Array; /** * - * @type {number} - * @memberof ParamUnitConfig + * @type {boolean} + * @memberof ParamCreateOBClusterParam */ - 'maxIops'?: number; + 'pvcIndependent'?: boolean; /** * * @type {string} - * @memberof ParamUnitConfig + * @memberof ParamCreateOBClusterParam */ - 'memorySize': string; + 'rootPassword'?: string; + /** + * Enum: express_oltp, express_oltp, olap, kv, htap, express_oltp_perf + * @type {string} + * @memberof ParamCreateOBClusterParam + */ + 'scenario'?: string; /** * - * @type {number} - * @memberof ParamUnitConfig + * @type {Array} + * @memberof ParamCreateOBClusterParam */ - 'minIops'?: number; + 'topology'?: Array; } + + /** * * @export - * @interface ParamUpdateBackupPolicy + * @interface ParamCreateOBTenantParam */ -export interface ParamUpdateBackupPolicy { +export interface ParamCreateOBTenantParam { /** * - * @type {number} - * @memberof ParamUpdateBackupPolicy + * @type {string} + * @memberof ParamCreateOBTenantParam */ - 'jobKeepDays'?: number; + 'charset'?: string; /** * - * @type {number} - * @memberof ParamUpdateBackupPolicy + * @type {string} + * @memberof ParamCreateOBTenantParam */ - 'pieceIntervalDays'?: number; + 'connectWhiteList'?: string; /** * - * @type {number} - * @memberof ParamUpdateBackupPolicy + * @type {boolean} + * @memberof ParamCreateOBTenantParam */ - 'recoveryDays'?: number; + 'deletionProtection'?: boolean; /** * - * @type {Array} - * @memberof ParamUpdateBackupPolicy - */ - 'scheduleDates'?: Array; - /** - * Description: HH:MM Example: 04:00 * @type {string} - * @memberof ParamUpdateBackupPolicy + * @memberof ParamCreateOBTenantParam */ - 'scheduleTime'?: string; + 'name': string; /** - * Enum: Weekly, Monthly + * * @type {string} - * @memberof ParamUpdateBackupPolicy + * @memberof ParamCreateOBTenantParam */ - 'scheduleType'?: string; + 'namespace': string; /** - * Enum: PAUSED, RUNNING + * * @type {string} - * @memberof ParamUpdateBackupPolicy + * @memberof ParamCreateOBTenantParam */ - 'status'?: string; -} -/** - * - * @export - * @interface ParamUpgradeOBClusterParam - */ -export interface ParamUpgradeOBClusterParam { + 'obcluster': string; /** * - * @type {string} - * @memberof ParamUpgradeOBClusterParam + * @type {Array} + * @memberof ParamCreateOBTenantParam */ - 'image'?: string; -} -/** - * - * @export - * @interface ParamZoneTopology - */ -export interface ParamZoneTopology { + 'parameters'?: Array; /** * - * @type {Array} - * @memberof ParamZoneTopology + * @type {Array} + * @memberof ParamCreateOBTenantParam */ - 'affinities'?: Array; + 'pools': Array; /** * - * @type {Array} - * @memberof ParamZoneTopology + * @type {string} + * @memberof ParamCreateOBTenantParam */ - 'nodeSelector'?: Array; + 'rootPassword': string; /** - * - * @type {number} - * @memberof ParamZoneTopology + * Enum: express_oltp, express_oltp, olap, kv, htap, express_oltp_perf + * @type {string} + * @memberof ParamCreateOBTenantParam */ - 'replicas'?: number; + 'scenario'?: string; /** * - * @type {Array} - * @memberof ParamZoneTopology - */ - 'tolerations'?: Array; - /** - * - * @type {string} - * @memberof ParamZoneTopology - */ - 'zone'?: string; -} -/** - * - * @export - * @interface PayloadAlert - */ -export interface PayloadAlert { - /** - * - * @type {{ [key: string]: string; }} - * @memberof PayloadAlert + * @type {ParamTenantSourceSpec} + * @memberof ParamCreateOBTenantParam */ - 'annotations'?: { [key: string]: string; }; + 'source'?: ParamTenantSourceSpec; /** * * @type {string} - * @memberof PayloadAlert + * @memberof ParamCreateOBTenantParam */ - 'endsAt'?: string; + 'tenantName': string; /** - * + * Enum: Primary, Standby * @type {string} - * @memberof PayloadAlert + * @memberof ParamCreateOBTenantParam */ - 'generatorURL'?: string; + 'tenantRole'?: string; /** * - * @type {{ [key: string]: string; }} - * @memberof PayloadAlert + * @type {ParamUnitConfig} + * @memberof ParamCreateOBTenantParam */ - 'labels'?: { [key: string]: string; }; + 'unitConfig': ParamUnitConfig; /** * - * @type {string} - * @memberof PayloadAlert + * @type {number} + * @memberof ParamCreateOBTenantParam */ - 'startsAt'?: string; + 'unitNum': number; /** * - * @type {string} - * @memberof PayloadAlert + * @type {Array} + * @memberof ParamCreateOBTenantParam */ - 'status'?: string; + 'variables'?: Array; } /** * * @export - * @interface PayloadWebhookPayload + * @interface ParamDeleteOBServersParam */ -export interface PayloadWebhookPayload { - /** - * - * @type {Array} - * @memberof PayloadWebhookPayload - */ - 'alerts'?: Array; - /** - * - * @type {{ [key: string]: string; }} - * @memberof PayloadWebhookPayload - */ - 'commonAnnotations'?: { [key: string]: string; }; +export interface ParamDeleteOBServersParam { /** * - * @type {{ [key: string]: string; }} - * @memberof PayloadWebhookPayload + * @type {Array} + * @memberof ParamDeleteOBServersParam */ - 'commonLabels'?: { [key: string]: string; }; + 'observers'?: Array; +} +/** + * + * @export + * @interface ParamLoginParam + */ +export interface ParamLoginParam { /** * * @type {string} - * @memberof PayloadWebhookPayload + * @memberof ParamLoginParam */ - 'externalURL'?: string; + 'password'?: string; /** * * @type {string} - * @memberof PayloadWebhookPayload + * @memberof ParamLoginParam */ - 'groupKey'?: string; + 'username'?: string; +} +/** + * + * @export + * @interface ParamMetricQuery + */ +export interface ParamMetricQuery { /** * - * @type {{ [key: string]: string; }} - * @memberof PayloadWebhookPayload + * @type {Array} + * @memberof ParamMetricQuery */ - 'groupLabels'?: { [key: string]: string; }; + 'groupLabels'?: Array; /** * - * @type {string} - * @memberof PayloadWebhookPayload + * @type {Array} + * @memberof ParamMetricQuery */ - 'receiver'?: string; + 'labels'?: Array; /** * - * @type {string} - * @memberof PayloadWebhookPayload + * @type {Array} + * @memberof ParamMetricQuery */ - 'status'?: string; + 'metrics'?: Array; /** * - * @type {string} - * @memberof PayloadWebhookPayload + * @type {ParamQueryRange} + * @memberof ParamMetricQuery */ - 'version'?: string; + 'queryRange'?: ParamQueryRange; } /** * * @export - * @interface QueryMetrics200Response + * @interface ParamMonitorSpec */ -export interface QueryMetrics200Response { - /** - * - * @type {Array} - * @memberof QueryMetrics200Response - */ - 'data': Array; +export interface ParamMonitorSpec { /** * * @type {string} - * @memberof QueryMetrics200Response + * @memberof ParamMonitorSpec */ - 'message': string; + 'image'?: string; /** * - * @type {boolean} - * @memberof QueryMetrics200Response + * @type {CommonResourceSpec} + * @memberof ParamMonitorSpec */ - 'successful': boolean; + 'resource'?: CommonResourceSpec; } /** * * @export - * @interface ReceiverReceiver + * @interface ParamNFSVolumeSpec */ -export interface ReceiverReceiver { +export interface ParamNFSVolumeSpec { /** * * @type {string} - * @memberof ReceiverReceiver + * @memberof ParamNFSVolumeSpec */ - 'config': string; + 'address'?: string; /** * * @type {string} - * @memberof ReceiverReceiver - */ - 'name': string; - /** - * - * @type {ReceiverReceiverType} - * @memberof ReceiverReceiver + * @memberof ParamNFSVolumeSpec */ - 'type': ReceiverReceiverType; + 'path'?: string; } - - -/** - * - * @export - * @enum {string} - */ - -export const ReceiverReceiverType = { - TypeDiscord: 'discord', - TypeEmail: 'email', - TypePagerduty: 'pagerduty', - TypeSlack: 'slack', - TypeWebhook: 'webhook', - TypeOpsGenie: 'opsgenie', - TypeWechat: 'wechat', - TypePushover: 'pushover', - TypeVictorOps: 'victorops', - TypeSNS: 'sns', - TypeTelegram: 'telegram', - TypeWebex: 'webex', - TypeMSTeams: 'msteams' -} as const; - -export type ReceiverReceiverType = typeof ReceiverReceiverType[keyof typeof ReceiverReceiverType]; - - /** * * @export - * @interface ReceiverTemplate + * @interface ParamOBServerSpec */ -export interface ReceiverTemplate { +export interface ParamOBServerSpec { /** * * @type {string} - * @memberof ReceiverTemplate + * @memberof ParamOBServerSpec */ - 'template': string; + 'image'?: string; /** * - * @type {ReceiverReceiverType} - * @memberof ReceiverTemplate + * @type {CommonResourceSpec} + * @memberof ParamOBServerSpec */ - 'type': ReceiverReceiverType; + 'resource'?: CommonResourceSpec; + /** + * + * @type {ParamOBServerStorageSpec} + * @memberof ParamOBServerSpec + */ + 'storage'?: ParamOBServerStorageSpec; } - - /** * * @export - * @interface ResponseAPIResponse + * @interface ParamOBServerStorageSpec */ -export interface ResponseAPIResponse { +export interface ParamOBServerStorageSpec { /** * - * @type {object} - * @memberof ResponseAPIResponse + * @type {CommonStorageSpec} + * @memberof ParamOBServerStorageSpec */ - 'data': object; + 'data'?: CommonStorageSpec; /** * - * @type {string} - * @memberof ResponseAPIResponse + * @type {CommonStorageSpec} + * @memberof ParamOBServerStorageSpec */ - 'message': string; + 'log'?: CommonStorageSpec; /** * - * @type {boolean} - * @memberof ResponseAPIResponse + * @type {CommonStorageSpec} + * @memberof ParamOBServerStorageSpec */ - 'successful': boolean; + 'redoLog'?: CommonStorageSpec; } /** * * @export - * @interface ResponseBackupJob + * @interface ParamPatchOBClusterParam */ -export interface ResponseBackupJob { +export interface ParamPatchOBClusterParam { /** * - * @type {string} - * @memberof ResponseBackupJob + * @type {boolean} + * @memberof ParamPatchOBClusterParam */ - 'backupPolicyName': string; + 'addDeletionProtection'?: boolean; /** * - * @type {string} - * @memberof ResponseBackupJob + * @type {ParamNFSVolumeSpec} + * @memberof ParamPatchOBClusterParam */ - 'encryptionSecret'?: string; + 'backupVolume'?: ParamNFSVolumeSpec; /** - * End time of the backup job, empty for ARCHIVE job - * @type {string} - * @memberof ResponseBackupJob + * + * @type {ParamMonitorSpec} + * @memberof ParamPatchOBClusterParam */ - 'endTime'?: string; + 'monitor'?: ParamMonitorSpec; /** * - * @type {string} - * @memberof ResponseBackupJob + * @type {Array} + * @memberof ParamPatchOBClusterParam */ - 'name': string; + 'parameters'?: Array; /** * - * @type {string} - * @memberof ResponseBackupJob + * @type {boolean} + * @memberof ParamPatchOBClusterParam */ - 'namespace': string; + 'removeBackupVolume'?: boolean; /** - * Empty for Clean job - * @type {string} - * @memberof ResponseBackupJob + * + * @type {boolean} + * @memberof ParamPatchOBClusterParam */ - 'path': string; - /** - * Start time of the backup job, StartScnDisplay for ARCHIVE job - * @type {string} - * @memberof ResponseBackupJob - */ - 'startTime': string; - /** - * - * @type {string} - * @memberof ResponseBackupJob - */ - 'status': string; + 'removeDeletionProtection'?: boolean; /** * - * @type {string} - * @memberof ResponseBackupJob + * @type {boolean} + * @memberof ParamPatchOBClusterParam */ - 'statusInDatabase': string; + 'removeMonitor'?: boolean; /** * - * @type {string} - * @memberof ResponseBackupJob - */ - 'tenantName': string; - /** - * Enum: FULL, INCR, ARCHIVE, CLEAN - * @type {string} - * @memberof ResponseBackupJob + * @type {CommonResourceSpec} + * @memberof ParamPatchOBClusterParam */ - 'type': string; + 'resource'?: CommonResourceSpec; /** * - * @type {string} - * @memberof ResponseBackupJob + * @type {ParamOBServerStorageSpec} + * @memberof ParamPatchOBClusterParam */ - 'uid': string; + 'storage'?: ParamOBServerStorageSpec; } /** * * @export - * @interface ResponseBackupPolicy + * @interface ParamPatchTenant */ -export interface ResponseBackupPolicy { - /** - * - * @type {string} - * @memberof ResponseBackupPolicy - */ - 'archivePath': string; +export interface ParamPatchTenant { /** * - * @type {string} - * @memberof ResponseBackupPolicy + * @type {boolean} + * @memberof ParamPatchTenant */ - 'bakDataPath': string; + 'addDeletionProtection'?: boolean; /** * - * @type {string} - * @memberof ResponseBackupPolicy + * @type {Array} + * @memberof ParamPatchTenant */ - 'bakEncryptionSecret'?: string; + 'parameters'?: Array; /** * - * @type {string} - * @memberof ResponseBackupPolicy + * @type {boolean} + * @memberof ParamPatchTenant */ - 'createTime': string; + 'removeDeletionProtection'?: boolean; /** - * Enum: NFS, OSS - * @type {string} - * @memberof ResponseBackupPolicy + * Deprecated Description: Deprecated, use PATCH /obtenants/:namespace/:name/pools/:zoneName instead + * @type {ParamPatchUnitConfig} + * @memberof ParamPatchTenant */ - 'destType': string; + 'unitConfig'?: ParamPatchUnitConfig; /** * - * @type {Array} - * @memberof ResponseBackupPolicy + * @type {number} + * @memberof ParamPatchTenant */ - 'events': Array; + 'unitNum'?: number; /** * - * @type {number} - * @memberof ResponseBackupPolicy + * @type {Array} + * @memberof ParamPatchTenant */ - 'jobKeepDays'?: number; + 'variables'?: Array; +} +/** + * + * @export + * @interface ParamPatchUnitConfig + */ +export interface ParamPatchUnitConfig { /** * - * @type {string} - * @memberof ResponseBackupPolicy + * @type {Array} + * @memberof ParamPatchUnitConfig */ - 'name': string; + 'pools': Array; /** * - * @type {string} - * @memberof ResponseBackupPolicy + * @type {ParamUnitConfig} + * @memberof ParamPatchUnitConfig */ - 'namespace': string; + 'unitConfig': ParamUnitConfig; +} +/** + * + * @export + * @interface ParamQueryRange + */ +export interface ParamQueryRange { /** * - * @type {string} - * @memberof ResponseBackupPolicy + * @type {number} + * @memberof ParamQueryRange */ - 'ossAccessSecret'?: string; + 'endTimestamp'?: number; /** * * @type {number} - * @memberof ResponseBackupPolicy + * @memberof ParamQueryRange */ - 'pieceIntervalDays'?: number; + 'startTimestamp'?: number; /** * * @type {number} - * @memberof ResponseBackupPolicy + * @memberof ParamQueryRange */ - 'recoveryDays'?: number; + 'step'?: number; +} +/** + * + * @export + * @interface ParamReplayStandbyLog + */ +export interface ParamReplayStandbyLog { /** * - * @type {Array} - * @memberof ResponseBackupPolicy + * @type {string} + * @memberof ParamReplayStandbyLog */ - 'scheduleDates'?: Array; + 'timestamp'?: string; /** - * Description: HH:MM Example: 04:00 - * @type {string} - * @memberof ResponseBackupPolicy + * + * @type {boolean} + * @memberof ParamReplayStandbyLog */ - 'scheduleTime'?: string; + 'unlimited'?: boolean; +} +/** + * + * @export + * @interface ParamResetPasswordParam + */ +export interface ParamResetPasswordParam { /** - * Enum: Weekly, Monthly + * * @type {string} - * @memberof ResponseBackupPolicy + * @memberof ParamResetPasswordParam */ - 'scheduleType'?: string; + 'oldPassword'?: string; /** * * @type {string} - * @memberof ResponseBackupPolicy + * @memberof ParamResetPasswordParam */ - 'status': string; + 'password': string; +} +/** + * + * @export + * @interface ParamResourcePoolSpec + */ +export interface ParamResourcePoolSpec { /** * + * @type {number} + * @memberof ParamResourcePoolSpec + */ + 'priority'?: number; + /** + * Enum: Readonly, Full * @type {string} - * @memberof ResponseBackupPolicy + * @memberof ParamResourcePoolSpec */ - 'tenantName': string; + 'type'?: string; /** * * @type {string} - * @memberof ResponseBackupPolicy + * @memberof ParamResourcePoolSpec */ - 'uid': string; + 'zone': string; } /** * * @export - * @interface ResponseConfigurableInfo + * @interface ParamRestartOBServersParam */ -export interface ResponseConfigurableInfo { +export interface ParamRestartOBServersParam { /** * - * @type {string} - * @memberof ResponseConfigurableInfo + * @type {boolean} + * @memberof ParamRestartOBServersParam */ - 'odcURL': string; + 'all'?: boolean; + /** + * + * @type {Array} + * @memberof ParamRestartOBServersParam + */ + 'observers'?: Array; + /** + * + * @type {Array} + * @memberof ParamRestartOBServersParam + */ + 'obzones'?: Array; } /** * * @export - * @interface ResponseContainerInfo + * @interface ParamRestoreSourceSpec */ -export interface ResponseContainerInfo { +export interface ParamRestoreSourceSpec { /** * * @type {string} - * @memberof ResponseContainerInfo + * @memberof ParamRestoreSourceSpec */ - 'image': string; + 'appId'?: string; /** * - * @type {CommonResourceSpec} - * @memberof ResponseContainerInfo + * @type {string} + * @memberof ParamRestoreSourceSpec */ - 'limits': CommonResourceSpec; + 'archiveSource': string; /** * * @type {string} - * @memberof ResponseContainerInfo + * @memberof ParamRestoreSourceSpec */ - 'name': string; + 'bakDataSource': string; /** * - * @type {Array} - * @memberof ResponseContainerInfo + * @type {string} + * @memberof ParamRestoreSourceSpec */ - 'ports': Array; + 'bakEncryptionPassword'?: string; /** * - * @type {boolean} - * @memberof ResponseContainerInfo + * @type {string} + * @memberof ParamRestoreSourceSpec */ - 'ready': boolean; + 'ossAccessId'?: string; /** * - * @type {CommonResourceSpec} - * @memberof ResponseContainerInfo + * @type {string} + * @memberof ParamRestoreSourceSpec */ - 'requests': CommonResourceSpec; + 'ossAccessKey'?: string; /** * - * @type {number} - * @memberof ResponseContainerInfo + * @type {string} + * @memberof ParamRestoreSourceSpec */ - 'restartCount': number; + 'region'?: string; + /** + * Enum: OSS, NFS, COS, S3, S3_COMPATIBLE + * @type {ParamBackupDestType} + * @memberof ParamRestoreSourceSpec + */ + 'type': ParamBackupDestType; /** * - * @type {string} - * @memberof ResponseContainerInfo + * @type {ParamRestoreUntilConfig} + * @memberof ParamRestoreSourceSpec */ - 'startTime': string; + 'until'?: ParamRestoreUntilConfig; } + + /** * * @export - * @interface ResponseDashboardInfo + * @interface ParamRestoreUntilConfig */ -export interface ResponseDashboardInfo { +export interface ParamRestoreUntilConfig { /** * * @type {string} - * @memberof ResponseDashboardInfo + * @memberof ParamRestoreUntilConfig */ - 'appName': string; + 'timestamp'?: string; /** * - * @type {ResponseConfigurableInfo} - * @memberof ResponseDashboardInfo + * @type {boolean} + * @memberof ParamRestoreUntilConfig */ - 'configurableInfo': ResponseConfigurableInfo; - /** - * - * @type {string} - * @memberof ResponseDashboardInfo - */ - 'publicKey': string; + 'unlimited'?: boolean; +} +/** + * + * @export + * @interface ParamScaleOBServerParam + */ +export interface ParamScaleOBServerParam { /** * - * @type {string} - * @memberof ResponseDashboardInfo + * @type {number} + * @memberof ParamScaleOBServerParam */ - 'reportHost': string; + 'replicas'?: number; +} +/** + * + * @export + * @interface ParamScheduleDate + */ +export interface ParamScheduleDate { /** - * - * @type {boolean} - * @memberof ResponseDashboardInfo + * Enum: Full, Incremental + * @type {string} + * @memberof ParamScheduleDate */ - 'reportStatistics': boolean; + 'backupType': string; /** - * - * @type {string} - * @memberof ResponseDashboardInfo + * Description: 1-31 for monthly, 1-7 for weekly + * @type {number} + * @memberof ParamScheduleDate */ - 'version': string; + 'day': number; } /** * * @export - * @interface ResponseK8sEvent + * @interface ParamTenantPoolSpec */ -export interface ResponseK8sEvent { +export interface ParamTenantPoolSpec { /** * * @type {number} - * @memberof ResponseK8sEvent + * @memberof ParamTenantPoolSpec */ - 'count': number; + 'priority'?: number; /** * - * @type {number} - * @memberof ResponseK8sEvent + * @type {ParamUnitConfig} + * @memberof ParamTenantPoolSpec */ - 'firstOccur': number; + 'unitConfig'?: ParamUnitConfig; +} +/** + * + * @export + * @interface ParamTenantSourceSpec + */ +export interface ParamTenantSourceSpec { /** * - * @type {number} - * @memberof ResponseK8sEvent + * @type {ParamRestoreSourceSpec} + * @memberof ParamTenantSourceSpec */ - 'lastSeen': number; + 'restore'?: ParamRestoreSourceSpec; /** * * @type {string} - * @memberof ResponseK8sEvent + * @memberof ParamTenantSourceSpec */ - 'message': string; + 'tenant'?: string; +} +/** + * + * @export + * @interface ParamUnitConfig + */ +export interface ParamUnitConfig { /** * * @type {string} - * @memberof ResponseK8sEvent + * @memberof ParamUnitConfig */ - 'namespace': string; + 'cpuCount': string; /** * - * @type {string} - * @memberof ResponseK8sEvent + * @type {number} + * @memberof ParamUnitConfig */ - 'object': string; + 'iopsWeight'?: number; /** * * @type {string} - * @memberof ResponseK8sEvent + * @memberof ParamUnitConfig */ - 'reason': string; + 'logDiskSize'?: string; + /** + * + * @type {number} + * @memberof ParamUnitConfig + */ + 'maxIops'?: number; /** * * @type {string} - * @memberof ResponseK8sEvent + * @memberof ParamUnitConfig */ - 'type': string; + 'memorySize': string; + /** + * + * @type {number} + * @memberof ParamUnitConfig + */ + 'minIops'?: number; } /** * * @export - * @interface ResponseK8sNode + * @interface ParamUpdateBackupPolicy */ -export interface ResponseK8sNode { +export interface ParamUpdateBackupPolicy { /** * - * @type {ResponseK8sNodeInfo} - * @memberof ResponseK8sNode + * @type {number} + * @memberof ParamUpdateBackupPolicy */ - 'info'?: ResponseK8sNodeInfo; + 'jobKeepDays'?: number; /** * - * @type {ResponseK8sNodeResource} - * @memberof ResponseK8sNode + * @type {number} + * @memberof ParamUpdateBackupPolicy */ - 'resource'?: ResponseK8sNodeResource; -} -/** - * - * @export - * @interface ResponseK8sNodeCondition - */ -export interface ResponseK8sNodeCondition { + 'pieceIntervalDays'?: number; /** * - * @type {string} - * @memberof ResponseK8sNodeCondition + * @type {number} + * @memberof ParamUpdateBackupPolicy */ - 'message': string; + 'recoveryDays'?: number; /** * + * @type {Array} + * @memberof ParamUpdateBackupPolicy + */ + 'scheduleDates'?: Array; + /** + * Description: HH:MM Example: 04:00 * @type {string} - * @memberof ResponseK8sNodeCondition + * @memberof ParamUpdateBackupPolicy */ - 'reason': string; + 'scheduleTime'?: string; + /** + * Enum: Weekly, Monthly + * @type {string} + * @memberof ParamUpdateBackupPolicy + */ + 'scheduleType'?: string; + /** + * Enum: PAUSED, RUNNING + * @type {string} + * @memberof ParamUpdateBackupPolicy + */ + 'status'?: string; +} +/** + * + * @export + * @interface ParamUpgradeOBClusterParam + */ +export interface ParamUpgradeOBClusterParam { /** * * @type {string} - * @memberof ResponseK8sNodeCondition + * @memberof ParamUpgradeOBClusterParam */ - 'type': string; + 'image'?: string; } /** * * @export - * @interface ResponseK8sNodeInfo + * @interface ParamZoneTopology */ -export interface ResponseK8sNodeInfo { +export interface ParamZoneTopology { /** * - * @type {Array} - * @memberof ResponseK8sNodeInfo + * @type {Array} + * @memberof ParamZoneTopology */ - 'conditions': Array; + 'affinities'?: Array; /** * - * @type {string} - * @memberof ResponseK8sNodeInfo + * @type {Array} + * @memberof ParamZoneTopology */ - 'cri': string; + 'nodeSelector'?: Array; /** * - * @type {string} - * @memberof ResponseK8sNodeInfo + * @type {number} + * @memberof ParamZoneTopology */ - 'externalIP': string; + 'replicas'?: number; /** * - * @type {string} - * @memberof ResponseK8sNodeInfo + * @type {Array} + * @memberof ParamZoneTopology */ - 'internalIP': string; + 'tolerations'?: Array; /** * * @type {string} - * @memberof ResponseK8sNodeInfo + * @memberof ParamZoneTopology */ - 'kernel': string; + 'zone'?: string; +} +/** + * + * @export + * @interface PayloadAlert + */ +export interface PayloadAlert { /** * - * @type {Array} - * @memberof ResponseK8sNodeInfo + * @type {{ [key: string]: string; }} + * @memberof PayloadAlert */ - 'labels': Array; + 'annotations'?: { [key: string]: string; }; /** * * @type {string} - * @memberof ResponseK8sNodeInfo + * @memberof PayloadAlert */ - 'name': string; + 'endsAt'?: string; /** * * @type {string} - * @memberof ResponseK8sNodeInfo + * @memberof PayloadAlert */ - 'os': string; + 'generatorURL'?: string; /** * - * @type {Array} - * @memberof ResponseK8sNodeInfo + * @type {{ [key: string]: string; }} + * @memberof PayloadAlert */ - 'roles': Array; + 'labels'?: { [key: string]: string; }; /** * * @type {string} - * @memberof ResponseK8sNodeInfo - */ - 'status': string; - /** - * - * @type {number} - * @memberof ResponseK8sNodeInfo + * @memberof PayloadAlert */ - 'uptime': number; + 'startsAt'?: string; /** * * @type {string} - * @memberof ResponseK8sNodeInfo + * @memberof PayloadAlert */ - 'version': string; + 'status'?: string; } /** * * @export - * @interface ResponseK8sNodeResource + * @interface PayloadWebhookPayload */ -export interface ResponseK8sNodeResource { +export interface PayloadWebhookPayload { /** * - * @type {number} - * @memberof ResponseK8sNodeResource + * @type {Array} + * @memberof PayloadWebhookPayload */ - 'cpuFree': number; + 'alerts'?: Array; /** * - * @type {number} - * @memberof ResponseK8sNodeResource + * @type {{ [key: string]: string; }} + * @memberof PayloadWebhookPayload */ - 'cpuTotal': number; - /** - * - * @type {number} - * @memberof ResponseK8sNodeResource - */ - 'cpuUsed': number; - /** - * - * @type {number} - * @memberof ResponseK8sNodeResource - */ - 'memoryFree': number; - /** - * - * @type {number} - * @memberof ResponseK8sNodeResource - */ - 'memoryTotal': number; + 'commonAnnotations'?: { [key: string]: string; }; /** * - * @type {number} - * @memberof ResponseK8sNodeResource + * @type {{ [key: string]: string; }} + * @memberof PayloadWebhookPayload */ - 'memoryUsed': number; -} -/** - * - * @export - * @interface ResponseK8sPodInfo - */ -export interface ResponseK8sPodInfo { + 'commonLabels'?: { [key: string]: string; }; /** * - * @type {Array} - * @memberof ResponseK8sPodInfo + * @type {string} + * @memberof PayloadWebhookPayload */ - 'containers': Array; + 'externalURL'?: string; /** * * @type {string} - * @memberof ResponseK8sPodInfo + * @memberof PayloadWebhookPayload */ - 'message': string; + 'groupKey'?: string; /** * - * @type {string} - * @memberof ResponseK8sPodInfo + * @type {{ [key: string]: string; }} + * @memberof PayloadWebhookPayload */ - 'name': string; + 'groupLabels'?: { [key: string]: string; }; /** * * @type {string} - * @memberof ResponseK8sPodInfo + * @memberof PayloadWebhookPayload */ - 'namespace': string; + 'receiver'?: string; /** * * @type {string} - * @memberof ResponseK8sPodInfo + * @memberof PayloadWebhookPayload */ - 'nodeName': string; + 'status'?: string; /** * * @type {string} - * @memberof ResponseK8sPodInfo + * @memberof PayloadWebhookPayload */ - 'podIP': string; + 'version'?: string; +} +/** + * + * @export + * @interface QueryMetrics200Response + */ +export interface QueryMetrics200Response { /** * - * @type {string} - * @memberof ResponseK8sPodInfo + * @type {Array} + * @memberof QueryMetrics200Response */ - 'reason': string; + 'data': Array; /** * * @type {string} - * @memberof ResponseK8sPodInfo + * @memberof QueryMetrics200Response */ - 'startTime': string; + 'message': string; /** * - * @type {string} - * @memberof ResponseK8sPodInfo + * @type {boolean} + * @memberof QueryMetrics200Response */ - 'status': string; + 'successful': boolean; } /** * * @export - * @interface ResponseK8sService + * @interface QueryPlanDetailInfo200Response */ -export interface ResponseK8sService { +export interface QueryPlanDetailInfo200Response { /** * - * @type {string} - * @memberof ResponseK8sService + * @type {SqlPlanDetail} + * @memberof QueryPlanDetailInfo200Response */ - 'clusterIP': string; + 'data': SqlPlanDetail; /** * * @type {string} - * @memberof ResponseK8sService + * @memberof QueryPlanDetailInfo200Response */ - 'externalIP'?: string; + 'message': string; /** * - * @type {string} - * @memberof ResponseK8sService + * @type {boolean} + * @memberof QueryPlanDetailInfo200Response */ - 'name': string; + 'successful': boolean; +} +/** + * + * @export + * @interface QuerySqlDetailInfo200Response + */ +export interface QuerySqlDetailInfo200Response { /** * - * @type {string} - * @memberof ResponseK8sService + * @type {SqlSqlDetailedInfo} + * @memberof QuerySqlDetailInfo200Response */ - 'namespace': string; + 'data': SqlSqlDetailedInfo; /** * - * @type {Array} - * @memberof ResponseK8sService + * @type {string} + * @memberof QuerySqlDetailInfo200Response */ - 'ports': Array; + 'message': string; /** * - * @type {string} - * @memberof ResponseK8sService + * @type {boolean} + * @memberof QuerySqlDetailInfo200Response */ - 'type': string; + 'successful': boolean; } /** * * @export - * @interface ResponseK8sServicePort + * @interface ReceiverReceiver */ -export interface ResponseK8sServicePort { +export interface ReceiverReceiver { /** * * @type {string} - * @memberof ResponseK8sServicePort - */ - 'name'?: string; - /** - * - * @type {number} - * @memberof ResponseK8sServicePort + * @memberof ReceiverReceiver */ - 'nodePort'?: number; + 'config': string; /** * - * @type {number} - * @memberof ResponseK8sServicePort + * @type {string} + * @memberof ReceiverReceiver */ - 'port': number; + 'name': string; /** * - * @type {number} - * @memberof ResponseK8sServicePort + * @type {ReceiverReceiverType} + * @memberof ReceiverReceiver */ - 'targetPort': number; + 'type': ReceiverReceiverType; } + + /** * * @export - * @interface ResponseMetric + * @enum {string} */ -export interface ResponseMetric { - /** - * - * @type {Array} - * @memberof ResponseMetric - */ - 'labels'?: Array; - /** - * - * @type {string} - * @memberof ResponseMetric - */ - 'name'?: string; -} + +export const ReceiverReceiverType = { + TypeDiscord: 'discord', + TypeEmail: 'email', + TypePagerduty: 'pagerduty', + TypeSlack: 'slack', + TypeWebhook: 'webhook', + TypeOpsGenie: 'opsgenie', + TypeWechat: 'wechat', + TypePushover: 'pushover', + TypeVictorOps: 'victorops', + TypeSNS: 'sns', + TypeTelegram: 'telegram', + TypeWebex: 'webex', + TypeMSTeams: 'msteams' +} as const; + +export type ReceiverReceiverType = typeof ReceiverReceiverType[keyof typeof ReceiverReceiverType]; + + /** * * @export - * @interface ResponseMetricClass + * @interface ReceiverTemplate */ -export interface ResponseMetricClass { +export interface ReceiverTemplate { /** * * @type {string} - * @memberof ResponseMetricClass - */ - 'description': string; - /** - * - * @type {Array} - * @memberof ResponseMetricClass + * @memberof ReceiverTemplate */ - 'metricGroups': Array; + 'template': string; /** * - * @type {string} - * @memberof ResponseMetricClass + * @type {ReceiverReceiverType} + * @memberof ReceiverTemplate */ - 'name': string; + 'type': ReceiverReceiverType; } + + /** * * @export - * @interface ResponseMetricData + * @interface RequestStatistics200Response */ -export interface ResponseMetricData { +export interface RequestStatistics200Response { /** * - * @type {ResponseMetric} - * @memberof ResponseMetricData + * @type {Array} + * @memberof RequestStatistics200Response */ - 'metric': ResponseMetric; + 'data': Array; /** * - * @type {Array} - * @memberof ResponseMetricData + * @type {string} + * @memberof RequestStatistics200Response */ - 'values': Array; + 'message': string; + /** + * + * @type {boolean} + * @memberof RequestStatistics200Response + */ + 'successful': boolean; } /** * * @export - * @interface ResponseMetricGroup + * @interface ResponseAPIResponse */ -export interface ResponseMetricGroup { +export interface ResponseAPIResponse { /** * - * @type {string} - * @memberof ResponseMetricGroup + * @type {object} + * @memberof ResponseAPIResponse */ - 'description': string; + 'data': object; /** * - * @type {Array} - * @memberof ResponseMetricGroup + * @type {string} + * @memberof ResponseAPIResponse */ - 'metrics': Array; + 'message': string; /** * - * @type {string} - * @memberof ResponseMetricGroup + * @type {boolean} + * @memberof ResponseAPIResponse */ - 'name': string; + 'successful': boolean; } /** * * @export - * @interface ResponseMetricMeta + * @interface ResponseBackupJob */ -export interface ResponseMetricMeta { +export interface ResponseBackupJob { /** * * @type {string} - * @memberof ResponseMetricMeta + * @memberof ResponseBackupJob */ - 'description': string; + 'backupPolicyName': string; /** * * @type {string} - * @memberof ResponseMetricMeta + * @memberof ResponseBackupJob */ - 'key': string; + 'encryptionSecret'?: string; /** - * + * End time of the backup job, empty for ARCHIVE job * @type {string} - * @memberof ResponseMetricMeta + * @memberof ResponseBackupJob */ - 'name': string; + 'endTime'?: string; /** * * @type {string} - * @memberof ResponseMetricMeta + * @memberof ResponseBackupJob */ - 'unit': string; -} -/** - * - * @export - * @interface ResponseMetricValue - */ -export interface ResponseMetricValue { + 'name': string; /** * - * @type {number} - * @memberof ResponseMetricValue + * @type {string} + * @memberof ResponseBackupJob */ - 'timestamp': number; + 'namespace': string; /** - * - * @type {number} - * @memberof ResponseMetricValue + * Empty for Clean job + * @type {string} + * @memberof ResponseBackupJob */ - 'value': number; -} -/** - * - * @export - * @interface ResponseMonitorSpec - */ -export interface ResponseMonitorSpec { + 'path': string; /** - * + * Start time of the backup job, StartScnDisplay for ARCHIVE job * @type {string} - * @memberof ResponseMonitorSpec + * @memberof ResponseBackupJob */ - 'image': string; + 'startTime': string; /** * - * @type {ResponseResourceSpecRender} - * @memberof ResponseMonitorSpec + * @type {string} + * @memberof ResponseBackupJob */ - 'resource': ResponseResourceSpecRender; -} -/** - * - * @export - * @interface ResponseNFSVolumeSpec - */ -export interface ResponseNFSVolumeSpec { + 'status': string; /** * * @type {string} - * @memberof ResponseNFSVolumeSpec + * @memberof ResponseBackupJob */ - 'address': string; + 'statusInDatabase': string; /** * * @type {string} - * @memberof ResponseNFSVolumeSpec + * @memberof ResponseBackupJob */ - 'path': string; -} -/** - * - * @export - * @interface ResponseNamespace - */ -export interface ResponseNamespace { + 'tenantName': string; /** - * + * Enum: FULL, INCR, ARCHIVE, CLEAN * @type {string} - * @memberof ResponseNamespace + * @memberof ResponseBackupJob */ - 'namespace': string; + 'type': string; /** * * @type {string} - * @memberof ResponseNamespace + * @memberof ResponseBackupJob */ - 'status': string; + 'uid': string; } /** * * @export - * @interface ResponseOBCluster + * @interface ResponseBackupPolicy */ -export interface ResponseOBCluster { - /** - * - * @type {ResponseNFSVolumeSpec} - * @memberof ResponseOBCluster - */ - 'backupVolume'?: ResponseNFSVolumeSpec; +export interface ResponseBackupPolicy { /** * - * @type {number} - * @memberof ResponseOBCluster + * @type {string} + * @memberof ResponseBackupPolicy */ - 'clusterId': number; + 'archivePath': string; /** * * @type {string} - * @memberof ResponseOBCluster + * @memberof ResponseBackupPolicy */ - 'clusterName': string; + 'bakDataPath': string; /** * - * @type {number} - * @memberof ResponseOBCluster + * @type {string} + * @memberof ResponseBackupPolicy */ - 'createTime': number; + 'bakEncryptionSecret'?: string; /** * * @type {string} - * @memberof ResponseOBCluster + * @memberof ResponseBackupPolicy */ - 'image': string; + 'createTime': string; /** - * - * @type {ResponseOBMetrics} - * @memberof ResponseOBCluster + * Enum: NFS, OSS, COS, S3, S3_COMPATIBLE + * @type {ParamBackupDestType} + * @memberof ResponseBackupPolicy */ - 'metrics'?: ResponseOBMetrics; + 'destType': ParamBackupDestType; /** * - * @type {CommonClusterMode} - * @memberof ResponseOBCluster + * @type {Array} + * @memberof ResponseBackupPolicy */ - 'mode': CommonClusterMode; + 'events': Array; /** * - * @type {ResponseMonitorSpec} - * @memberof ResponseOBCluster + * @type {number} + * @memberof ResponseBackupPolicy */ - 'monitor'?: ResponseMonitorSpec; + 'jobKeepDays'?: number; /** * * @type {string} - * @memberof ResponseOBCluster + * @memberof ResponseBackupPolicy */ 'name': string; /** * * @type {string} - * @memberof ResponseOBCluster + * @memberof ResponseBackupPolicy */ 'namespace': string; /** * - * @type {Array} - * @memberof ResponseOBCluster + * @type {string} + * @memberof ResponseBackupPolicy */ - 'parameters': Array; + 'ossAccessSecret'?: string; /** * - * @type {ResponseResourceSpecRender} - * @memberof ResponseOBCluster + * @type {number} + * @memberof ResponseBackupPolicy */ - 'resource': ResponseResourceSpecRender; + 'pieceIntervalDays'?: number; /** * - * @type {string} - * @memberof ResponseOBCluster + * @type {number} + * @memberof ResponseBackupPolicy */ - 'rootPasswordSecret': string; + 'recoveryDays'?: number; /** * - * @type {string} - * @memberof ResponseOBCluster + * @type {Array} + * @memberof ResponseBackupPolicy */ - 'status': string; + 'scheduleDates'?: Array; /** - * + * Description: HH:MM Example: 04:00 * @type {string} - * @memberof ResponseOBCluster + * @memberof ResponseBackupPolicy */ - 'statusDetail': string; + 'scheduleTime'?: string; /** - * - * @type {ResponseOBServerStorage} - * @memberof ResponseOBCluster + * Enum: Weekly, Monthly + * @type {string} + * @memberof ResponseBackupPolicy */ - 'storage': ResponseOBServerStorage; + 'scheduleType'?: string; /** * - * @type {Array} - * @memberof ResponseOBCluster + * @type {string} + * @memberof ResponseBackupPolicy */ - 'topology': Array; + 'status': string; /** * * @type {string} - * @memberof ResponseOBCluster + * @memberof ResponseBackupPolicy */ - 'uid': string; + 'tenantName': string; /** * * @type {string} - * @memberof ResponseOBCluster + * @memberof ResponseBackupPolicy */ - 'version'?: string; + 'uid': string; } /** * * @export - * @interface ResponseOBClusterOverview + * @interface ResponseConfigurableInfo */ -export interface ResponseOBClusterOverview { - /** - * - * @type {number} - * @memberof ResponseOBClusterOverview - */ - 'clusterId': number; +export interface ResponseConfigurableInfo { /** * * @type {string} - * @memberof ResponseOBClusterOverview - */ - 'clusterName': string; - /** - * - * @type {number} - * @memberof ResponseOBClusterOverview + * @memberof ResponseConfigurableInfo */ - 'createTime': number; + 'odcURL': string; +} +/** + * + * @export + * @interface ResponseContainerInfo + */ +export interface ResponseContainerInfo { /** * * @type {string} - * @memberof ResponseOBClusterOverview + * @memberof ResponseContainerInfo */ 'image': string; /** * - * @type {CommonClusterMode} - * @memberof ResponseOBClusterOverview + * @type {CommonResourceSpec} + * @memberof ResponseContainerInfo */ - 'mode': CommonClusterMode; + 'limits': CommonResourceSpec; /** * * @type {string} - * @memberof ResponseOBClusterOverview + * @memberof ResponseContainerInfo */ 'name': string; /** * - * @type {string} - * @memberof ResponseOBClusterOverview + * @type {Array} + * @memberof ResponseContainerInfo */ - 'namespace': string; + 'ports': Array; /** * - * @type {string} - * @memberof ResponseOBClusterOverview + * @type {boolean} + * @memberof ResponseContainerInfo */ - 'status': string; + 'ready': boolean; /** * - * @type {string} - * @memberof ResponseOBClusterOverview + * @type {CommonResourceSpec} + * @memberof ResponseContainerInfo */ - 'statusDetail': string; + 'requests': CommonResourceSpec; /** * - * @type {Array} - * @memberof ResponseOBClusterOverview + * @type {number} + * @memberof ResponseContainerInfo */ - 'topology': Array; + 'restartCount': number; /** * * @type {string} - * @memberof ResponseOBClusterOverview + * @memberof ResponseContainerInfo */ - 'uid': string; + 'startTime': string; } - - /** * * @export - * @interface ResponseOBClusterResources + * @interface ResponseDashboardInfo */ -export interface ResponseOBClusterResources { +export interface ResponseDashboardInfo { /** * - * @type {number} - * @memberof ResponseOBClusterResources + * @type {string} + * @memberof ResponseDashboardInfo */ - 'minPoolMemory': number; + 'appName': string; /** * - * @type {Array} - * @memberof ResponseOBClusterResources + * @type {ResponseConfigurableInfo} + * @memberof ResponseDashboardInfo */ - 'obServerResources'?: Array; + 'configurableInfo': ResponseConfigurableInfo; /** * - * @type {{ [key: string]: ResponseOBZoneAvailableResource; }} - * @memberof ResponseOBClusterResources + * @type {string} + * @memberof ResponseDashboardInfo */ - 'obZoneResourceMap'?: { [key: string]: ResponseOBZoneAvailableResource; }; + 'publicKey': string; + /** + * + * @type {string} + * @memberof ResponseDashboardInfo + */ + 'reportHost': string; + /** + * + * @type {boolean} + * @memberof ResponseDashboardInfo + */ + 'reportStatistics': boolean; + /** + * + * @type {string} + * @memberof ResponseDashboardInfo + */ + 'version': string; } /** * * @export - * @interface ResponseOBClusterStatistic + * @interface ResponseK8sEvent */ -export interface ResponseOBClusterStatistic { +export interface ResponseK8sEvent { /** * * @type {number} - * @memberof ResponseOBClusterStatistic + * @memberof ResponseK8sEvent */ 'count': number; /** * - * @type {string} - * @memberof ResponseOBClusterStatistic + * @type {number} + * @memberof ResponseK8sEvent */ - 'status': string; -} -/** - * - * @export - * @interface ResponseOBConnection - */ -export interface ResponseOBConnection { + 'firstOccur': number; /** * - * @type {string} - * @memberof ResponseOBConnection + * @type {number} + * @memberof ResponseK8sEvent */ - 'clientIp'?: string; + 'lastSeen': number; /** * * @type {string} - * @memberof ResponseOBConnection + * @memberof ResponseK8sEvent */ - 'cluster'?: string; + 'message': string; /** * * @type {string} - * @memberof ResponseOBConnection + * @memberof ResponseK8sEvent */ - 'namespace'?: string; + 'namespace': string; /** * * @type {string} - * @memberof ResponseOBConnection + * @memberof ResponseK8sEvent */ - 'odcConnectionURL'?: string; + 'object': string; /** * * @type {string} - * @memberof ResponseOBConnection + * @memberof ResponseK8sEvent */ - 'pod'?: string; + 'reason': string; /** * * @type {string} - * @memberof ResponseOBConnection + * @memberof ResponseK8sEvent */ - 'tenant'?: string; + 'type': string; +} +/** + * + * @export + * @interface ResponseK8sNode + */ +export interface ResponseK8sNode { /** * - * @type {string} - * @memberof ResponseOBConnection + * @type {ResponseK8sNodeInfo} + * @memberof ResponseK8sNode */ - 'terminalId'?: string; + 'info'?: ResponseK8sNodeInfo; /** * - * @type {string} - * @memberof ResponseOBConnection + * @type {ResponseK8sNodeResource} + * @memberof ResponseK8sNode */ - 'user'?: string; + 'resource'?: ResponseK8sNodeResource; } /** * * @export - * @interface ResponseOBMetrics + * @interface ResponseK8sNodeCondition */ -export interface ResponseOBMetrics { +export interface ResponseK8sNodeCondition { /** * - * @type {number} - * @memberof ResponseOBMetrics + * @type {string} + * @memberof ResponseK8sNodeCondition */ - 'cpuPercent': number; + 'message': string; /** * - * @type {number} - * @memberof ResponseOBMetrics + * @type {string} + * @memberof ResponseK8sNodeCondition */ - 'diskPercent': number; + 'reason': string; /** * - * @type {number} - * @memberof ResponseOBMetrics + * @type {string} + * @memberof ResponseK8sNodeCondition */ - 'memoryPercent': number; + 'type': string; } /** * * @export - * @interface ResponseOBServer + * @interface ResponseK8sNodeInfo */ -export interface ResponseOBServer { +export interface ResponseK8sNodeInfo { + /** + * + * @type {Array} + * @memberof ResponseK8sNodeInfo + */ + 'conditions': Array; /** * * @type {string} - * @memberof ResponseOBServer + * @memberof ResponseK8sNodeInfo */ - 'address': string; + 'cri': string; /** * - * @type {ResponseOBMetrics} - * @memberof ResponseOBServer + * @type {string} + * @memberof ResponseK8sNodeInfo */ - 'metrics'?: ResponseOBMetrics; + 'externalIP': string; /** * * @type {string} - * @memberof ResponseOBServer + * @memberof ResponseK8sNodeInfo + */ + 'internalIP': string; + /** + * + * @type {string} + * @memberof ResponseK8sNodeInfo + */ + 'kernel': string; + /** + * + * @type {Array} + * @memberof ResponseK8sNodeInfo + */ + 'labels': Array; + /** + * + * @type {string} + * @memberof ResponseK8sNodeInfo */ 'name': string; /** * * @type {string} - * @memberof ResponseOBServer + * @memberof ResponseK8sNodeInfo */ - 'namespace': string; + 'os': string; + /** + * + * @type {Array} + * @memberof ResponseK8sNodeInfo + */ + 'roles': Array; /** * * @type {string} - * @memberof ResponseOBServer + * @memberof ResponseK8sNodeInfo */ 'status': string; + /** + * + * @type {number} + * @memberof ResponseK8sNodeInfo + */ + 'uptime': number; /** * * @type {string} - * @memberof ResponseOBServer + * @memberof ResponseK8sNodeInfo */ - 'statusDetail': string; + 'version': string; } /** * * @export - * @interface ResponseOBServerAvailableResource + * @interface ResponseK8sNodeResource */ -export interface ResponseOBServerAvailableResource { +export interface ResponseK8sNodeResource { /** * * @type {number} - * @memberof ResponseOBServerAvailableResource + * @memberof ResponseK8sNodeResource */ - 'availableCPU': number; + 'cpuFree': number; /** * * @type {number} - * @memberof ResponseOBServerAvailableResource + * @memberof ResponseK8sNodeResource */ - 'availableDataDisk': number; + 'cpuTotal': number; /** * * @type {number} - * @memberof ResponseOBServerAvailableResource + * @memberof ResponseK8sNodeResource */ - 'availableLogDisk': number; + 'cpuUsed': number; /** * * @type {number} - * @memberof ResponseOBServerAvailableResource - */ - 'availableMemory': number; - /** - * - * @type {string} - * @memberof ResponseOBServerAvailableResource + * @memberof ResponseK8sNodeResource */ - 'obServerIP': string; + 'memoryFree': number; /** * - * @type {string} - * @memberof ResponseOBServerAvailableResource + * @type {number} + * @memberof ResponseK8sNodeResource */ - 'obZone': string; + 'memoryTotal': number; /** * * @type {number} - * @memberof ResponseOBServerAvailableResource + * @memberof ResponseK8sNodeResource */ - 'serverCount': number; + 'memoryUsed': number; } /** * * @export - * @interface ResponseOBServerStorage + * @interface ResponseK8sPodInfo */ -export interface ResponseOBServerStorage { +export interface ResponseK8sPodInfo { /** * - * @type {ResponseStorageSpec} - * @memberof ResponseOBServerStorage + * @type {Array} + * @memberof ResponseK8sPodInfo */ - 'dataStorage': ResponseStorageSpec; + 'containers': Array; /** * - * @type {ResponseStorageSpec} - * @memberof ResponseOBServerStorage + * @type {string} + * @memberof ResponseK8sPodInfo */ - 'redoLogStorage': ResponseStorageSpec; + 'message': string; /** * - * @type {ResponseStorageSpec} - * @memberof ResponseOBServerStorage + * @type {string} + * @memberof ResponseK8sPodInfo */ - 'sysLogStorage': ResponseStorageSpec; -} -/** - * - * @export - * @interface ResponseOBTenantDetail - */ -export interface ResponseOBTenantDetail { + 'name': string; /** - * Charset of the tenant + * * @type {string} - * @memberof ResponseOBTenantDetail + * @memberof ResponseK8sPodInfo */ - 'charset': string; + 'namespace': string; /** - * Name of the cluster belonging to + * * @type {string} - * @memberof ResponseOBTenantDetail + * @memberof ResponseK8sPodInfo */ - 'clusterResourceName': string; + 'nodeName': string; /** - * Creation time of the tenant + * * @type {string} - * @memberof ResponseOBTenantDetail + * @memberof ResponseK8sPodInfo */ - 'createTime': string; + 'podIP': string; /** - * Locality of the tenant units + * * @type {string} - * @memberof ResponseOBTenantDetail + * @memberof ResponseK8sPodInfo */ - 'locality': string; + 'reason': string; /** - * Name of the resource + * * @type {string} - * @memberof ResponseOBTenantDetail + * @memberof ResponseK8sPodInfo */ - 'name': string; + 'startTime': string; /** - * Namespace of the resource + * * @type {string} - * @memberof ResponseOBTenantDetail + * @memberof ResponseK8sPodInfo */ - 'namespace': string; + 'status': string; +} +/** + * + * @export + * @interface ResponseK8sService + */ +export interface ResponseK8sService { /** * * @type {string} - * @memberof ResponseOBTenantDetail + * @memberof ResponseK8sService */ - 'primaryTenant'?: string; + 'clusterIP': string; /** - * Primary zone of the tenant + * * @type {string} - * @memberof ResponseOBTenantDetail + * @memberof ResponseK8sService */ - 'primaryZone': string; + 'externalIP'?: string; /** * - * @type {ResponseRestoreSource} - * @memberof ResponseOBTenantDetail + * @type {string} + * @memberof ResponseK8sService */ - 'restoreSource'?: ResponseRestoreSource; + 'name': string; /** * * @type {string} - * @memberof ResponseOBTenantDetail + * @memberof ResponseK8sService */ - 'rootCredential'?: string; + 'namespace': string; /** * - * @type {string} - * @memberof ResponseOBTenantDetail + * @type {Array} + * @memberof ResponseK8sService */ - 'standbyROCredential'?: string; + 'ports': Array; /** - * Status of the tenant + * * @type {string} - * @memberof ResponseOBTenantDetail + * @memberof ResponseK8sService */ - 'status': string; + 'type': string; +} +/** + * + * @export + * @interface ResponseK8sServicePort + */ +export interface ResponseK8sServicePort { /** - * Name of the tenant in the database + * * @type {string} - * @memberof ResponseOBTenantDetail + * @memberof ResponseK8sServicePort */ - 'tenantName': string; + 'name'?: string; /** - * Enum: Primary, Standby - * @type {string} - * @memberof ResponseOBTenantDetail + * + * @type {number} + * @memberof ResponseK8sServicePort */ - 'tenantRole': string; + 'nodePort'?: number; /** - * Topology of the tenant - * @type {Array} - * @memberof ResponseOBTenantDetail + * + * @type {number} + * @memberof ResponseK8sServicePort */ - 'topology'?: Array; + 'port': number; /** - * Unique identifier of the resource - * @type {string} - * @memberof ResponseOBTenantDetail + * + * @type {number} + * @memberof ResponseK8sServicePort */ - 'uid': string; + 'targetPort': number; +} +/** + * + * @export + * @interface ResponseMetric + */ +export interface ResponseMetric { /** - * Number of units in every zone - * @type {number} - * @memberof ResponseOBTenantDetail + * + * @type {Array} + * @memberof ResponseMetric */ - 'unitNumber': number; + 'labels'?: Array; /** * * @type {string} - * @memberof ResponseOBTenantDetail + * @memberof ResponseMetric */ - 'version'?: string; + 'name'?: string; } /** - * Brief information about OBTenant + * * @export - * @interface ResponseOBTenantOverview + * @interface ResponseMetricClass */ -export interface ResponseOBTenantOverview { +export interface ResponseMetricClass { /** - * Charset of the tenant + * * @type {string} - * @memberof ResponseOBTenantOverview + * @memberof ResponseMetricClass */ - 'charset': string; + 'description': string; /** - * Name of the cluster belonging to - * @type {string} - * @memberof ResponseOBTenantOverview + * + * @type {Array} + * @memberof ResponseMetricClass */ - 'clusterResourceName': string; + 'metricGroups': Array; /** - * Creation time of the tenant + * * @type {string} - * @memberof ResponseOBTenantOverview + * @memberof ResponseMetricClass */ - 'createTime': string; + 'name': string; +} +/** + * + * @export + * @interface ResponseMetricData + */ +export interface ResponseMetricData { /** - * Locality of the tenant units - * @type {string} - * @memberof ResponseOBTenantOverview + * + * @type {ResponseMetric} + * @memberof ResponseMetricData */ - 'locality': string; + 'metric': ResponseMetric; /** - * Name of the resource - * @type {string} - * @memberof ResponseOBTenantOverview + * + * @type {Array} + * @memberof ResponseMetricData */ - 'name': string; + 'values': Array; +} +/** + * + * @export + * @interface ResponseMetricGroup + */ +export interface ResponseMetricGroup { /** - * Namespace of the resource + * * @type {string} - * @memberof ResponseOBTenantOverview + * @memberof ResponseMetricGroup */ - 'namespace': string; + 'description': string; /** - * Primary zone of the tenant - * @type {string} - * @memberof ResponseOBTenantOverview + * + * @type {Array} + * @memberof ResponseMetricGroup */ - 'primaryZone': string; + 'metrics': Array; /** - * Status of the tenant + * * @type {string} - * @memberof ResponseOBTenantOverview + * @memberof ResponseMetricGroup */ - 'status': string; + 'name': string; +} +/** + * + * @export + * @interface ResponseMetricMeta + */ +export interface ResponseMetricMeta { /** - * Name of the tenant in the database + * * @type {string} - * @memberof ResponseOBTenantOverview + * @memberof ResponseMetricMeta */ - 'tenantName': string; + 'description': string; /** - * Enum: Primary, Standby + * * @type {string} - * @memberof ResponseOBTenantOverview - */ - 'tenantRole': string; - /** - * Topology of the tenant - * @type {Array} - * @memberof ResponseOBTenantOverview + * @memberof ResponseMetricMeta */ - 'topology'?: Array; + 'key': string; /** - * Unique identifier of the resource + * * @type {string} - * @memberof ResponseOBTenantOverview + * @memberof ResponseMetricMeta */ - 'uid': string; + 'name': string; /** - * Number of units in every zone - * @type {number} - * @memberof ResponseOBTenantOverview + * + * @type {string} + * @memberof ResponseMetricMeta */ - 'unitNumber': number; + 'unit': string; } /** * * @export - * @interface ResponseOBTenantReplica + * @interface ResponseMetricValue */ -export interface ResponseOBTenantReplica { +export interface ResponseMetricValue { /** * * @type {number} - * @memberof ResponseOBTenantReplica + * @memberof ResponseMetricValue */ - 'iopsWeight': number; + 'timestamp': number; /** * * @type {number} - * @memberof ResponseOBTenantReplica + * @memberof ResponseMetricValue */ - 'logDiskSize': number; + 'value': number; +} +/** + * + * @export + * @interface ResponseMonitorSpec + */ +export interface ResponseMonitorSpec { /** * - * @type {number} - * @memberof ResponseOBTenantReplica + * @type {string} + * @memberof ResponseMonitorSpec */ - 'maxCPU': number; - /** - * - * @type {number} - * @memberof ResponseOBTenantReplica - */ - 'maxIops': number; - /** - * - * @type {number} - * @memberof ResponseOBTenantReplica - */ - 'memorySize': number; - /** - * - * @type {number} - * @memberof ResponseOBTenantReplica - */ - 'minCPU': number; + 'image': string; /** * - * @type {number} - * @memberof ResponseOBTenantReplica + * @type {ResponseResourceSpecRender} + * @memberof ResponseMonitorSpec */ - 'minIops': number; + 'resource': ResponseResourceSpecRender; +} +/** + * + * @export + * @interface ResponseNFSVolumeSpec + */ +export interface ResponseNFSVolumeSpec { /** * - * @type {number} - * @memberof ResponseOBTenantReplica - */ - 'priority': number; - /** - * Enum: Readonly, Full * @type {string} - * @memberof ResponseOBTenantReplica + * @memberof ResponseNFSVolumeSpec */ - 'type': string; + 'address': string; /** * * @type {string} - * @memberof ResponseOBTenantReplica + * @memberof ResponseNFSVolumeSpec */ - 'zone': string; + 'path': string; } /** * * @export - * @interface ResponseOBTenantStatistic + * @interface ResponseNamespace */ -export interface ResponseOBTenantStatistic { +export interface ResponseNamespace { /** * - * @type {number} - * @memberof ResponseOBTenantStatistic + * @type {string} + * @memberof ResponseNamespace */ - 'count': number; + 'namespace': string; /** * * @type {string} - * @memberof ResponseOBTenantStatistic + * @memberof ResponseNamespace */ 'status': string; } /** * * @export - * @interface ResponseOBZone + * @interface ResponseOBCluster */ -export interface ResponseOBZone { +export interface ResponseOBCluster { /** * - * @type {Array} - * @memberof ResponseOBZone + * @type {ResponseNFSVolumeSpec} + * @memberof ResponseOBCluster */ - 'affinities'?: Array; + 'backupVolume'?: ResponseNFSVolumeSpec; /** * - * @type {string} - * @memberof ResponseOBZone + * @type {number} + * @memberof ResponseOBCluster */ - 'name': string; + 'clusterId': number; /** * * @type {string} - * @memberof ResponseOBZone + * @memberof ResponseOBCluster */ - 'namespace': string; + 'clusterName': string; /** * - * @type {Array} - * @memberof ResponseOBZone + * @type {number} + * @memberof ResponseOBCluster */ - 'nodeSelector'?: Array; + 'createTime': number; /** * - * @type {Array} - * @memberof ResponseOBZone + * @type {string} + * @memberof ResponseOBCluster */ - 'observers'?: Array; + 'image': string; /** * - * @type {number} - * @memberof ResponseOBZone + * @type {ResponseOBMetrics} + * @memberof ResponseOBCluster */ - 'replicas': number; + 'metrics'?: ResponseOBMetrics; /** * - * @type {string} - * @memberof ResponseOBZone + * @type {CommonClusterMode} + * @memberof ResponseOBCluster */ - 'rootService'?: string; + 'mode': CommonClusterMode; /** * - * @type {string} - * @memberof ResponseOBZone + * @type {ResponseMonitorSpec} + * @memberof ResponseOBCluster */ - 'status': string; + 'monitor'?: ResponseMonitorSpec; /** * * @type {string} - * @memberof ResponseOBZone + * @memberof ResponseOBCluster */ - 'statusDetail': string; + 'name': string; /** * - * @type {Array} - * @memberof ResponseOBZone + * @type {string} + * @memberof ResponseOBCluster */ - 'tolerations'?: Array; + 'namespace': string; /** * - * @type {string} - * @memberof ResponseOBZone + * @type {Array} + * @memberof ResponseOBCluster */ - 'zone': string; -} -/** - * - * @export - * @interface ResponseOBZoneAvailableResource - */ -export interface ResponseOBZoneAvailableResource { + 'parameters': Array; /** * - * @type {number} - * @memberof ResponseOBZoneAvailableResource + * @type {ResponseResourceSpecRender} + * @memberof ResponseOBCluster */ - 'availableCPU': number; + 'resource': ResponseResourceSpecRender; /** * - * @type {number} - * @memberof ResponseOBZoneAvailableResource + * @type {string} + * @memberof ResponseOBCluster */ - 'availableDataDisk': number; + 'rootPasswordSecret': string; /** * - * @type {number} - * @memberof ResponseOBZoneAvailableResource + * @type {string} + * @memberof ResponseOBCluster */ - 'availableLogDisk': number; + 'status': string; /** * - * @type {number} - * @memberof ResponseOBZoneAvailableResource + * @type {string} + * @memberof ResponseOBCluster */ - 'availableMemory': number; + 'statusDetail': string; /** * - * @type {string} - * @memberof ResponseOBZoneAvailableResource + * @type {ResponseOBServerStorage} + * @memberof ResponseOBCluster */ - 'obZone': string; + 'storage': ResponseOBServerStorage; /** * - * @type {number} - * @memberof ResponseOBZoneAvailableResource + * @type {Array} + * @memberof ResponseOBCluster */ - 'serverCount': number; -} -/** - * - * @export - * @interface ResponseResourceSpecRender - */ -export interface ResponseResourceSpecRender { + 'topology': Array; /** * - * @type {number} - * @memberof ResponseResourceSpecRender + * @type {string} + * @memberof ResponseOBCluster */ - 'cpu': number; + 'uid': string; /** * - * @type {number} - * @memberof ResponseResourceSpecRender + * @type {string} + * @memberof ResponseOBCluster */ - 'memory': number; + 'version'?: string; } + + /** * * @export - * @interface ResponseRestoreSource + * @interface ResponseOBClusterMeta */ -export interface ResponseRestoreSource { +export interface ResponseOBClusterMeta { /** * - * @type {string} - * @memberof ResponseRestoreSource + * @type {number} + * @memberof ResponseOBClusterMeta */ - 'archiveSource': string; + 'clusterId': number; /** * * @type {string} - * @memberof ResponseRestoreSource + * @memberof ResponseOBClusterMeta */ - 'bakDataSource': string; + 'clusterName': string; /** * - * @type {string} - * @memberof ResponseRestoreSource + * @type {CommonClusterMode} + * @memberof ResponseOBClusterMeta */ - 'bakEncryptionSecret'?: string; + 'mode': CommonClusterMode; /** * * @type {string} - * @memberof ResponseRestoreSource + * @memberof ResponseOBClusterMeta */ - 'ossAccessSecret'?: string; + 'name': string; /** - * Enum: OSS, NFS + * * @type {string} - * @memberof ResponseRestoreSource + * @memberof ResponseOBClusterMeta */ - 'type': string; + 'namespace': string; /** * * @type {string} - * @memberof ResponseRestoreSource + * @memberof ResponseOBClusterMeta */ - 'until'?: string; + 'uid': string; } + + /** * * @export - * @interface ResponseStatisticData + * @interface ResponseOBClusterOverview */ -export interface ResponseStatisticData { +export interface ResponseOBClusterOverview { /** * - * @type {Array} - * @memberof ResponseStatisticData + * @type {number} + * @memberof ResponseOBClusterOverview */ - 'backupPolicies': Array; + 'clusterId': number; /** * - * @type {Array} - * @memberof ResponseStatisticData + * @type {string} + * @memberof ResponseOBClusterOverview */ - 'clusters': Array; + 'clusterName': string; /** * - * @type {Array} - * @memberof ResponseStatisticData + * @type {number} + * @memberof ResponseOBClusterOverview */ - 'k8sNodes': Array; + 'createTime': number; /** * * @type {string} - * @memberof ResponseStatisticData + * @memberof ResponseOBClusterOverview */ - 'operatorVersion'?: string; + 'image': string; /** * - * @type {Array} - * @memberof ResponseStatisticData + * @type {CommonClusterMode} + * @memberof ResponseOBClusterOverview */ - 'servers': Array; + 'mode': CommonClusterMode; /** * - * @type {Array} - * @memberof ResponseStatisticData + * @type {string} + * @memberof ResponseOBClusterOverview */ - 'tenants': Array; + 'name': string; /** * - * @type {Array} - * @memberof ResponseStatisticData - */ - 'warningEvents': Array; - /** - * - * @type {Array} - * @memberof ResponseStatisticData + * @type {string} + * @memberof ResponseOBClusterOverview */ - 'zones': Array; -} -/** - * - * @export - * @interface ResponseStorageClass - */ -export interface ResponseStorageClass { + 'namespace': string; /** * - * @type {boolean} - * @memberof ResponseStorageClass + * @type {string} + * @memberof ResponseOBClusterOverview */ - 'allowVolumeExpansion': boolean; + 'status': string; /** * - * @type {Array} - * @memberof ResponseStorageClass + * @type {string} + * @memberof ResponseOBClusterOverview */ - 'mountOptions'?: Array; + 'statusDetail': string; /** * - * @type {string} - * @memberof ResponseStorageClass + * @type {Array} + * @memberof ResponseOBClusterOverview */ - 'name': string; + 'topology': Array; /** * - * @type {Array} - * @memberof ResponseStorageClass + * @type {string} + * @memberof ResponseOBClusterOverview */ - 'parameters'?: Array; + 'uid': string; +} + + +/** + * + * @export + * @interface ResponseOBClusterResources + */ +export interface ResponseOBClusterResources { /** * - * @type {string} - * @memberof ResponseStorageClass + * @type {number} + * @memberof ResponseOBClusterResources */ - 'provisioner': string; + 'minPoolMemory': number; /** * - * @type {string} - * @memberof ResponseStorageClass + * @type {Array} + * @memberof ResponseOBClusterResources */ - 'reclaimPolicy': string; + 'obServerResources'?: Array; /** * - * @type {string} - * @memberof ResponseStorageClass + * @type {{ [key: string]: ResponseOBZoneAvailableResource; }} + * @memberof ResponseOBClusterResources */ - 'volumeBindingMode': string; + 'obZoneResourceMap'?: { [key: string]: ResponseOBZoneAvailableResource; }; } /** * * @export - * @interface ResponseStorageSpec + * @interface ResponseOBClusterStatistic */ -export interface ResponseStorageSpec { +export interface ResponseOBClusterStatistic { /** * * @type {number} - * @memberof ResponseStorageSpec + * @memberof ResponseOBClusterStatistic */ - 'size': number; + 'count': number; /** * * @type {string} - * @memberof ResponseStorageSpec + * @memberof ResponseOBClusterStatistic */ - 'storageClass': string; + 'status': string; } /** * * @export - * @interface RouteRouteParam + * @interface ResponseOBConnection */ -export interface RouteRouteParam { +export interface ResponseOBConnection { /** * - * @type {Array} - * @memberof RouteRouteParam + * @type {string} + * @memberof ResponseOBConnection */ - 'aggregateLabels': Array; + 'clientIp'?: string; /** * - * @type {number} - * @memberof RouteRouteParam + * @type {string} + * @memberof ResponseOBConnection */ - 'groupInterval': number; + 'cluster'?: string; /** * - * @type {number} - * @memberof RouteRouteParam + * @type {string} + * @memberof ResponseOBConnection */ - 'groupWait': number; + 'namespace'?: string; /** * * @type {string} - * @memberof RouteRouteParam + * @memberof ResponseOBConnection */ - 'id'?: string; + 'odcConnectionURL'?: string; /** * - * @type {Array} - * @memberof RouteRouteParam + * @type {string} + * @memberof ResponseOBConnection */ - 'matchers': Array; + 'pod'?: string; /** * * @type {string} - * @memberof RouteRouteParam + * @memberof ResponseOBConnection */ - 'receiver': string; + 'tenant'?: string; /** * - * @type {number} - * @memberof RouteRouteParam + * @type {string} + * @memberof ResponseOBConnection */ - 'repeatInterval': number; + 'terminalId'?: string; + /** + * + * @type {string} + * @memberof ResponseOBConnection + */ + 'user'?: string; } /** * * @export - * @interface RouteRouteResponse + * @interface ResponseOBMetrics */ -export interface RouteRouteResponse { +export interface ResponseOBMetrics { /** * - * @type {Array} - * @memberof RouteRouteResponse + * @type {number} + * @memberof ResponseOBMetrics */ - 'aggregateLabels': Array; + 'cpuPercent': number; /** * * @type {number} - * @memberof RouteRouteResponse + * @memberof ResponseOBMetrics */ - 'groupInterval': number; + 'diskPercent': number; /** * * @type {number} - * @memberof RouteRouteResponse + * @memberof ResponseOBMetrics */ - 'groupWait': number; + 'memoryPercent': number; +} +/** + * + * @export + * @interface ResponseOBServer + */ +export interface ResponseOBServer { /** * * @type {string} - * @memberof RouteRouteResponse + * @memberof ResponseOBServer */ - 'id': string; + 'address': string; /** * - * @type {Array} - * @memberof RouteRouteResponse + * @type {ResponseOBMetrics} + * @memberof ResponseOBServer */ - 'matchers': Array; + 'metrics'?: ResponseOBMetrics; /** * * @type {string} - * @memberof RouteRouteResponse + * @memberof ResponseOBServer */ - 'receiver': string; + 'name': string; /** * - * @type {number} - * @memberof RouteRouteResponse + * @type {string} + * @memberof ResponseOBServer */ - 'repeatInterval': number; -} -/** - * - * @export - * @interface RuleRule - */ -export interface RuleRule { + 'namespace': string; /** * * @type {string} - * @memberof RuleRule + * @memberof ResponseOBServer */ - 'description': string; + 'status': string; /** * - * @type {number} - * @memberof RuleRule + * @type {string} + * @memberof ResponseOBServer */ - 'duration': number; + 'statusDetail': string; +} +/** + * + * @export + * @interface ResponseOBServerAvailableResource + */ +export interface ResponseOBServerAvailableResource { /** * - * @type {OceanbaseOBInstanceType} - * @memberof RuleRule + * @type {number} + * @memberof ResponseOBServerAvailableResource */ - 'instanceType': OceanbaseOBInstanceType; + 'availableCPU': number; /** * - * @type {Array} - * @memberof RuleRule + * @type {number} + * @memberof ResponseOBServerAvailableResource */ - 'labels': Array; + 'availableDataDisk': number; /** * - * @type {string} - * @memberof RuleRule + * @type {number} + * @memberof ResponseOBServerAvailableResource */ - 'name': string; + 'availableLogDisk': number; /** * - * @type {string} - * @memberof RuleRule + * @type {number} + * @memberof ResponseOBServerAvailableResource */ - 'query': string; + 'availableMemory': number; /** * - * @type {AlarmSeverity} - * @memberof RuleRule + * @type {string} + * @memberof ResponseOBServerAvailableResource */ - 'severity': AlarmSeverity; + 'obServerIP': string; /** * * @type {string} - * @memberof RuleRule + * @memberof ResponseOBServerAvailableResource */ - 'summary': string; + 'obZone': string; /** * - * @type {RuleRuleType} - * @memberof RuleRule + * @type {number} + * @memberof ResponseOBServerAvailableResource */ - 'type'?: RuleRuleType; + 'serverCount': number; } - - /** * * @export - * @interface RuleRuleFilter + * @interface ResponseOBServerStorage */ -export interface RuleRuleFilter { +export interface ResponseOBServerStorage { /** * - * @type {OceanbaseOBInstanceType} - * @memberof RuleRuleFilter + * @type {ResponseStorageSpec} + * @memberof ResponseOBServerStorage */ - 'instanceType'?: OceanbaseOBInstanceType; + 'dataStorage': ResponseStorageSpec; /** * - * @type {string} - * @memberof RuleRuleFilter + * @type {ResponseStorageSpec} + * @memberof ResponseOBServerStorage */ - 'keyword'?: string; + 'redoLogStorage': ResponseStorageSpec; /** * - * @type {AlarmSeverity} - * @memberof RuleRuleFilter + * @type {ResponseStorageSpec} + * @memberof ResponseOBServerStorage */ - 'severity'?: AlarmSeverity; + 'sysLogStorage': ResponseStorageSpec; } - - -/** - * - * @export - * @enum {string} - */ - -export const RuleRuleHealth = { - HealthUnknown: 'unknown', - HealthOK: 'ok', - HealthError: 'error' -} as const; - -export type RuleRuleHealth = typeof RuleRuleHealth[keyof typeof RuleRuleHealth]; - - /** * * @export - * @interface RuleRuleResponse + * @interface ResponseOBTenantDetail */ -export interface RuleRuleResponse { +export interface ResponseOBTenantDetail { /** - * + * Charset of the tenant * @type {string} - * @memberof RuleRuleResponse + * @memberof ResponseOBTenantDetail */ - 'description': string; + 'charset': string; /** - * - * @type {number} - * @memberof RuleRuleResponse + * Name of the cluster belonging to + * @type {string} + * @memberof ResponseOBTenantDetail */ - 'duration': number; + 'clusterResourceName': string; /** - * - * @type {number} - * @memberof RuleRuleResponse + * Creation time of the tenant + * @type {string} + * @memberof ResponseOBTenantDetail */ - 'evaluationTime': number; + 'createTime': string; /** - * - * @type {RuleRuleHealth} - * @memberof RuleRuleResponse + * Locality of the tenant units + * @type {string} + * @memberof ResponseOBTenantDetail */ - 'health': RuleRuleHealth; + 'locality': string; /** - * - * @type {OceanbaseOBInstanceType} - * @memberof RuleRuleResponse + * Name of the resource + * @type {string} + * @memberof ResponseOBTenantDetail */ - 'instanceType': OceanbaseOBInstanceType; + 'name': string; /** - * - * @type {number} - * @memberof RuleRuleResponse + * Namespace of the resource + * @type {string} + * @memberof ResponseOBTenantDetail */ - 'keepFiringFor': number; + 'namespace': string; /** * - * @type {Array} - * @memberof RuleRuleResponse + * @type {string} + * @memberof ResponseOBTenantDetail */ - 'labels': Array; + 'primaryTenant'?: string; /** - * + * Primary zone of the tenant * @type {string} - * @memberof RuleRuleResponse + * @memberof ResponseOBTenantDetail */ - 'lastError'?: string; + 'primaryZone': string; /** * - * @type {number} - * @memberof RuleRuleResponse + * @type {ResponseRestoreSource} + * @memberof ResponseOBTenantDetail */ - 'lastEvaluation': number; + 'restoreSource'?: ResponseRestoreSource; /** * * @type {string} - * @memberof RuleRuleResponse + * @memberof ResponseOBTenantDetail */ - 'name': string; + 'rootCredential'?: string; /** * * @type {string} - * @memberof RuleRuleResponse + * @memberof ResponseOBTenantDetail */ - 'query': string; + 'standbyROCredential'?: string; /** - * - * @type {AlarmSeverity} - * @memberof RuleRuleResponse + * Status of the tenant + * @type {string} + * @memberof ResponseOBTenantDetail */ - 'severity': AlarmSeverity; + 'status': string; /** - * - * @type {RuleRuleState} - * @memberof RuleRuleResponse + * Name of the tenant in the database + * @type {string} + * @memberof ResponseOBTenantDetail */ - 'state': RuleRuleState; + 'tenantName': string; /** - * + * Enum: Primary, Standby * @type {string} - * @memberof RuleRuleResponse + * @memberof ResponseOBTenantDetail */ - 'summary': string; + 'tenantRole': string; /** - * - * @type {RuleRuleType} - * @memberof RuleRuleResponse + * Topology of the tenant + * @type {Array} + * @memberof ResponseOBTenantDetail */ - 'type'?: RuleRuleType; -} - - -/** - * - * @export - * @enum {string} - */ - -export const RuleRuleState = { - StateActive: 'active', - StateInactive: 'inactive' -} as const; - -export type RuleRuleState = typeof RuleRuleState[keyof typeof RuleRuleState]; - - -/** - * - * @export - * @enum {string} - */ - -export const RuleRuleType = { - TypeBuiltin: 'builtin', - TypeCustomized: 'customized' -} as const; - -export type RuleRuleType = typeof RuleRuleType[keyof typeof RuleRuleType]; - - -/** - * - * @export - * @interface SilenceSilencerFilter - */ -export interface SilenceSilencerFilter { + 'topology'?: Array; /** - * - * @type {OceanbaseOBInstance} - * @memberof SilenceSilencerFilter + * Unique identifier of the resource + * @type {string} + * @memberof ResponseOBTenantDetail */ - 'instance'?: OceanbaseOBInstance; + 'uid': string; /** - * - * @type {OceanbaseOBInstanceType} - * @memberof SilenceSilencerFilter + * Number of units in every zone + * @type {number} + * @memberof ResponseOBTenantDetail */ - 'instanceType'?: OceanbaseOBInstanceType; + 'unitNumber': number; /** * * @type {string} - * @memberof SilenceSilencerFilter + * @memberof ResponseOBTenantDetail */ - 'keyword'?: string; + 'version'?: string; } - - /** - * + * Brief information about OBTenant * @export - * @interface SilenceSilencerParam + * @interface ResponseOBTenantOverview */ -export interface SilenceSilencerParam { +export interface ResponseOBTenantOverview { /** - * + * Charset of the tenant * @type {string} - * @memberof SilenceSilencerParam + * @memberof ResponseOBTenantOverview */ - 'comment': string; + 'charset': string; /** - * + * Name of the cluster belonging to * @type {string} - * @memberof SilenceSilencerParam + * @memberof ResponseOBTenantOverview */ - 'createdBy': string; + 'clusterResourceName': string; /** - * - * @type {number} - * @memberof SilenceSilencerParam + * Creation time of the tenant + * @type {string} + * @memberof ResponseOBTenantOverview */ - 'endsAt': number; + 'createTime': string; /** - * + * Locality of the tenant units * @type {string} - * @memberof SilenceSilencerParam + * @memberof ResponseOBTenantOverview */ - 'id'?: string; + 'locality': string; /** - * - * @type {Array} - * @memberof SilenceSilencerParam + * Name of the resource + * @type {string} + * @memberof ResponseOBTenantOverview */ - 'instances': Array; + 'name': string; /** - * - * @type {Array} - * @memberof SilenceSilencerParam + * Namespace of the resource + * @type {string} + * @memberof ResponseOBTenantOverview */ - 'matchers': Array; + 'namespace': string; /** - * - * @type {Array} - * @memberof SilenceSilencerParam + * Primary zone of the tenant + * @type {string} + * @memberof ResponseOBTenantOverview */ - 'rules': Array; + 'primaryZone': string; /** - * - * @type {number} - * @memberof SilenceSilencerParam + * Status of the tenant + * @type {string} + * @memberof ResponseOBTenantOverview */ - 'startsAt': number; -} -/** - * - * @export - * @interface SilenceSilencerResponse - */ -export interface SilenceSilencerResponse { + 'status': string; + /** + * Name of the tenant in the database + * @type {string} + * @memberof ResponseOBTenantOverview + */ + 'tenantName': string; + /** + * Enum: Primary, Standby + * @type {string} + * @memberof ResponseOBTenantOverview + */ + 'tenantRole': string; + /** + * Topology of the tenant + * @type {Array} + * @memberof ResponseOBTenantOverview + */ + 'topology'?: Array; + /** + * Unique identifier of the resource + * @type {string} + * @memberof ResponseOBTenantOverview + */ + 'uid': string; + /** + * Number of units in every zone + * @type {number} + * @memberof ResponseOBTenantOverview + */ + 'unitNumber': number; +} +/** + * + * @export + * @interface ResponseOBTenantReplica + */ +export interface ResponseOBTenantReplica { + /** + * + * @type {number} + * @memberof ResponseOBTenantReplica + */ + 'iopsWeight': number; + /** + * + * @type {number} + * @memberof ResponseOBTenantReplica + */ + 'logDiskSize': number; + /** + * + * @type {number} + * @memberof ResponseOBTenantReplica + */ + 'maxCPU': number; + /** + * + * @type {number} + * @memberof ResponseOBTenantReplica + */ + 'maxIops': number; + /** + * + * @type {number} + * @memberof ResponseOBTenantReplica + */ + 'memorySize': number; + /** + * + * @type {number} + * @memberof ResponseOBTenantReplica + */ + 'minCPU': number; + /** + * + * @type {number} + * @memberof ResponseOBTenantReplica + */ + 'minIops': number; /** * + * @type {number} + * @memberof ResponseOBTenantReplica + */ + 'priority': number; + /** + * Enum: Readonly, Full * @type {string} - * @memberof SilenceSilencerResponse + * @memberof ResponseOBTenantReplica */ - 'comment': string; + 'type': string; /** * * @type {string} - * @memberof SilenceSilencerResponse + * @memberof ResponseOBTenantReplica */ - 'createdBy': string; + 'zone': string; +} +/** + * + * @export + * @interface ResponseOBTenantStatistic + */ +export interface ResponseOBTenantStatistic { /** * * @type {number} - * @memberof SilenceSilencerResponse + * @memberof ResponseOBTenantStatistic */ - 'endsAt': number; + 'count': number; /** * * @type {string} - * @memberof SilenceSilencerResponse + * @memberof ResponseOBTenantStatistic */ - 'id': string; + 'status': string; +} +/** + * + * @export + * @interface ResponseOBZone + */ +export interface ResponseOBZone { /** * - * @type {Array} - * @memberof SilenceSilencerResponse + * @type {Array} + * @memberof ResponseOBZone */ - 'instances': Array; + 'affinities'?: Array; /** * - * @type {Array} - * @memberof SilenceSilencerResponse + * @type {string} + * @memberof ResponseOBZone */ - 'matchers': Array; + 'name': string; /** * - * @type {Array} - * @memberof SilenceSilencerResponse + * @type {string} + * @memberof ResponseOBZone */ - 'rules': Array; + 'namespace': string; /** * - * @type {number} - * @memberof SilenceSilencerResponse + * @type {Array} + * @memberof ResponseOBZone */ - 'startsAt': number; + 'nodeSelector'?: Array; /** * - * @type {SilenceStatus} - * @memberof SilenceSilencerResponse + * @type {Array} + * @memberof ResponseOBZone */ - 'status': SilenceStatus; + 'observers'?: Array; /** * * @type {number} - * @memberof SilenceSilencerResponse + * @memberof ResponseOBZone */ - 'updatedAt': number; + 'replicas': number; + /** + * + * @type {string} + * @memberof ResponseOBZone + */ + 'rootService'?: string; + /** + * + * @type {string} + * @memberof ResponseOBZone + */ + 'status': string; + /** + * + * @type {string} + * @memberof ResponseOBZone + */ + 'statusDetail': string; + /** + * + * @type {Array} + * @memberof ResponseOBZone + */ + 'tolerations'?: Array; + /** + * + * @type {string} + * @memberof ResponseOBZone + */ + 'zone': string; } /** * * @export - * @enum {string} + * @interface ResponseOBZoneAvailableResource */ - -export const SilenceState = { - StateActive: 'active', - StateExpired: 'expired', - StatePending: 'pending' -} as const; - -export type SilenceState = typeof SilenceState[keyof typeof SilenceState]; - - +export interface ResponseOBZoneAvailableResource { + /** + * + * @type {number} + * @memberof ResponseOBZoneAvailableResource + */ + 'availableCPU': number; + /** + * + * @type {number} + * @memberof ResponseOBZoneAvailableResource + */ + 'availableDataDisk': number; + /** + * + * @type {number} + * @memberof ResponseOBZoneAvailableResource + */ + 'availableLogDisk': number; + /** + * + * @type {number} + * @memberof ResponseOBZoneAvailableResource + */ + 'availableMemory': number; + /** + * + * @type {string} + * @memberof ResponseOBZoneAvailableResource + */ + 'obZone': string; + /** + * + * @type {number} + * @memberof ResponseOBZoneAvailableResource + */ + 'serverCount': number; +} /** * * @export - * @interface SilenceStatus + * @interface ResponseResourceSpecRender */ -export interface SilenceStatus { +export interface ResponseResourceSpecRender { /** * - * @type {SilenceState} - * @memberof SilenceStatus + * @type {number} + * @memberof ResponseResourceSpecRender */ - 'state': SilenceState; + 'cpu': number; + /** + * + * @type {number} + * @memberof ResponseResourceSpecRender + */ + 'memory': number; } - - - /** - * AccessControlApi - axios parameter creator + * * @export + * @interface ResponseRestoreSource */ -export const AccessControlApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Create an account - * @summary Create an account - * @param {AcCreateAccountParam} account Account information +export interface ResponseRestoreSource { + /** + * + * @type {string} + * @memberof ResponseRestoreSource + */ + 'archiveSource': string; + /** + * + * @type {string} + * @memberof ResponseRestoreSource + */ + 'bakDataSource': string; + /** + * + * @type {string} + * @memberof ResponseRestoreSource + */ + 'bakEncryptionSecret'?: string; + /** + * + * @type {string} + * @memberof ResponseRestoreSource + */ + 'ossAccessSecret'?: string; + /** + * Enum: OSS, NFS + * @type {string} + * @memberof ResponseRestoreSource + */ + 'type': string; + /** + * + * @type {string} + * @memberof ResponseRestoreSource + */ + 'until'?: string; +} +/** + * + * @export + * @interface ResponseStatisticData + */ +export interface ResponseStatisticData { + /** + * + * @type {Array} + * @memberof ResponseStatisticData + */ + 'backupPolicies': Array; + /** + * + * @type {Array} + * @memberof ResponseStatisticData + */ + 'clusters': Array; + /** + * + * @type {Array} + * @memberof ResponseStatisticData + */ + 'k8sNodes': Array; + /** + * + * @type {string} + * @memberof ResponseStatisticData + */ + 'operatorVersion'?: string; + /** + * + * @type {Array} + * @memberof ResponseStatisticData + */ + 'servers': Array; + /** + * + * @type {Array} + * @memberof ResponseStatisticData + */ + 'tenants': Array; + /** + * + * @type {Array} + * @memberof ResponseStatisticData + */ + 'warningEvents': Array; + /** + * + * @type {Array} + * @memberof ResponseStatisticData + */ + 'zones': Array; +} +/** + * + * @export + * @interface ResponseStorageClass + */ +export interface ResponseStorageClass { + /** + * + * @type {boolean} + * @memberof ResponseStorageClass + */ + 'allowVolumeExpansion': boolean; + /** + * + * @type {Array} + * @memberof ResponseStorageClass + */ + 'mountOptions'?: Array; + /** + * + * @type {string} + * @memberof ResponseStorageClass + */ + 'name': string; + /** + * + * @type {Array} + * @memberof ResponseStorageClass + */ + 'parameters'?: Array; + /** + * + * @type {string} + * @memberof ResponseStorageClass + */ + 'provisioner': string; + /** + * + * @type {string} + * @memberof ResponseStorageClass + */ + 'reclaimPolicy': string; + /** + * + * @type {string} + * @memberof ResponseStorageClass + */ + 'volumeBindingMode': string; +} +/** + * + * @export + * @interface ResponseStorageSpec + */ +export interface ResponseStorageSpec { + /** + * + * @type {number} + * @memberof ResponseStorageSpec + */ + 'size': number; + /** + * + * @type {string} + * @memberof ResponseStorageSpec + */ + 'storageClass': string; +} +/** + * + * @export + * @interface RouteRouteParam + */ +export interface RouteRouteParam { + /** + * + * @type {Array} + * @memberof RouteRouteParam + */ + 'aggregateLabels': Array; + /** + * + * @type {number} + * @memberof RouteRouteParam + */ + 'groupInterval': number; + /** + * + * @type {number} + * @memberof RouteRouteParam + */ + 'groupWait': number; + /** + * + * @type {string} + * @memberof RouteRouteParam + */ + 'id'?: string; + /** + * + * @type {Array} + * @memberof RouteRouteParam + */ + 'matchers': Array; + /** + * + * @type {string} + * @memberof RouteRouteParam + */ + 'receiver': string; + /** + * + * @type {number} + * @memberof RouteRouteParam + */ + 'repeatInterval': number; +} +/** + * + * @export + * @interface RouteRouteResponse + */ +export interface RouteRouteResponse { + /** + * + * @type {Array} + * @memberof RouteRouteResponse + */ + 'aggregateLabels': Array; + /** + * + * @type {number} + * @memberof RouteRouteResponse + */ + 'groupInterval': number; + /** + * + * @type {number} + * @memberof RouteRouteResponse + */ + 'groupWait': number; + /** + * + * @type {string} + * @memberof RouteRouteResponse + */ + 'id': string; + /** + * + * @type {Array} + * @memberof RouteRouteResponse + */ + 'matchers': Array; + /** + * + * @type {string} + * @memberof RouteRouteResponse + */ + 'receiver': string; + /** + * + * @type {number} + * @memberof RouteRouteResponse + */ + 'repeatInterval': number; +} +/** + * + * @export + * @interface RuleRule + */ +export interface RuleRule { + /** + * + * @type {string} + * @memberof RuleRule + */ + 'description': string; + /** + * + * @type {number} + * @memberof RuleRule + */ + 'duration': number; + /** + * + * @type {OceanbaseOBInstanceType} + * @memberof RuleRule + */ + 'instanceType': OceanbaseOBInstanceType; + /** + * + * @type {Array} + * @memberof RuleRule + */ + 'labels': Array; + /** + * + * @type {string} + * @memberof RuleRule + */ + 'name': string; + /** + * + * @type {string} + * @memberof RuleRule + */ + 'query': string; + /** + * + * @type {AlarmSeverity} + * @memberof RuleRule + */ + 'severity': AlarmSeverity; + /** + * + * @type {string} + * @memberof RuleRule + */ + 'summary': string; + /** + * + * @type {RuleRuleType} + * @memberof RuleRule + */ + 'type'?: RuleRuleType; +} + + +/** + * + * @export + * @interface RuleRuleFilter + */ +export interface RuleRuleFilter { + /** + * + * @type {OceanbaseOBInstanceType} + * @memberof RuleRuleFilter + */ + 'instanceType'?: OceanbaseOBInstanceType; + /** + * + * @type {string} + * @memberof RuleRuleFilter + */ + 'keyword'?: string; + /** + * + * @type {AlarmSeverity} + * @memberof RuleRuleFilter + */ + 'severity'?: AlarmSeverity; +} + + +/** + * + * @export + * @enum {string} + */ + +export const RuleRuleHealth = { + HealthUnknown: 'unknown', + HealthOK: 'ok', + HealthError: 'error' +} as const; + +export type RuleRuleHealth = typeof RuleRuleHealth[keyof typeof RuleRuleHealth]; + + +/** + * + * @export + * @interface RuleRuleResponse + */ +export interface RuleRuleResponse { + /** + * + * @type {string} + * @memberof RuleRuleResponse + */ + 'description': string; + /** + * + * @type {number} + * @memberof RuleRuleResponse + */ + 'duration': number; + /** + * + * @type {number} + * @memberof RuleRuleResponse + */ + 'evaluationTime': number; + /** + * + * @type {RuleRuleHealth} + * @memberof RuleRuleResponse + */ + 'health': RuleRuleHealth; + /** + * + * @type {OceanbaseOBInstanceType} + * @memberof RuleRuleResponse + */ + 'instanceType': OceanbaseOBInstanceType; + /** + * + * @type {number} + * @memberof RuleRuleResponse + */ + 'keepFiringFor': number; + /** + * + * @type {Array} + * @memberof RuleRuleResponse + */ + 'labels': Array; + /** + * + * @type {string} + * @memberof RuleRuleResponse + */ + 'lastError'?: string; + /** + * + * @type {number} + * @memberof RuleRuleResponse + */ + 'lastEvaluation': number; + /** + * + * @type {string} + * @memberof RuleRuleResponse + */ + 'name': string; + /** + * + * @type {string} + * @memberof RuleRuleResponse + */ + 'query': string; + /** + * + * @type {AlarmSeverity} + * @memberof RuleRuleResponse + */ + 'severity': AlarmSeverity; + /** + * + * @type {RuleRuleState} + * @memberof RuleRuleResponse + */ + 'state': RuleRuleState; + /** + * + * @type {string} + * @memberof RuleRuleResponse + */ + 'summary': string; + /** + * + * @type {RuleRuleType} + * @memberof RuleRuleResponse + */ + 'type'?: RuleRuleType; +} + + +/** + * + * @export + * @enum {string} + */ + +export const RuleRuleState = { + StateActive: 'active', + StateInactive: 'inactive' +} as const; + +export type RuleRuleState = typeof RuleRuleState[keyof typeof RuleRuleState]; + + +/** + * + * @export + * @enum {string} + */ + +export const RuleRuleType = { + TypeBuiltin: 'builtin', + TypeCustomized: 'customized' +} as const; + +export type RuleRuleType = typeof RuleRuleType[keyof typeof RuleRuleType]; + + +/** + * + * @export + * @interface SilenceSilencerFilter + */ +export interface SilenceSilencerFilter { + /** + * + * @type {OceanbaseOBInstance} + * @memberof SilenceSilencerFilter + */ + 'instance'?: OceanbaseOBInstance; + /** + * + * @type {OceanbaseOBInstanceType} + * @memberof SilenceSilencerFilter + */ + 'instanceType'?: OceanbaseOBInstanceType; + /** + * + * @type {string} + * @memberof SilenceSilencerFilter + */ + 'keyword'?: string; +} + + +/** + * + * @export + * @interface SilenceSilencerParam + */ +export interface SilenceSilencerParam { + /** + * + * @type {string} + * @memberof SilenceSilencerParam + */ + 'comment': string; + /** + * + * @type {string} + * @memberof SilenceSilencerParam + */ + 'createdBy': string; + /** + * + * @type {number} + * @memberof SilenceSilencerParam + */ + 'endsAt': number; + /** + * + * @type {string} + * @memberof SilenceSilencerParam + */ + 'id'?: string; + /** + * + * @type {Array} + * @memberof SilenceSilencerParam + */ + 'instances': Array; + /** + * + * @type {Array} + * @memberof SilenceSilencerParam + */ + 'matchers': Array; + /** + * + * @type {Array} + * @memberof SilenceSilencerParam + */ + 'rules': Array; + /** + * + * @type {number} + * @memberof SilenceSilencerParam + */ + 'startsAt': number; +} +/** + * + * @export + * @interface SilenceSilencerResponse + */ +export interface SilenceSilencerResponse { + /** + * + * @type {string} + * @memberof SilenceSilencerResponse + */ + 'comment': string; + /** + * + * @type {string} + * @memberof SilenceSilencerResponse + */ + 'createdBy': string; + /** + * + * @type {number} + * @memberof SilenceSilencerResponse + */ + 'endsAt': number; + /** + * + * @type {string} + * @memberof SilenceSilencerResponse + */ + 'id': string; + /** + * + * @type {Array} + * @memberof SilenceSilencerResponse + */ + 'instances': Array; + /** + * + * @type {Array} + * @memberof SilenceSilencerResponse + */ + 'matchers': Array; + /** + * + * @type {Array} + * @memberof SilenceSilencerResponse + */ + 'rules': Array; + /** + * + * @type {number} + * @memberof SilenceSilencerResponse + */ + 'startsAt': number; + /** + * + * @type {SilenceStatus} + * @memberof SilenceSilencerResponse + */ + 'status': SilenceStatus; + /** + * + * @type {number} + * @memberof SilenceSilencerResponse + */ + 'updatedAt': number; +} +/** + * + * @export + * @enum {string} + */ + +export const SilenceState = { + StateActive: 'active', + StateExpired: 'expired', + StatePending: 'pending' +} as const; + +export type SilenceState = typeof SilenceState[keyof typeof SilenceState]; + + +/** + * + * @export + * @interface SilenceStatus + */ +export interface SilenceStatus { + /** + * + * @type {SilenceState} + * @memberof SilenceStatus + */ + 'state': SilenceState; +} + + +/** + * + * @export + * @enum {string} + */ + +export const SqlIndexCategory = { + IndexCategoryPrimaryKey: 'primaryKey', + IndexCategoryGlobalNormal: 'globalNormal', + IndexCategoryGlobalUnique: 'globalUnique', + IndexCategoryLocalNormal: 'localNormal', + IndexCategoryLocalUnique: 'localUnique' +} as const; + +export type SqlIndexCategory = typeof SqlIndexCategory[keyof typeof SqlIndexCategory]; + + +/** + * + * @export + * @interface SqlIndexInfo + */ +export interface SqlIndexInfo { + /** + * + * @type {SqlIndexCategory} + * @memberof SqlIndexInfo + */ + 'category': SqlIndexCategory; + /** + * + * @type {Array} + * @memberof SqlIndexInfo + */ + 'columns': Array; + /** + * + * @type {string} + * @memberof SqlIndexInfo + */ + 'indexName': string; + /** + * + * @type {SqlIndexStatus} + * @memberof SqlIndexInfo + */ + 'status': SqlIndexStatus; + /** + * + * @type {string} + * @memberof SqlIndexInfo + */ + 'tableName': string; +} + + +/** + * + * @export + * @enum {string} + */ + +export const SqlIndexStatus = { + IndexStatusCreating: 'creating', + IndexStatusAvailable: 'available', + IndexStatusError: 'error' +} as const; + +export type SqlIndexStatus = typeof SqlIndexStatus[keyof typeof SqlIndexStatus]; + + +/** + * + * @export + * @enum {string} + */ + +export const SqlMetricCategory = { + Meta: 'meta', + Latency: 'latency', + Execution: 'execution' +} as const; + +export type SqlMetricCategory = typeof SqlMetricCategory[keyof typeof SqlMetricCategory]; + + +/** + * + * @export + * @enum {string} + */ + +export const SqlPlanCategory = { + PlanCategoryLocal: 'local', + PlanCategoryRemote: 'remote', + PlanCategoryDistributed: 'distributed' +} as const; + +export type SqlPlanCategory = typeof SqlPlanCategory[keyof typeof SqlPlanCategory]; + + +/** + * + * @export + * @interface SqlPlanDetail + */ +export interface SqlPlanDetail { + /** + * + * @type {SqlPlanCategory} + * @memberof SqlPlanDetail + */ + 'category': SqlPlanCategory; + /** + * + * @type {number} + * @memberof SqlPlanDetail + */ + 'generatedTime': number; + /** + * + * @type {number} + * @memberof SqlPlanDetail + */ + 'mergedVersion': number; + /** + * + * @type {SqlPlanOperator} + * @memberof SqlPlanDetail + */ + 'planDetail': SqlPlanOperator; + /** + * + * @type {string} + * @memberof SqlPlanDetail + */ + 'planHash': string; + /** + * + * @type {Array} + * @memberof SqlPlanDetail + */ + 'planStatistics': Array; +} + + +/** + * + * @export + * @interface SqlPlanDetailParam + */ +export interface SqlPlanDetailParam { + /** + * + * @type {string} + * @memberof SqlPlanDetailParam + */ + 'database'?: string; + /** + * + * @type {number} + * @memberof SqlPlanDetailParam + */ + 'endTime'?: number; + /** + * + * @type {string} + * @memberof SqlPlanDetailParam + */ + 'namespace': string; + /** + * + * @type {string} + * @memberof SqlPlanDetailParam + */ + 'obcluster': string; + /** + * + * @type {string} + * @memberof SqlPlanDetailParam + */ + 'obtenant'?: string; + /** + * + * @type {string} + * @memberof SqlPlanDetailParam + */ + 'planHash': string; + /** + * + * @type {number} + * @memberof SqlPlanDetailParam + */ + 'startTime'?: number; + /** + * + * @type {string} + * @memberof SqlPlanDetailParam + */ + 'user'?: string; +} +/** + * + * @export + * @interface SqlPlanOperator + */ +export interface SqlPlanOperator { + /** + * + * @type {Array} + * @memberof SqlPlanOperator + */ + 'childOperators'?: Array; + /** + * + * @type {number} + * @memberof SqlPlanOperator + */ + 'cost': number; + /** + * + * @type {number} + * @memberof SqlPlanOperator + */ + 'estimatedRows': number; + /** + * + * @type {string} + * @memberof SqlPlanOperator + */ + 'name'?: string; + /** + * + * @type {string} + * @memberof SqlPlanOperator + */ + 'operator': string; + /** + * + * @type {string} + * @memberof SqlPlanOperator + */ + 'outputOrFilter'?: string; +} +/** + * + * @export + * @interface SqlPlanStatistic + */ +export interface SqlPlanStatistic { + /** + * + * @type {SqlPlanCategory} + * @memberof SqlPlanStatistic + */ + 'category': SqlPlanCategory; + /** + * + * @type {number} + * @memberof SqlPlanStatistic + */ + 'cost': number; + /** + * + * @type {number} + * @memberof SqlPlanStatistic + */ + 'cpuTime': number; + /** + * + * @type {number} + * @memberof SqlPlanStatistic + */ + 'generatedTime': number; + /** + * + * @type {number} + * @memberof SqlPlanStatistic + */ + 'mergedVersion': number; + /** + * + * @type {string} + * @memberof SqlPlanStatistic + */ + 'planHash': string; +} + + +/** + * + * @export + * @interface SqlPlanStatisticByServer + */ +export interface SqlPlanStatisticByServer { + /** + * + * @type {SqlPlanCategory} + * @memberof SqlPlanStatisticByServer + */ + 'category': SqlPlanCategory; + /** + * + * @type {number} + * @memberof SqlPlanStatisticByServer + */ + 'cost': number; + /** + * + * @type {number} + * @memberof SqlPlanStatisticByServer + */ + 'cpuTime': number; + /** + * + * @type {number} + * @memberof SqlPlanStatisticByServer + */ + 'generatedTime': number; + /** + * + * @type {number} + * @memberof SqlPlanStatisticByServer + */ + 'mergedVersion': number; + /** + * + * @type {string} + * @memberof SqlPlanStatisticByServer + */ + 'planHash': string; + /** + * + * @type {number} + * @memberof SqlPlanStatisticByServer + */ + 'planId': number; + /** + * + * @type {string} + * @memberof SqlPlanStatisticByServer + */ + 'server': string; +} + + +/** + * + * @export + * @interface SqlRequestStatisticInfo + */ +export interface SqlRequestStatisticInfo { + /** + * + * @type {string} + * @memberof SqlRequestStatisticInfo + */ + 'database': string; + /** + * + * @type {Array} + * @memberof SqlRequestStatisticInfo + */ + 'executionStatistics': Array; + /** + * + * @type {ResponseMetricData} + * @memberof SqlRequestStatisticInfo + */ + 'executionTrend': ResponseMetricData; + /** + * + * @type {Array} + * @memberof SqlRequestStatisticInfo + */ + 'latencyStatistics': Array; + /** + * + * @type {ResponseMetricData} + * @memberof SqlRequestStatisticInfo + */ + 'latencyTrend': ResponseMetricData; + /** + * + * @type {Array} + * @memberof SqlRequestStatisticInfo + */ + 'planCategoryStatistics': Array; + /** + * + * @type {string} + * @memberof SqlRequestStatisticInfo + */ + 'tenant': string; + /** + * + * @type {string} + * @memberof SqlRequestStatisticInfo + */ + 'user': string; +} +/** + * + * @export + * @interface SqlSqlDetailParam + */ +export interface SqlSqlDetailParam { + /** + * + * @type {string} + * @memberof SqlSqlDetailParam + */ + 'database'?: string; + /** + * + * @type {number} + * @memberof SqlSqlDetailParam + */ + 'endTime'?: number; + /** + * + * @type {number} + * @memberof SqlSqlDetailParam + */ + 'interval': number; + /** + * + * @type {string} + * @memberof SqlSqlDetailParam + */ + 'namespace': string; + /** + * + * @type {string} + * @memberof SqlSqlDetailParam + */ + 'obcluster': string; + /** + * + * @type {string} + * @memberof SqlSqlDetailParam + */ + 'obtenant'?: string; + /** + * + * @type {string} + * @memberof SqlSqlDetailParam + */ + 'sqlId': string; + /** + * + * @type {number} + * @memberof SqlSqlDetailParam + */ + 'startTime'?: number; + /** + * + * @type {string} + * @memberof SqlSqlDetailParam + */ + 'user'?: string; +} +/** + * + * @export + * @interface SqlSqlDetailedInfo + */ +export interface SqlSqlDetailedInfo { + /** + * + * @type {Array} + * @memberof SqlSqlDetailedInfo + */ + 'diagnoseInfo'?: Array; + /** + * + * @type {Array} + * @memberof SqlSqlDetailedInfo + */ + 'executionTrend': Array; + /** + * + * @type {Array} + * @memberof SqlSqlDetailedInfo + */ + 'indexies'?: Array; + /** + * + * @type {Array} + * @memberof SqlSqlDetailedInfo + */ + 'latencyTrend': Array; + /** + * + * @type {Array} + * @memberof SqlSqlDetailedInfo + */ + 'plans': Array; +} +/** + * + * @export + * @interface SqlSqlDiagnoseInfo + */ +export interface SqlSqlDiagnoseInfo { + /** + * + * @type {string} + * @memberof SqlSqlDiagnoseInfo + */ + 'reason': string; + /** + * + * @type {string} + * @memberof SqlSqlDiagnoseInfo + */ + 'suggestion'?: string; +} +/** + * + * @export + * @interface SqlSqlFilter + */ +export interface SqlSqlFilter { + /** + * + * @type {string} + * @memberof SqlSqlFilter + */ + 'database'?: string; + /** + * + * @type {number} + * @memberof SqlSqlFilter + */ + 'endTime'?: number; + /** + * + * @type {boolean} + * @memberof SqlSqlFilter + */ + 'includeInnerSql'?: boolean; + /** + * + * @type {string} + * @memberof SqlSqlFilter + */ + 'keyword'?: string; + /** + * + * @type {string} + * @memberof SqlSqlFilter + */ + 'namespace': string; + /** + * + * @type {string} + * @memberof SqlSqlFilter + */ + 'obcluster': string; + /** + * + * @type {string} + * @memberof SqlSqlFilter + */ + 'obtenant'?: string; + /** + * + * @type {number} + * @memberof SqlSqlFilter + */ + 'startTime'?: number; + /** + * + * @type {string} + * @memberof SqlSqlFilter + */ + 'user'?: string; +} +/** + * + * @export + * @interface SqlSqlInfo + */ +export interface SqlSqlInfo { + /** + * + * @type {string} + * @memberof SqlSqlInfo + */ + 'database': string; + /** + * + * @type {Array} + * @memberof SqlSqlInfo + */ + 'diagnoseInfo'?: Array; + /** + * + * @type {Array} + * @memberof SqlSqlInfo + */ + 'executionStatistics': Array; + /** + * + * @type {boolean} + * @memberof SqlSqlInfo + */ + 'isInner': boolean; + /** + * + * @type {Array} + * @memberof SqlSqlInfo + */ + 'latencyStatistics': Array; + /** + * + * @type {string} + * @memberof SqlSqlInfo + */ + 'observer': string; + /** + * + * @type {string} + * @memberof SqlSqlInfo + */ + 'sqlID': string; + /** + * + * @type {string} + * @memberof SqlSqlInfo + */ + 'sqlText': string; + /** + * + * @type {string} + * @memberof SqlSqlInfo + */ + 'sqlType': string; + /** + * + * @type {string} + * @memberof SqlSqlInfo + */ + 'tenant': string; + /** + * + * @type {string} + * @memberof SqlSqlInfo + */ + 'user': string; +} +/** + * + * @export + * @interface SqlSqlMetricMeta + */ +export interface SqlSqlMetricMeta { + /** + * + * @type {SqlMetricCategory} + * @memberof SqlSqlMetricMeta + */ + 'category': SqlMetricCategory; + /** + * + * @type {string} + * @memberof SqlSqlMetricMeta + */ + 'description': string; + /** + * + * @type {boolean} + * @memberof SqlSqlMetricMeta + */ + 'displayByDefault': boolean; + /** + * + * @type {string} + * @memberof SqlSqlMetricMeta + */ + 'name': string; +} + + +/** + * + * @export + * @interface SqlSqlMetricMetaCategory + */ +export interface SqlSqlMetricMetaCategory { + /** + * + * @type {SqlMetricCategory} + * @memberof SqlSqlMetricMetaCategory + */ + 'category': SqlMetricCategory; + /** + * + * @type {Array} + * @memberof SqlSqlMetricMetaCategory + */ + 'metrics': Array; +} + + +/** + * + * @export + * @interface SqlSqlRequestStatisticParam + */ +export interface SqlSqlRequestStatisticParam { + /** + * + * @type {string} + * @memberof SqlSqlRequestStatisticParam + */ + 'database'?: string; + /** + * + * @type {number} + * @memberof SqlSqlRequestStatisticParam + */ + 'endTime'?: number; + /** + * + * @type {string} + * @memberof SqlSqlRequestStatisticParam + */ + 'namespace': string; + /** + * + * @type {string} + * @memberof SqlSqlRequestStatisticParam + */ + 'obcluster': string; + /** + * + * @type {string} + * @memberof SqlSqlRequestStatisticParam + */ + 'obtenant'?: string; + /** + * + * @type {number} + * @memberof SqlSqlRequestStatisticParam + */ + 'startTime'?: number; + /** + * + * @type {Array} + * @memberof SqlSqlRequestStatisticParam + */ + 'statisticScopes': Array; + /** + * + * @type {string} + * @memberof SqlSqlRequestStatisticParam + */ + 'user'?: string; +} +/** + * + * @export + * @interface SqlSqlStatisticMetric + */ +export interface SqlSqlStatisticMetric { + /** + * + * @type {string} + * @memberof SqlSqlStatisticMetric + */ + 'name': string; + /** + * + * @type {number} + * @memberof SqlSqlStatisticMetric + */ + 'value': number; +} + +/** + * AccessControlApi - axios parameter creator + * @export + */ +export const AccessControlApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create an account + * @summary Create an account + * @param {AcCreateAccountParam} account Account information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createAccount: async (account: AcCreateAccountParam, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'account' is not null or undefined + assertParamExists('createAccount', 'account', account) + const localVarPath = `/api/v1/ac/accounts`; + // 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(account, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create an role + * @summary Create an role + * @param {AcCreateRoleParam} role Role information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createRole: async (role: AcCreateRoleParam, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'role' is not null or undefined + assertParamExists('createRole', 'role', role) + const localVarPath = `/api/v1/ac/roles`; + // 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(role, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Delete an account + * @summary Delete an account + * @param {string} username Username + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteAccount: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists('deleteAccount', 'username', username) + const localVarPath = `/api/v1/ac/accounts/{username}` + .replace(`{${"username"}}`, encodeURIComponent(String(username))); + // 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 ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Delete an role + * @summary Delete an role + * @param {string} name Role name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteRole: async (name: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deleteRole', 'name', name) + const localVarPath = `/api/v1/ac/roles/{name}` + .replace(`{${"name"}}`, encodeURIComponent(String(name))); + // 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 ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * get account info + * @summary get account info + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAccountInfo: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/ac/info`; + // 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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all accounts + * @summary List all accounts + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAllAccounts: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/ac/accounts`; + // 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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all policies + * @summary List all policies + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAllPolicies: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/ac/policies`; + // 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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all roles + * @summary List all roles + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAllRoles: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/ac/roles`; + // 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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Patch an account + * @summary Patch an account + * @param {string} username Username + * @param {AcPatchAccountParam} account Account information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + patchAccount: async (username: string, account: AcPatchAccountParam, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists('patchAccount', 'username', username) + // verify required parameter 'account' is not null or undefined + assertParamExists('patchAccount', 'account', account) + const localVarPath = `/api/v1/ac/accounts/{username}` + .replace(`{${"username"}}`, encodeURIComponent(String(username))); + // 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: 'PATCH', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(account, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Patch an role + * @summary Patch an role + * @param {string} name Role name + * @param {AcPatchRoleParam} role Role information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + patchRole: async (name: string, role: AcPatchRoleParam, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('patchRole', 'name', name) + // verify required parameter 'role' is not null or undefined + assertParamExists('patchRole', 'role', role) + const localVarPath = `/api/v1/ac/roles/{name}` + .replace(`{${"name"}}`, encodeURIComponent(String(name))); + // 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: 'PATCH', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(role, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Reset user\'s own password + * @summary Reset user\'s own password + * @param {ParamResetPasswordParam} resetParam reset password + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + resetPassword: async (resetParam: ParamResetPasswordParam, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'resetParam' is not null or undefined + assertParamExists('resetPassword', 'resetParam', resetParam) + const localVarPath = `/api/v1/ac/password`; + // 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(resetParam, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AccessControlApi - functional programming interface + * @export + */ +export const AccessControlApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AccessControlApiAxiosParamCreator(configuration) + return { + /** + * Create an account + * @summary Create an account + * @param {AcCreateAccountParam} account Account information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createAccount(account: AcCreateAccountParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createAccount(account, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AccessControlApi.createAccount']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create an role + * @summary Create an role + * @param {AcCreateRoleParam} role Role information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createRole(role: AcCreateRoleParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createRole(role, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AccessControlApi.createRole']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Delete an account + * @summary Delete an account + * @param {string} username Username + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteAccount(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAccount(username, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AccessControlApi.deleteAccount']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Delete an role + * @summary Delete an role + * @param {string} name Role name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteRole(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRole(name, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AccessControlApi.deleteRole']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * get account info + * @summary get account info + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAccountInfo(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAccountInfo(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AccessControlApi.getAccountInfo']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all accounts + * @summary List all accounts + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listAllAccounts(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAllAccounts(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AccessControlApi.listAllAccounts']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all policies + * @summary List all policies + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listAllPolicies(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAllPolicies(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AccessControlApi.listAllPolicies']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all roles + * @summary List all roles + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listAllRoles(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAllRoles(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AccessControlApi.listAllRoles']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Patch an account + * @summary Patch an account + * @param {string} username Username + * @param {AcPatchAccountParam} account Account information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async patchAccount(username: string, account: AcPatchAccountParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.patchAccount(username, account, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AccessControlApi.patchAccount']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Patch an role + * @summary Patch an role + * @param {string} name Role name + * @param {AcPatchRoleParam} role Role information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async patchRole(name: string, role: AcPatchRoleParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.patchRole(name, role, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AccessControlApi.patchRole']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Reset user\'s own password + * @summary Reset user\'s own password + * @param {ParamResetPasswordParam} resetParam reset password + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async resetPassword(resetParam: ParamResetPasswordParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.resetPassword(resetParam, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AccessControlApi.resetPassword']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * AccessControlApi - factory interface + * @export + */ +export const AccessControlApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AccessControlApiFp(configuration) + return { + /** + * Create an account + * @summary Create an account + * @param {AcCreateAccountParam} account Account information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createAccount(account: AcCreateAccountParam, options?: any): AxiosPromise { + return localVarFp.createAccount(account, options).then((request) => request(axios, basePath)); + }, + /** + * Create an role + * @summary Create an role + * @param {AcCreateRoleParam} role Role information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createRole(role: AcCreateRoleParam, options?: any): AxiosPromise { + return localVarFp.createRole(role, options).then((request) => request(axios, basePath)); + }, + /** + * Delete an account + * @summary Delete an account + * @param {string} username Username + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteAccount(username: string, options?: any): AxiosPromise { + return localVarFp.deleteAccount(username, options).then((request) => request(axios, basePath)); + }, + /** + * Delete an role + * @summary Delete an role + * @param {string} name Role name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteRole(name: string, options?: any): AxiosPromise { + return localVarFp.deleteRole(name, options).then((request) => request(axios, basePath)); + }, + /** + * get account info + * @summary get account info + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAccountInfo(options?: any): AxiosPromise { + return localVarFp.getAccountInfo(options).then((request) => request(axios, basePath)); + }, + /** + * List all accounts + * @summary List all accounts + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAllAccounts(options?: any): AxiosPromise { + return localVarFp.listAllAccounts(options).then((request) => request(axios, basePath)); + }, + /** + * List all policies + * @summary List all policies + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAllPolicies(options?: any): AxiosPromise { + return localVarFp.listAllPolicies(options).then((request) => request(axios, basePath)); + }, + /** + * List all roles + * @summary List all roles + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAllRoles(options?: any): AxiosPromise { + return localVarFp.listAllRoles(options).then((request) => request(axios, basePath)); + }, + /** + * Patch an account + * @summary Patch an account + * @param {string} username Username + * @param {AcPatchAccountParam} account Account information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + patchAccount(username: string, account: AcPatchAccountParam, options?: any): AxiosPromise { + return localVarFp.patchAccount(username, account, options).then((request) => request(axios, basePath)); + }, + /** + * Patch an role + * @summary Patch an role + * @param {string} name Role name + * @param {AcPatchRoleParam} role Role information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + patchRole(name: string, role: AcPatchRoleParam, options?: any): AxiosPromise { + return localVarFp.patchRole(name, role, options).then((request) => request(axios, basePath)); + }, + /** + * Reset user\'s own password + * @summary Reset user\'s own password + * @param {ParamResetPasswordParam} resetParam reset password + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + resetPassword(resetParam: ParamResetPasswordParam, options?: any): AxiosPromise { + return localVarFp.resetPassword(resetParam, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AccessControlApi - object-oriented interface + * @export + * @class AccessControlApi + * @extends {BaseAPI} + */ +export class AccessControlApi extends BaseAPI { + /** + * Create an account + * @summary Create an account + * @param {AcCreateAccountParam} account Account information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccessControlApi + */ + public createAccount(account: AcCreateAccountParam, options?: RawAxiosRequestConfig) { + return AccessControlApiFp(this.configuration).createAccount(account, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create an role + * @summary Create an role + * @param {AcCreateRoleParam} role Role information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccessControlApi + */ + public createRole(role: AcCreateRoleParam, options?: RawAxiosRequestConfig) { + return AccessControlApiFp(this.configuration).createRole(role, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete an account + * @summary Delete an account + * @param {string} username Username + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccessControlApi + */ + public deleteAccount(username: string, options?: RawAxiosRequestConfig) { + return AccessControlApiFp(this.configuration).deleteAccount(username, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete an role + * @summary Delete an role + * @param {string} name Role name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccessControlApi + */ + public deleteRole(name: string, options?: RawAxiosRequestConfig) { + return AccessControlApiFp(this.configuration).deleteRole(name, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * get account info + * @summary get account info + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccessControlApi + */ + public getAccountInfo(options?: RawAxiosRequestConfig) { + return AccessControlApiFp(this.configuration).getAccountInfo(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all accounts + * @summary List all accounts + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccessControlApi + */ + public listAllAccounts(options?: RawAxiosRequestConfig) { + return AccessControlApiFp(this.configuration).listAllAccounts(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all policies + * @summary List all policies + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccessControlApi + */ + public listAllPolicies(options?: RawAxiosRequestConfig) { + return AccessControlApiFp(this.configuration).listAllPolicies(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all roles + * @summary List all roles + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccessControlApi + */ + public listAllRoles(options?: RawAxiosRequestConfig) { + return AccessControlApiFp(this.configuration).listAllRoles(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Patch an account + * @summary Patch an account + * @param {string} username Username + * @param {AcPatchAccountParam} account Account information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccessControlApi + */ + public patchAccount(username: string, account: AcPatchAccountParam, options?: RawAxiosRequestConfig) { + return AccessControlApiFp(this.configuration).patchAccount(username, account, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Patch an role + * @summary Patch an role + * @param {string} name Role name + * @param {AcPatchRoleParam} role Role information + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccessControlApi + */ + public patchRole(name: string, role: AcPatchRoleParam, options?: RawAxiosRequestConfig) { + return AccessControlApiFp(this.configuration).patchRole(name, role, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Reset user\'s own password + * @summary Reset user\'s own password + * @param {ParamResetPasswordParam} resetParam reset password + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccessControlApi + */ + public resetPassword(resetParam: ParamResetPasswordParam, options?: RawAxiosRequestConfig) { + return AccessControlApiFp(this.configuration).resetPassword(resetParam, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * AlarmApi - axios parameter creator + * @export + */ +export const AlarmApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create or update alarm receiver. + * @summary Create or update alarm receiver + * @param {ReceiverReceiver} body receiver + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createOrUpdateReceiver: async (body: ReceiverReceiver, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createOrUpdateReceiver', 'body', body) + const localVarPath = `/api/v1/alarm/receiver/receivers`; + // 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: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create or update alarm route. + * @summary Create or update alarm route + * @param {RouteRouteParam} body route + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createOrUpdateRoute: async (body: RouteRouteParam, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createOrUpdateRoute', 'body', body) + const localVarPath = `/api/v1/alarm/route/routes`; + // 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: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create or update alarm rule. + * @summary Create or update alarm rule + * @param {RuleRule} body rule + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createOrUpdateRule: async (body: RuleRule, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createOrUpdateRule', 'body', body) + const localVarPath = `/api/v1/alarm/rule/rules`; + // 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: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create or update alarm silencer. + * @summary Create or update alarm silencer + * @param {SilenceSilencerParam} body silencer + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createOrUpdateSilencer: async (body: SilenceSilencerParam, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createOrUpdateSilencer', 'body', body) + const localVarPath = `/api/v1/alarm/silence/silencers`; + // 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: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Delete alarm receiver by receiver name. + * @summary Delete alarm receiver + * @param {string} name receiver name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteReceiver: async (name: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deleteReceiver', 'name', name) + const localVarPath = `/api/v1/alarm/receiver/receivers/{name}` + .replace(`{${"name"}}`, encodeURIComponent(String(name))); + // 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 ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Delete alarm channel by channel name. + * @summary Delete alarm channel + * @param {string} id route id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteRoute: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteRoute', 'id', id) + const localVarPath = `/api/v1/alarm/route/routes/{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 ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Delete alarm rule by rule name. + * @summary Delete alarm rule + * @param {string} name rule name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createAccount: async (account: AcCreateAccountParam, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'account' is not null or undefined - assertParamExists('createAccount', 'account', account) - const localVarPath = `/api/v1/ac/accounts`; + deleteRule: async (name: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deleteRule', 'name', name) + const localVarPath = `/api/v1/alarm/rule/rules/{name}` + .replace(`{${"name"}}`, encodeURIComponent(String(name))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -6051,7 +8876,7 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -6060,12 +8885,9 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(account, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -6073,16 +8895,17 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Create an role - * @summary Create an role - * @param {AcCreateRoleParam} role Role information + * Delete alarm silencer by silencer id. + * @summary Delete alarm silencer + * @param {string} id silencer id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createRole: async (role: AcCreateRoleParam, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'role' is not null or undefined - assertParamExists('createRole', 'role', role) - const localVarPath = `/api/v1/ac/roles`; + deleteSilencer: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteSilencer', 'id', id) + const localVarPath = `/api/v1/alarm/silence/silencers/{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; @@ -6090,7 +8913,7 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -6099,12 +8922,9 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(role, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -6112,17 +8932,16 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Delete an account - * @summary Delete an account - * @param {string} username Username + * Diagnose alert, trigger a job to do data collection and analization on background. + * @summary Diagnose alert + * @param {AlertAnalyzeParam} body alert analyze param * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteAccount: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'username' is not null or undefined - assertParamExists('deleteAccount', 'username', username) - const localVarPath = `/api/v1/ac/accounts/{username}` - .replace(`{${"username"}}`, encodeURIComponent(String(username))); + diagnoseAlert: async (body: AlertAnalyzeParam, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('diagnoseAlert', 'body', body) + const localVarPath = `/api/v1/alarm/alert/diagnose`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -6130,7 +8949,7 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -6139,9 +8958,12 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -6149,16 +8971,16 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Delete an role - * @summary Delete an role - * @param {string} name Role name + * Get alarm receiver, query by receiver name. + * @summary Get alarm receiver + * @param {string} name rule name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteRole: async (name: string, options: RawAxiosRequestConfig = {}): Promise => { + getReceiver: async (name: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'name' is not null or undefined - assertParamExists('deleteRole', 'name', name) - const localVarPath = `/api/v1/ac/roles/{name}` + assertParamExists('getReceiver', 'name', name) + const localVarPath = `/api/v1/alarm/receiver/receivers/{name}` .replace(`{${"name"}}`, encodeURIComponent(String(name))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -6167,7 +8989,7 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -6186,13 +9008,17 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * get account info - * @summary get account info + * Get alarm receiver template. + * @summary Get alarm receiver template + * @param {string} type receiver type * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAccountInfo: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/ac/info`; + getReceiverTemplate: async (type: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'type' is not null or undefined + assertParamExists('getReceiverTemplate', 'type', type) + const localVarPath = `/api/v1/alarm/receiver/templates/{type}` + .replace(`{${"type"}}`, encodeURIComponent(String(type))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -6219,13 +9045,17 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * List all accounts - * @summary List all accounts + * Get alarm route, query by route name. + * @summary Get alarm route + * @param {string} id route id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAllAccounts: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/ac/accounts`; + getRoute: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getRoute', 'id', id) + const localVarPath = `/api/v1/alarm/route/routes/{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; @@ -6252,13 +9082,17 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * List all policies - * @summary List all policies + * Get alarm rule, query by rule name. + * @summary Get alarm rule + * @param {string} name rule name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAllPolicies: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/ac/policies`; + getRule: async (name: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getRule', 'name', name) + const localVarPath = `/api/v1/alarm/rule/rules/{name}` + .replace(`{${"name"}}`, encodeURIComponent(String(name))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -6285,13 +9119,17 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * List all roles - * @summary List all roles + * Get alarm silencer, query by silencer id. + * @summary Get alarm silencer + * @param {string} id silencer id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAllRoles: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/ac/roles`; + getSilencer: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getSilencer', 'id', id) + const localVarPath = `/api/v1/alarm/silence/silencers/{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; @@ -6318,20 +9156,14 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Patch an account - * @summary Patch an account - * @param {string} username Username - * @param {AcPatchAccountParam} account Account information + * List alerts, filter with alarm objects, severity, time and keywords. + * @summary List alerts + * @param {AlertAlertFilter} [body] alert filter * @param {*} [options] Override http request option. * @throws {RequiredError} */ - patchAccount: async (username: string, account: AcPatchAccountParam, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'username' is not null or undefined - assertParamExists('patchAccount', 'username', username) - // verify required parameter 'account' is not null or undefined - assertParamExists('patchAccount', 'account', account) - const localVarPath = `/api/v1/ac/accounts/{username}` - .replace(`{${"username"}}`, encodeURIComponent(String(username))); + listAlerts: async (body?: AlertAlertFilter, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/alarm/alert/alerts`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -6339,7 +9171,7 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -6353,7 +9185,7 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(account, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -6361,20 +9193,13 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Patch an role - * @summary Patch an role - * @param {string} name Role name - * @param {AcPatchRoleParam} role Role information + * List alarm receiver templates. + * @summary List alarm receiver templates * @param {*} [options] Override http request option. * @throws {RequiredError} */ - patchRole: async (name: string, role: AcPatchRoleParam, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'name' is not null or undefined - assertParamExists('patchRole', 'name', name) - // verify required parameter 'role' is not null or undefined - assertParamExists('patchRole', 'role', role) - const localVarPath = `/api/v1/ac/roles/{name}` - .replace(`{${"name"}}`, encodeURIComponent(String(name))); + listReceiverTemplates: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/alarm/receiver/templates`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -6382,7 +9207,107 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List alarm receivers, do not support filter, list all receivers at once. + * @summary List alarm receivers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listReceivers: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/alarm/receiver/receivers`; + // 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List alarm routes, do not support filter, list all routes at once. + * @summary List alarm routes + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listRoutes: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/alarm/route/routes`; + // 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List alarm rules, filter with alarm objects type, severity and keywords. + * @summary List alarm rules + * @param {RuleRuleFilter} [body] rule filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listRules: async (body?: RuleRuleFilter, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/alarm/rule/rules`; + // 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: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -6396,7 +9321,7 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(role, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -6404,16 +9329,14 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi }; }, /** - * Reset user\'s own password - * @summary Reset user\'s own password - * @param {ParamResetPasswordParam} resetParam reset password + * List alarm silencers, filter with alarm objects and keywords. + * @summary List alarm silencers + * @param {SilenceSilencerFilter} [body] silencer filter * @param {*} [options] Override http request option. * @throws {RequiredError} */ - resetPassword: async (resetParam: ParamResetPasswordParam, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'resetParam' is not null or undefined - assertParamExists('resetPassword', 'resetParam', resetParam) - const localVarPath = `/api/v1/ac/password`; + listSilencers: async (body?: SilenceSilencerFilter, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/alarm/silence/silencers`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -6435,7 +9358,7 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(resetParam, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -6446,497 +9369,298 @@ export const AccessControlApiAxiosParamCreator = function (configuration?: Confi }; /** - * AccessControlApi - functional programming interface + * AlarmApi - functional programming interface * @export */ -export const AccessControlApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AccessControlApiAxiosParamCreator(configuration) +export const AlarmApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AlarmApiAxiosParamCreator(configuration) return { /** - * Create an account - * @summary Create an account - * @param {AcCreateAccountParam} account Account information + * Create or update alarm receiver. + * @summary Create or update alarm receiver + * @param {ReceiverReceiver} body receiver * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createAccount(account: AcCreateAccountParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createAccount(account, options); + async createOrUpdateReceiver(body: ReceiverReceiver, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOrUpdateReceiver(body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AccessControlApi.createAccount']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.createOrUpdateReceiver']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Create an role - * @summary Create an role - * @param {AcCreateRoleParam} role Role information + * Create or update alarm route. + * @summary Create or update alarm route + * @param {RouteRouteParam} body route * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createRole(role: AcCreateRoleParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createRole(role, options); + async createOrUpdateRoute(body: RouteRouteParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOrUpdateRoute(body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AccessControlApi.createRole']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.createOrUpdateRoute']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Delete an account - * @summary Delete an account - * @param {string} username Username + * Create or update alarm rule. + * @summary Create or update alarm rule + * @param {RuleRule} body rule * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteAccount(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAccount(username, options); + async createOrUpdateRule(body: RuleRule, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOrUpdateRule(body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AccessControlApi.deleteAccount']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.createOrUpdateRule']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Delete an role - * @summary Delete an role - * @param {string} name Role name + * Create or update alarm silencer. + * @summary Create or update alarm silencer + * @param {SilenceSilencerParam} body silencer * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteRole(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRole(name, options); + async createOrUpdateSilencer(body: SilenceSilencerParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOrUpdateSilencer(body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AccessControlApi.deleteRole']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.createOrUpdateSilencer']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * get account info - * @summary get account info + * Delete alarm receiver by receiver name. + * @summary Delete alarm receiver + * @param {string} name receiver name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAccountInfo(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAccountInfo(options); + async deleteReceiver(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteReceiver(name, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AccessControlApi.getAccountInfo']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.deleteReceiver']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List all accounts - * @summary List all accounts + * Delete alarm channel by channel name. + * @summary Delete alarm channel + * @param {string} id route id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listAllAccounts(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAllAccounts(options); + async deleteRoute(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRoute(id, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AccessControlApi.listAllAccounts']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.deleteRoute']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List all policies - * @summary List all policies + * Delete alarm rule by rule name. + * @summary Delete alarm rule + * @param {string} name rule name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listAllPolicies(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAllPolicies(options); + async deleteRule(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRule(name, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AccessControlApi.listAllPolicies']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.deleteRule']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List all roles - * @summary List all roles + * Delete alarm silencer by silencer id. + * @summary Delete alarm silencer + * @param {string} id silencer id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listAllRoles(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAllRoles(options); + async deleteSilencer(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSilencer(id, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AccessControlApi.listAllRoles']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.deleteSilencer']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Patch an account - * @summary Patch an account - * @param {string} username Username - * @param {AcPatchAccountParam} account Account information + * Diagnose alert, trigger a job to do data collection and analization on background. + * @summary Diagnose alert + * @param {AlertAnalyzeParam} body alert analyze param * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async patchAccount(username: string, account: AcPatchAccountParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.patchAccount(username, account, options); + async diagnoseAlert(body: AlertAnalyzeParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.diagnoseAlert(body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AccessControlApi.patchAccount']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.diagnoseAlert']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Patch an role - * @summary Patch an role - * @param {string} name Role name - * @param {AcPatchRoleParam} role Role information + * Get alarm receiver, query by receiver name. + * @summary Get alarm receiver + * @param {string} name rule name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async patchRole(name: string, role: AcPatchRoleParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.patchRole(name, role, options); + async getReceiver(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getReceiver(name, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AccessControlApi.patchRole']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.getReceiver']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Reset user\'s own password - * @summary Reset user\'s own password - * @param {ParamResetPasswordParam} resetParam reset password + * Get alarm receiver template. + * @summary Get alarm receiver template + * @param {string} type receiver type * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async resetPassword(resetParam: ParamResetPasswordParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.resetPassword(resetParam, options); + async getReceiverTemplate(type: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getReceiverTemplate(type, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AccessControlApi.resetPassword']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.getReceiverTemplate']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, - } -}; - -/** - * AccessControlApi - factory interface - * @export - */ -export const AccessControlApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AccessControlApiFp(configuration) - return { - /** - * Create an account - * @summary Create an account - * @param {AcCreateAccountParam} account Account information - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createAccount(account: AcCreateAccountParam, options?: any): AxiosPromise { - return localVarFp.createAccount(account, options).then((request) => request(axios, basePath)); - }, - /** - * Create an role - * @summary Create an role - * @param {AcCreateRoleParam} role Role information - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createRole(role: AcCreateRoleParam, options?: any): AxiosPromise { - return localVarFp.createRole(role, options).then((request) => request(axios, basePath)); - }, - /** - * Delete an account - * @summary Delete an account - * @param {string} username Username - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteAccount(username: string, options?: any): AxiosPromise { - return localVarFp.deleteAccount(username, options).then((request) => request(axios, basePath)); - }, - /** - * Delete an role - * @summary Delete an role - * @param {string} name Role name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteRole(name: string, options?: any): AxiosPromise { - return localVarFp.deleteRole(name, options).then((request) => request(axios, basePath)); - }, /** - * get account info - * @summary get account info + * Get alarm route, query by route name. + * @summary Get alarm route + * @param {string} id route id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAccountInfo(options?: any): AxiosPromise { - return localVarFp.getAccountInfo(options).then((request) => request(axios, basePath)); + async getRoute(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRoute(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.getRoute']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List all accounts - * @summary List all accounts + * Get alarm rule, query by rule name. + * @summary Get alarm rule + * @param {string} name rule name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAllAccounts(options?: any): AxiosPromise { - return localVarFp.listAllAccounts(options).then((request) => request(axios, basePath)); + async getRule(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRule(name, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.getRule']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List all policies - * @summary List all policies + * Get alarm silencer, query by silencer id. + * @summary Get alarm silencer + * @param {string} id silencer id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAllPolicies(options?: any): AxiosPromise { - return localVarFp.listAllPolicies(options).then((request) => request(axios, basePath)); + async getSilencer(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSilencer(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.getSilencer']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List all roles - * @summary List all roles + * List alerts, filter with alarm objects, severity, time and keywords. + * @summary List alerts + * @param {AlertAlertFilter} [body] alert filter * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAllRoles(options?: any): AxiosPromise { - return localVarFp.listAllRoles(options).then((request) => request(axios, basePath)); + async listAlerts(body?: AlertAlertFilter, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAlerts(body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.listAlerts']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Patch an account - * @summary Patch an account - * @param {string} username Username - * @param {AcPatchAccountParam} account Account information + * List alarm receiver templates. + * @summary List alarm receiver templates * @param {*} [options] Override http request option. * @throws {RequiredError} */ - patchAccount(username: string, account: AcPatchAccountParam, options?: any): AxiosPromise { - return localVarFp.patchAccount(username, account, options).then((request) => request(axios, basePath)); + async listReceiverTemplates(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listReceiverTemplates(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.listReceiverTemplates']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Patch an role - * @summary Patch an role - * @param {string} name Role name - * @param {AcPatchRoleParam} role Role information + * List alarm receivers, do not support filter, list all receivers at once. + * @summary List alarm receivers * @param {*} [options] Override http request option. * @throws {RequiredError} */ - patchRole(name: string, role: AcPatchRoleParam, options?: any): AxiosPromise { - return localVarFp.patchRole(name, role, options).then((request) => request(axios, basePath)); + async listReceivers(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listReceivers(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.listReceivers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Reset user\'s own password - * @summary Reset user\'s own password - * @param {ParamResetPasswordParam} resetParam reset password + * List alarm routes, do not support filter, list all routes at once. + * @summary List alarm routes * @param {*} [options] Override http request option. * @throws {RequiredError} */ - resetPassword(resetParam: ParamResetPasswordParam, options?: any): AxiosPromise { - return localVarFp.resetPassword(resetParam, options).then((request) => request(axios, basePath)); + async listRoutes(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listRoutes(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.listRoutes']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, - }; -}; - -/** - * AccessControlApi - object-oriented interface - * @export - * @class AccessControlApi - * @extends {BaseAPI} - */ -export class AccessControlApi extends BaseAPI { - /** - * Create an account - * @summary Create an account - * @param {AcCreateAccountParam} account Account information - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AccessControlApi - */ - public createAccount(account: AcCreateAccountParam, options?: RawAxiosRequestConfig) { - return AccessControlApiFp(this.configuration).createAccount(account, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Create an role - * @summary Create an role - * @param {AcCreateRoleParam} role Role information - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AccessControlApi - */ - public createRole(role: AcCreateRoleParam, options?: RawAxiosRequestConfig) { - return AccessControlApiFp(this.configuration).createRole(role, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Delete an account - * @summary Delete an account - * @param {string} username Username - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AccessControlApi - */ - public deleteAccount(username: string, options?: RawAxiosRequestConfig) { - return AccessControlApiFp(this.configuration).deleteAccount(username, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Delete an role - * @summary Delete an role - * @param {string} name Role name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AccessControlApi - */ - public deleteRole(name: string, options?: RawAxiosRequestConfig) { - return AccessControlApiFp(this.configuration).deleteRole(name, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * get account info - * @summary get account info - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AccessControlApi - */ - public getAccountInfo(options?: RawAxiosRequestConfig) { - return AccessControlApiFp(this.configuration).getAccountInfo(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * List all accounts - * @summary List all accounts - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AccessControlApi - */ - public listAllAccounts(options?: RawAxiosRequestConfig) { - return AccessControlApiFp(this.configuration).listAllAccounts(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * List all policies - * @summary List all policies - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AccessControlApi - */ - public listAllPolicies(options?: RawAxiosRequestConfig) { - return AccessControlApiFp(this.configuration).listAllPolicies(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * List all roles - * @summary List all roles - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AccessControlApi - */ - public listAllRoles(options?: RawAxiosRequestConfig) { - return AccessControlApiFp(this.configuration).listAllRoles(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Patch an account - * @summary Patch an account - * @param {string} username Username - * @param {AcPatchAccountParam} account Account information - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AccessControlApi - */ - public patchAccount(username: string, account: AcPatchAccountParam, options?: RawAxiosRequestConfig) { - return AccessControlApiFp(this.configuration).patchAccount(username, account, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Patch an role - * @summary Patch an role - * @param {string} name Role name - * @param {AcPatchRoleParam} role Role information - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AccessControlApi - */ - public patchRole(name: string, role: AcPatchRoleParam, options?: RawAxiosRequestConfig) { - return AccessControlApiFp(this.configuration).patchRole(name, role, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Reset user\'s own password - * @summary Reset user\'s own password - * @param {ParamResetPasswordParam} resetParam reset password - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AccessControlApi - */ - public resetPassword(resetParam: ParamResetPasswordParam, options?: RawAxiosRequestConfig) { - return AccessControlApiFp(this.configuration).resetPassword(resetParam, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * AlarmApi - axios parameter creator - * @export - */ -export const AlarmApiAxiosParamCreator = function (configuration?: Configuration) { - return { /** - * Create or update alarm receiver. - * @summary Create or update alarm receiver - * @param {ReceiverReceiver} body receiver + * List alarm rules, filter with alarm objects type, severity and keywords. + * @summary List alarm rules + * @param {RuleRuleFilter} [body] rule filter * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createOrUpdateReceiver: async (body: ReceiverReceiver, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'body' is not null or undefined - assertParamExists('createOrUpdateReceiver', 'body', body) - const localVarPath = `/api/v1/alarm/receiver/receivers`; - // 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: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + async listRules(body?: RuleRuleFilter, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listRules(body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.listRules']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Create or update alarm route. - * @summary Create or update alarm route - * @param {RouteRouteParam} body route + * List alarm silencers, filter with alarm objects and keywords. + * @summary List alarm silencers + * @param {SilenceSilencerFilter} [body] silencer filter * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createOrUpdateRoute: async (body: RouteRouteParam, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'body' is not null or undefined - assertParamExists('createOrUpdateRoute', 'body', body) - const localVarPath = `/api/v1/alarm/route/routes`; - // 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: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + async listSilencers(body?: SilenceSilencerFilter, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSilencers(body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AlarmApi.listSilencers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * AlarmApi - factory interface + * @export + */ +export const AlarmApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AlarmApiFp(configuration) + return { + /** + * Create or update alarm receiver. + * @summary Create or update alarm receiver + * @param {ReceiverReceiver} body receiver + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createOrUpdateReceiver(body: ReceiverReceiver, options?: any): AxiosPromise { + return localVarFp.createOrUpdateReceiver(body, options).then((request) => request(axios, basePath)); + }, + /** + * Create or update alarm route. + * @summary Create or update alarm route + * @param {RouteRouteParam} body route + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createOrUpdateRoute(body: RouteRouteParam, options?: any): AxiosPromise { + return localVarFp.createOrUpdateRoute(body, options).then((request) => request(axios, basePath)); }, /** * Create or update alarm rule. @@ -6945,37 +9669,8 @@ export const AlarmApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createOrUpdateRule: async (body: RuleRule, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'body' is not null or undefined - assertParamExists('createOrUpdateRule', 'body', body) - const localVarPath = `/api/v1/alarm/rule/rules`; - // 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: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + createOrUpdateRule(body: RuleRule, options?: any): AxiosPromise { + return localVarFp.createOrUpdateRule(body, options).then((request) => request(axios, basePath)); }, /** * Create or update alarm silencer. @@ -6984,37 +9679,8 @@ export const AlarmApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createOrUpdateSilencer: async (body: SilenceSilencerParam, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'body' is not null or undefined - assertParamExists('createOrUpdateSilencer', 'body', body) - const localVarPath = `/api/v1/alarm/silence/silencers`; - // 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: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + createOrUpdateSilencer(body: SilenceSilencerParam, options?: any): AxiosPromise { + return localVarFp.createOrUpdateSilencer(body, options).then((request) => request(axios, basePath)); }, /** * Delete alarm receiver by receiver name. @@ -7023,35 +9689,8 @@ export const AlarmApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteReceiver: async (name: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'name' is not null or undefined - assertParamExists('deleteReceiver', 'name', name) - const localVarPath = `/api/v1/alarm/receiver/receivers/{name}` - .replace(`{${"name"}}`, encodeURIComponent(String(name))); - // 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 ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + deleteReceiver(name: string, options?: any): AxiosPromise { + return localVarFp.deleteReceiver(name, options).then((request) => request(axios, basePath)); }, /** * Delete alarm channel by channel name. @@ -7060,35 +9699,8 @@ export const AlarmApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteRoute: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('deleteRoute', 'id', id) - const localVarPath = `/api/v1/alarm/route/routes/{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 ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + deleteRoute(id: string, options?: any): AxiosPromise { + return localVarFp.deleteRoute(id, options).then((request) => request(axios, basePath)); }, /** * Delete alarm rule by rule name. @@ -7097,267 +9709,403 @@ export const AlarmApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteRule: async (name: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'name' is not null or undefined - assertParamExists('deleteRule', 'name', name) - const localVarPath = `/api/v1/alarm/rule/rules/{name}` - .replace(`{${"name"}}`, encodeURIComponent(String(name))); - // 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 ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + deleteRule(name: string, options?: any): AxiosPromise { + return localVarFp.deleteRule(name, options).then((request) => request(axios, basePath)); + }, + /** + * Delete alarm silencer by silencer id. + * @summary Delete alarm silencer + * @param {string} id silencer id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSilencer(id: string, options?: any): AxiosPromise { + return localVarFp.deleteSilencer(id, options).then((request) => request(axios, basePath)); + }, + /** + * Diagnose alert, trigger a job to do data collection and analization on background. + * @summary Diagnose alert + * @param {AlertAnalyzeParam} body alert analyze param + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + diagnoseAlert(body: AlertAnalyzeParam, options?: any): AxiosPromise { + return localVarFp.diagnoseAlert(body, options).then((request) => request(axios, basePath)); + }, + /** + * Get alarm receiver, query by receiver name. + * @summary Get alarm receiver + * @param {string} name rule name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getReceiver(name: string, options?: any): AxiosPromise { + return localVarFp.getReceiver(name, options).then((request) => request(axios, basePath)); + }, + /** + * Get alarm receiver template. + * @summary Get alarm receiver template + * @param {string} type receiver type + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getReceiverTemplate(type: string, options?: any): AxiosPromise { + return localVarFp.getReceiverTemplate(type, options).then((request) => request(axios, basePath)); + }, + /** + * Get alarm route, query by route name. + * @summary Get alarm route + * @param {string} id route id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRoute(id: string, options?: any): AxiosPromise { + return localVarFp.getRoute(id, options).then((request) => request(axios, basePath)); + }, + /** + * Get alarm rule, query by rule name. + * @summary Get alarm rule + * @param {string} name rule name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRule(name: string, options?: any): AxiosPromise { + return localVarFp.getRule(name, options).then((request) => request(axios, basePath)); + }, + /** + * Get alarm silencer, query by silencer id. + * @summary Get alarm silencer + * @param {string} id silencer id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSilencer(id: string, options?: any): AxiosPromise { + return localVarFp.getSilencer(id, options).then((request) => request(axios, basePath)); + }, + /** + * List alerts, filter with alarm objects, severity, time and keywords. + * @summary List alerts + * @param {AlertAlertFilter} [body] alert filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAlerts(body?: AlertAlertFilter, options?: any): AxiosPromise { + return localVarFp.listAlerts(body, options).then((request) => request(axios, basePath)); + }, + /** + * List alarm receiver templates. + * @summary List alarm receiver templates + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listReceiverTemplates(options?: any): AxiosPromise { + return localVarFp.listReceiverTemplates(options).then((request) => request(axios, basePath)); + }, + /** + * List alarm receivers, do not support filter, list all receivers at once. + * @summary List alarm receivers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listReceivers(options?: any): AxiosPromise { + return localVarFp.listReceivers(options).then((request) => request(axios, basePath)); + }, + /** + * List alarm routes, do not support filter, list all routes at once. + * @summary List alarm routes + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listRoutes(options?: any): AxiosPromise { + return localVarFp.listRoutes(options).then((request) => request(axios, basePath)); }, /** - * Delete alarm silencer by silencer id. - * @summary Delete alarm silencer - * @param {string} id silencer id + * List alarm rules, filter with alarm objects type, severity and keywords. + * @summary List alarm rules + * @param {RuleRuleFilter} [body] rule filter * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteSilencer: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('deleteSilencer', 'id', id) - const localVarPath = `/api/v1/alarm/silence/silencers/{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 ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + listRules(body?: RuleRuleFilter, options?: any): AxiosPromise { + return localVarFp.listRules(body, options).then((request) => request(axios, basePath)); }, /** - * Get alarm receiver, query by receiver name. - * @summary Get alarm receiver - * @param {string} name rule name + * List alarm silencers, filter with alarm objects and keywords. + * @summary List alarm silencers + * @param {SilenceSilencerFilter} [body] silencer filter * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getReceiver: async (name: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'name' is not null or undefined - assertParamExists('getReceiver', 'name', name) - const localVarPath = `/api/v1/alarm/receiver/receivers/{name}` - .replace(`{${"name"}}`, encodeURIComponent(String(name))); - // 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: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + listSilencers(body?: SilenceSilencerFilter, options?: any): AxiosPromise { + return localVarFp.listSilencers(body, options).then((request) => request(axios, basePath)); + }, + }; +}; +/** + * AlarmApi - object-oriented interface + * @export + * @class AlarmApi + * @extends {BaseAPI} + */ +export class AlarmApi extends BaseAPI { + /** + * Create or update alarm receiver. + * @summary Create or update alarm receiver + * @param {ReceiverReceiver} body receiver + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public createOrUpdateReceiver(body: ReceiverReceiver, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).createOrUpdateReceiver(body, options).then((request) => request(this.axios, this.basePath)); + } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + /** + * Create or update alarm route. + * @summary Create or update alarm route + * @param {RouteRouteParam} body route + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public createOrUpdateRoute(body: RouteRouteParam, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).createOrUpdateRoute(body, options).then((request) => request(this.axios, this.basePath)); + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get alarm receiver template. - * @summary Get alarm receiver template - * @param {string} type receiver type - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getReceiverTemplate: async (type: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'type' is not null or undefined - assertParamExists('getReceiverTemplate', 'type', type) - const localVarPath = `/api/v1/alarm/receiver/templates/{type}` - .replace(`{${"type"}}`, encodeURIComponent(String(type))); - // 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; - } + /** + * Create or update alarm rule. + * @summary Create or update alarm rule + * @param {RuleRule} body rule + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public createOrUpdateRule(body: RuleRule, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).createOrUpdateRule(body, options).then((request) => request(this.axios, this.basePath)); + } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + /** + * Create or update alarm silencer. + * @summary Create or update alarm silencer + * @param {SilenceSilencerParam} body silencer + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public createOrUpdateSilencer(body: SilenceSilencerParam, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).createOrUpdateSilencer(body, options).then((request) => request(this.axios, this.basePath)); + } - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + /** + * Delete alarm receiver by receiver name. + * @summary Delete alarm receiver + * @param {string} name receiver name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public deleteReceiver(name: string, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).deleteReceiver(name, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Delete alarm channel by channel name. + * @summary Delete alarm channel + * @param {string} id route id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public deleteRoute(id: string, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).deleteRoute(id, options).then((request) => request(this.axios, this.basePath)); + } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + /** + * Delete alarm rule by rule name. + * @summary Delete alarm rule + * @param {string} name rule name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public deleteRule(name: string, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).deleteRule(name, options).then((request) => request(this.axios, this.basePath)); + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get alarm route, query by route name. - * @summary Get alarm route - * @param {string} id route id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRoute: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getRoute', 'id', id) - const localVarPath = `/api/v1/alarm/route/routes/{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; - } + /** + * Delete alarm silencer by silencer id. + * @summary Delete alarm silencer + * @param {string} id silencer id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public deleteSilencer(id: string, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).deleteSilencer(id, options).then((request) => request(this.axios, this.basePath)); + } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + /** + * Diagnose alert, trigger a job to do data collection and analization on background. + * @summary Diagnose alert + * @param {AlertAnalyzeParam} body alert analyze param + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public diagnoseAlert(body: AlertAnalyzeParam, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).diagnoseAlert(body, options).then((request) => request(this.axios, this.basePath)); + } - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + /** + * Get alarm receiver, query by receiver name. + * @summary Get alarm receiver + * @param {string} name rule name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public getReceiver(name: string, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).getReceiver(name, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Get alarm receiver template. + * @summary Get alarm receiver template + * @param {string} type receiver type + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public getReceiverTemplate(type: string, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).getReceiverTemplate(type, options).then((request) => request(this.axios, this.basePath)); + } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + /** + * Get alarm route, query by route name. + * @summary Get alarm route + * @param {string} id route id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public getRoute(id: string, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).getRoute(id, options).then((request) => request(this.axios, this.basePath)); + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get alarm rule, query by rule name. - * @summary Get alarm rule - * @param {string} name rule name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRule: async (name: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'name' is not null or undefined - assertParamExists('getRule', 'name', name) - const localVarPath = `/api/v1/alarm/rule/rules/{name}` - .replace(`{${"name"}}`, encodeURIComponent(String(name))); - // 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; - } + /** + * Get alarm rule, query by rule name. + * @summary Get alarm rule + * @param {string} name rule name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public getRule(name: string, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).getRule(name, options).then((request) => request(this.axios, this.basePath)); + } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + /** + * Get alarm silencer, query by silencer id. + * @summary Get alarm silencer + * @param {string} id silencer id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public getSilencer(id: string, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).getSilencer(id, options).then((request) => request(this.axios, this.basePath)); + } - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + /** + * List alerts, filter with alarm objects, severity, time and keywords. + * @summary List alerts + * @param {AlertAlertFilter} [body] alert filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public listAlerts(body?: AlertAlertFilter, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).listAlerts(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * List alarm receiver templates. + * @summary List alarm receiver templates + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public listReceiverTemplates(options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).listReceiverTemplates(options).then((request) => request(this.axios, this.basePath)); + } - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + /** + * List alarm receivers, do not support filter, list all receivers at once. + * @summary List alarm receivers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public listReceivers(options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).listReceivers(options).then((request) => request(this.axios, this.basePath)); + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get alarm silencer, query by silencer id. - * @summary Get alarm silencer - * @param {string} id silencer id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSilencer: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getSilencer', 'id', id) - const localVarPath = `/api/v1/alarm/silence/silencers/{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; - } + /** + * List alarm routes, do not support filter, list all routes at once. + * @summary List alarm routes + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public listRoutes(options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).listRoutes(options).then((request) => request(this.axios, this.basePath)); + } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + /** + * List alarm rules, filter with alarm objects type, severity and keywords. + * @summary List alarm rules + * @param {RuleRuleFilter} [body] rule filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public listRules(body?: RuleRuleFilter, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).listRules(body, options).then((request) => request(this.axios, this.basePath)); + } - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + /** + * List alarm silencers, filter with alarm objects and keywords. + * @summary List alarm silencers + * @param {SilenceSilencerFilter} [body] silencer filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlarmApi + */ + public listSilencers(body?: SilenceSilencerFilter, options?: RawAxiosRequestConfig) { + return AlarmApiFp(this.configuration).listSilencers(body, options).then((request) => request(this.axios, this.basePath)); + } +} - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, +/** + * ClusterApi - axios parameter creator + * @export + */ +export const ClusterApiAxiosParamCreator = function (configuration?: Configuration) { + return { /** - * List alerts, filter with alarm objects, severity, time and keywords. - * @summary List alerts - * @param {AlertAlertFilter} [body] alert filter + * create k8s namespace + * @summary create k8s namespace + * @param {ParamCreateNamespaceParam} body create obcluster request body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAlerts: async (body?: AlertAlertFilter, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/alarm/alert/alerts`; + createK8sNamespace: async (body: ParamCreateNamespaceParam, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('createK8sNamespace', 'body', body) + const localVarPath = `/api/v1/cluster/namespaces`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -7387,46 +10135,17 @@ export const AlarmApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * List alarm receiver templates. - * @summary List alarm receiver templates - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listReceiverTemplates: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/alarm/receiver/templates`; - // 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: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * List alarm receivers, do not support filter, list all receivers at once. - * @summary List alarm receivers + * list k8s events + * @summary list k8s event + * @param {ListK8sEventsObjectTypeEnum} [objectType] related object types + * @param {ListK8sEventsTypeEnum} [type] event level + * @param {string} [name] Object name + * @param {string} [namespace] Namespace * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listReceivers: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/alarm/receiver/receivers`; + listK8sEvents: async (objectType?: ListK8sEventsObjectTypeEnum, type?: ListK8sEventsTypeEnum, name?: string, namespace?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/cluster/events`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -7434,13 +10153,29 @@ export const AlarmApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + if (objectType !== undefined) { + localVarQueryParameter['objectType'] = objectType; + } + + if (type !== undefined) { + localVarQueryParameter['type'] = type; + } + + if (name !== undefined) { + localVarQueryParameter['name'] = name; + } + + if (namespace !== undefined) { + localVarQueryParameter['namespace'] = namespace; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -7453,13 +10188,13 @@ export const AlarmApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * List alarm routes, do not support filter, list all routes at once. - * @summary List alarm routes + * list k8s namespaces + * @summary list k8s namespaces * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listRoutes: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/alarm/route/routes`; + listK8sNamespaces: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/cluster/namespaces`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -7467,7 +10202,7 @@ export const AlarmApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -7486,14 +10221,13 @@ export const AlarmApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * List alarm rules, filter with alarm objects type, severity and keywords. - * @summary List alarm rules - * @param {RuleRuleFilter} [body] rule filter + * list k8s nodes + * @summary list k8s nodes * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listRules: async (body?: RuleRuleFilter, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/alarm/rule/rules`; + listK8sNodes: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/cluster/nodes`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -7501,7 +10235,7 @@ export const AlarmApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -7510,12 +10244,9 @@ export const AlarmApiAxiosParamCreator = function (configuration?: Configuration - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -7523,14 +10254,13 @@ export const AlarmApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * List alarm silencers, filter with alarm objects and keywords. - * @summary List alarm silencers - * @param {SilenceSilencerFilter} [body] silencer filter + * list k8s storage classes + * @summary list k8s storage classes * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSilencers: async (body?: SilenceSilencerFilter, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/alarm/silence/silencers`; + listK8sStorageClasses: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/cluster/storageClasses`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -7538,7 +10268,7 @@ export const AlarmApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -7547,724 +10277,498 @@ export const AlarmApiAxiosParamCreator = function (configuration?: Configuration - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, - }; - }, - } -}; - -/** - * AlarmApi - functional programming interface - * @export - */ -export const AlarmApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AlarmApiAxiosParamCreator(configuration) - return { - /** - * Create or update alarm receiver. - * @summary Create or update alarm receiver - * @param {ReceiverReceiver} body receiver - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createOrUpdateReceiver(body: ReceiverReceiver, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createOrUpdateReceiver(body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.createOrUpdateReceiver']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Create or update alarm route. - * @summary Create or update alarm route - * @param {RouteRouteParam} body route - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createOrUpdateRoute(body: RouteRouteParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createOrUpdateRoute(body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.createOrUpdateRoute']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Create or update alarm rule. - * @summary Create or update alarm rule - * @param {RuleRule} body rule - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createOrUpdateRule(body: RuleRule, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createOrUpdateRule(body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.createOrUpdateRule']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Create or update alarm silencer. - * @summary Create or update alarm silencer - * @param {SilenceSilencerParam} body silencer - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createOrUpdateSilencer(body: SilenceSilencerParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createOrUpdateSilencer(body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.createOrUpdateSilencer']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Delete alarm receiver by receiver name. - * @summary Delete alarm receiver - * @param {string} name receiver name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteReceiver(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteReceiver(name, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.deleteReceiver']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Delete alarm channel by channel name. - * @summary Delete alarm channel - * @param {string} id route id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteRoute(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRoute(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.deleteRoute']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Delete alarm rule by rule name. - * @summary Delete alarm rule - * @param {string} name rule name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteRule(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRule(name, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.deleteRule']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Delete alarm silencer by silencer id. - * @summary Delete alarm silencer - * @param {string} id silencer id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteSilencer(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSilencer(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.deleteSilencer']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Get alarm receiver, query by receiver name. - * @summary Get alarm receiver - * @param {string} name rule name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getReceiver(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getReceiver(name, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.getReceiver']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Get alarm receiver template. - * @summary Get alarm receiver template - * @param {string} type receiver type - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getReceiverTemplate(type: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getReceiverTemplate(type, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.getReceiverTemplate']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Get alarm route, query by route name. - * @summary Get alarm route - * @param {string} id route id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getRoute(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getRoute(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.getRoute']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Get alarm rule, query by rule name. - * @summary Get alarm rule - * @param {string} name rule name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getRule(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getRule(name, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.getRule']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Get alarm silencer, query by silencer id. - * @summary Get alarm silencer - * @param {string} id silencer id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSilencer(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSilencer(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.getSilencer']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * List alerts, filter with alarm objects, severity, time and keywords. - * @summary List alerts - * @param {AlertAlertFilter} [body] alert filter - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listAlerts(body?: AlertAlertFilter, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAlerts(body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.listAlerts']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }; }, + } +}; + +/** + * ClusterApi - functional programming interface + * @export + */ +export const ClusterApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ClusterApiAxiosParamCreator(configuration) + return { /** - * List alarm receiver templates. - * @summary List alarm receiver templates + * create k8s namespace + * @summary create k8s namespace + * @param {ParamCreateNamespaceParam} body create obcluster request body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listReceiverTemplates(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listReceiverTemplates(options); + async createK8sNamespace(body: ParamCreateNamespaceParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createK8sNamespace(body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.listReceiverTemplates']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ClusterApi.createK8sNamespace']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List alarm receivers, do not support filter, list all receivers at once. - * @summary List alarm receivers + * list k8s events + * @summary list k8s event + * @param {ListK8sEventsObjectTypeEnum} [objectType] related object types + * @param {ListK8sEventsTypeEnum} [type] event level + * @param {string} [name] Object name + * @param {string} [namespace] Namespace * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listReceivers(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listReceivers(options); + async listK8sEvents(objectType?: ListK8sEventsObjectTypeEnum, type?: ListK8sEventsTypeEnum, name?: string, namespace?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listK8sEvents(objectType, type, name, namespace, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.listReceivers']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ClusterApi.listK8sEvents']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List alarm routes, do not support filter, list all routes at once. - * @summary List alarm routes + * list k8s namespaces + * @summary list k8s namespaces * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listRoutes(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listRoutes(options); + async listK8sNamespaces(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listK8sNamespaces(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.listRoutes']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ClusterApi.listK8sNamespaces']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List alarm rules, filter with alarm objects type, severity and keywords. - * @summary List alarm rules - * @param {RuleRuleFilter} [body] rule filter + * list k8s nodes + * @summary list k8s nodes * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listRules(body?: RuleRuleFilter, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listRules(body, options); + async listK8sNodes(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listK8sNodes(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.listRules']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ClusterApi.listK8sNodes']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List alarm silencers, filter with alarm objects and keywords. - * @summary List alarm silencers - * @param {SilenceSilencerFilter} [body] silencer filter + * list k8s storage classes + * @summary list k8s storage classes * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listSilencers(body?: SilenceSilencerFilter, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listSilencers(body, options); + async listK8sStorageClasses(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listK8sStorageClasses(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AlarmApi.listSilencers']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ClusterApi.listK8sStorageClasses']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * AlarmApi - factory interface + * ClusterApi - factory interface * @export */ -export const AlarmApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AlarmApiFp(configuration) +export const ClusterApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ClusterApiFp(configuration) return { /** - * Create or update alarm receiver. - * @summary Create or update alarm receiver - * @param {ReceiverReceiver} body receiver - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrUpdateReceiver(body: ReceiverReceiver, options?: any): AxiosPromise { - return localVarFp.createOrUpdateReceiver(body, options).then((request) => request(axios, basePath)); - }, - /** - * Create or update alarm route. - * @summary Create or update alarm route - * @param {RouteRouteParam} body route - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrUpdateRoute(body: RouteRouteParam, options?: any): AxiosPromise { - return localVarFp.createOrUpdateRoute(body, options).then((request) => request(axios, basePath)); - }, - /** - * Create or update alarm rule. - * @summary Create or update alarm rule - * @param {RuleRule} body rule - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrUpdateRule(body: RuleRule, options?: any): AxiosPromise { - return localVarFp.createOrUpdateRule(body, options).then((request) => request(axios, basePath)); - }, - /** - * Create or update alarm silencer. - * @summary Create or update alarm silencer - * @param {SilenceSilencerParam} body silencer - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrUpdateSilencer(body: SilenceSilencerParam, options?: any): AxiosPromise { - return localVarFp.createOrUpdateSilencer(body, options).then((request) => request(axios, basePath)); - }, - /** - * Delete alarm receiver by receiver name. - * @summary Delete alarm receiver - * @param {string} name receiver name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteReceiver(name: string, options?: any): AxiosPromise { - return localVarFp.deleteReceiver(name, options).then((request) => request(axios, basePath)); - }, - /** - * Delete alarm channel by channel name. - * @summary Delete alarm channel - * @param {string} id route id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteRoute(id: string, options?: any): AxiosPromise { - return localVarFp.deleteRoute(id, options).then((request) => request(axios, basePath)); - }, - /** - * Delete alarm rule by rule name. - * @summary Delete alarm rule - * @param {string} name rule name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteRule(name: string, options?: any): AxiosPromise { - return localVarFp.deleteRule(name, options).then((request) => request(axios, basePath)); - }, - /** - * Delete alarm silencer by silencer id. - * @summary Delete alarm silencer - * @param {string} id silencer id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteSilencer(id: string, options?: any): AxiosPromise { - return localVarFp.deleteSilencer(id, options).then((request) => request(axios, basePath)); - }, - /** - * Get alarm receiver, query by receiver name. - * @summary Get alarm receiver - * @param {string} name rule name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getReceiver(name: string, options?: any): AxiosPromise { - return localVarFp.getReceiver(name, options).then((request) => request(axios, basePath)); - }, - /** - * Get alarm receiver template. - * @summary Get alarm receiver template - * @param {string} type receiver type - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getReceiverTemplate(type: string, options?: any): AxiosPromise { - return localVarFp.getReceiverTemplate(type, options).then((request) => request(axios, basePath)); - }, - /** - * Get alarm route, query by route name. - * @summary Get alarm route - * @param {string} id route id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRoute(id: string, options?: any): AxiosPromise { - return localVarFp.getRoute(id, options).then((request) => request(axios, basePath)); - }, - /** - * Get alarm rule, query by rule name. - * @summary Get alarm rule - * @param {string} name rule name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRule(name: string, options?: any): AxiosPromise { - return localVarFp.getRule(name, options).then((request) => request(axios, basePath)); - }, - /** - * Get alarm silencer, query by silencer id. - * @summary Get alarm silencer - * @param {string} id silencer id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSilencer(id: string, options?: any): AxiosPromise { - return localVarFp.getSilencer(id, options).then((request) => request(axios, basePath)); - }, - /** - * List alerts, filter with alarm objects, severity, time and keywords. - * @summary List alerts - * @param {AlertAlertFilter} [body] alert filter - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listAlerts(body?: AlertAlertFilter, options?: any): AxiosPromise { - return localVarFp.listAlerts(body, options).then((request) => request(axios, basePath)); - }, - /** - * List alarm receiver templates. - * @summary List alarm receiver templates + * create k8s namespace + * @summary create k8s namespace + * @param {ParamCreateNamespaceParam} body create obcluster request body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listReceiverTemplates(options?: any): AxiosPromise { - return localVarFp.listReceiverTemplates(options).then((request) => request(axios, basePath)); + createK8sNamespace(body: ParamCreateNamespaceParam, options?: any): AxiosPromise { + return localVarFp.createK8sNamespace(body, options).then((request) => request(axios, basePath)); }, /** - * List alarm receivers, do not support filter, list all receivers at once. - * @summary List alarm receivers + * list k8s events + * @summary list k8s event + * @param {ListK8sEventsObjectTypeEnum} [objectType] related object types + * @param {ListK8sEventsTypeEnum} [type] event level + * @param {string} [name] Object name + * @param {string} [namespace] Namespace * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listReceivers(options?: any): AxiosPromise { - return localVarFp.listReceivers(options).then((request) => request(axios, basePath)); + listK8sEvents(objectType?: ListK8sEventsObjectTypeEnum, type?: ListK8sEventsTypeEnum, name?: string, namespace?: string, options?: any): AxiosPromise { + return localVarFp.listK8sEvents(objectType, type, name, namespace, options).then((request) => request(axios, basePath)); }, /** - * List alarm routes, do not support filter, list all routes at once. - * @summary List alarm routes + * list k8s namespaces + * @summary list k8s namespaces * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listRoutes(options?: any): AxiosPromise { - return localVarFp.listRoutes(options).then((request) => request(axios, basePath)); + listK8sNamespaces(options?: any): AxiosPromise { + return localVarFp.listK8sNamespaces(options).then((request) => request(axios, basePath)); }, /** - * List alarm rules, filter with alarm objects type, severity and keywords. - * @summary List alarm rules - * @param {RuleRuleFilter} [body] rule filter + * list k8s nodes + * @summary list k8s nodes * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listRules(body?: RuleRuleFilter, options?: any): AxiosPromise { - return localVarFp.listRules(body, options).then((request) => request(axios, basePath)); + listK8sNodes(options?: any): AxiosPromise { + return localVarFp.listK8sNodes(options).then((request) => request(axios, basePath)); }, - /** - * List alarm silencers, filter with alarm objects and keywords. - * @summary List alarm silencers - * @param {SilenceSilencerFilter} [body] silencer filter + /** + * list k8s storage classes + * @summary list k8s storage classes * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSilencers(body?: SilenceSilencerFilter, options?: any): AxiosPromise { - return localVarFp.listSilencers(body, options).then((request) => request(axios, basePath)); + listK8sStorageClasses(options?: any): AxiosPromise { + return localVarFp.listK8sStorageClasses(options).then((request) => request(axios, basePath)); }, }; }; /** - * AlarmApi - object-oriented interface + * ClusterApi - object-oriented interface * @export - * @class AlarmApi + * @class ClusterApi * @extends {BaseAPI} */ -export class AlarmApi extends BaseAPI { +export class ClusterApi extends BaseAPI { /** - * Create or update alarm receiver. - * @summary Create or update alarm receiver - * @param {ReceiverReceiver} body receiver + * create k8s namespace + * @summary create k8s namespace + * @param {ParamCreateNamespaceParam} body create obcluster request body * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AlarmApi + * @memberof ClusterApi */ - public createOrUpdateReceiver(body: ReceiverReceiver, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).createOrUpdateReceiver(body, options).then((request) => request(this.axios, this.basePath)); + public createK8sNamespace(body: ParamCreateNamespaceParam, options?: RawAxiosRequestConfig) { + return ClusterApiFp(this.configuration).createK8sNamespace(body, options).then((request) => request(this.axios, this.basePath)); } /** - * Create or update alarm route. - * @summary Create or update alarm route - * @param {RouteRouteParam} body route + * list k8s events + * @summary list k8s event + * @param {ListK8sEventsObjectTypeEnum} [objectType] related object types + * @param {ListK8sEventsTypeEnum} [type] event level + * @param {string} [name] Object name + * @param {string} [namespace] Namespace * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AlarmApi + * @memberof ClusterApi */ - public createOrUpdateRoute(body: RouteRouteParam, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).createOrUpdateRoute(body, options).then((request) => request(this.axios, this.basePath)); + public listK8sEvents(objectType?: ListK8sEventsObjectTypeEnum, type?: ListK8sEventsTypeEnum, name?: string, namespace?: string, options?: RawAxiosRequestConfig) { + return ClusterApiFp(this.configuration).listK8sEvents(objectType, type, name, namespace, options).then((request) => request(this.axios, this.basePath)); } /** - * Create or update alarm rule. - * @summary Create or update alarm rule - * @param {RuleRule} body rule + * list k8s namespaces + * @summary list k8s namespaces * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AlarmApi + * @memberof ClusterApi */ - public createOrUpdateRule(body: RuleRule, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).createOrUpdateRule(body, options).then((request) => request(this.axios, this.basePath)); + public listK8sNamespaces(options?: RawAxiosRequestConfig) { + return ClusterApiFp(this.configuration).listK8sNamespaces(options).then((request) => request(this.axios, this.basePath)); } /** - * Create or update alarm silencer. - * @summary Create or update alarm silencer - * @param {SilenceSilencerParam} body silencer + * list k8s nodes + * @summary list k8s nodes * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AlarmApi + * @memberof ClusterApi */ - public createOrUpdateSilencer(body: SilenceSilencerParam, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).createOrUpdateSilencer(body, options).then((request) => request(this.axios, this.basePath)); + public listK8sNodes(options?: RawAxiosRequestConfig) { + return ClusterApiFp(this.configuration).listK8sNodes(options).then((request) => request(this.axios, this.basePath)); } /** - * Delete alarm receiver by receiver name. - * @summary Delete alarm receiver - * @param {string} name receiver name + * list k8s storage classes + * @summary list k8s storage classes * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AlarmApi + * @memberof ClusterApi */ - public deleteReceiver(name: string, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).deleteReceiver(name, options).then((request) => request(this.axios, this.basePath)); + public listK8sStorageClasses(options?: RawAxiosRequestConfig) { + return ClusterApiFp(this.configuration).listK8sStorageClasses(options).then((request) => request(this.axios, this.basePath)); } +} - /** - * Delete alarm channel by channel name. - * @summary Delete alarm channel - * @param {string} id route id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AlarmApi - */ - public deleteRoute(id: string, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).deleteRoute(id, options).then((request) => request(this.axios, this.basePath)); - } +/** + * @export + */ +export const ListK8sEventsObjectTypeEnum = { + OBCLUSTER: 'OBCLUSTER', + OBTENANT: 'OBTENANT', + OBBACKUPPOLICY: 'OBBACKUPPOLICY', + OBPROXY: 'OBPROXY' +} as const; +export type ListK8sEventsObjectTypeEnum = typeof ListK8sEventsObjectTypeEnum[keyof typeof ListK8sEventsObjectTypeEnum]; +/** + * @export + */ +export const ListK8sEventsTypeEnum = { + NORMAL: 'NORMAL', + WARNING: 'WARNING' +} as const; +export type ListK8sEventsTypeEnum = typeof ListK8sEventsTypeEnum[keyof typeof ListK8sEventsTypeEnum]; - /** - * Delete alarm rule by rule name. - * @summary Delete alarm rule - * @param {string} name rule name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AlarmApi - */ - public deleteRule(name: string, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).deleteRule(name, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Delete alarm silencer by silencer id. - * @summary Delete alarm silencer - * @param {string} id silencer id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AlarmApi - */ - public deleteSilencer(id: string, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).deleteSilencer(id, options).then((request) => request(this.axios, this.basePath)); - } +/** + * InfoApi - axios parameter creator + * @export + */ +export const InfoApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Set configurable infos + * @summary Set configurable infos + * @param {ParamConfigurableInfo} body metric query request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + configureInfo: async (body: ParamConfigurableInfo, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('configureInfo', 'body', body) + const localVarPath = `/api/v1/configurable-infos`; + // 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; + } - /** - * Get alarm receiver, query by receiver name. - * @summary Get alarm receiver - * @param {string} name rule name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AlarmApi - */ - public getReceiver(name: string, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).getReceiver(name, options).then((request) => request(this.axios, this.basePath)); - } + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * Get alarm receiver template. - * @summary Get alarm receiver template - * @param {string} type receiver type - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AlarmApi - */ - public getReceiverTemplate(type: string, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).getReceiverTemplate(type, options).then((request) => request(this.axios, this.basePath)); - } + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - /** - * Get alarm route, query by route name. - * @summary Get alarm route - * @param {string} id route id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AlarmApi - */ - public getRoute(id: string, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).getRoute(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Get alarm rule, query by rule name. - * @summary Get alarm rule - * @param {string} name rule name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AlarmApi - */ - public getRule(name: string, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).getRule(name, options).then((request) => request(this.axios, this.basePath)); - } + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get process info of OceanBase Dashboard, including process name etc. + * @summary Get process info + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getProcessInfo: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/info`; + // 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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * get statistic data + * @summary get statistic data + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatistics: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/statistics`; + // 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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * Get alarm silencer, query by silencer id. - * @summary Get alarm silencer - * @param {string} id silencer id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AlarmApi - */ - public getSilencer(id: string, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).getSilencer(id, options).then((request) => request(this.axios, this.basePath)); - } + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - /** - * List alerts, filter with alarm objects, severity, time and keywords. - * @summary List alerts - * @param {AlertAlertFilter} [body] alert filter - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AlarmApi - */ - public listAlerts(body?: AlertAlertFilter, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).listAlerts(body, options).then((request) => request(this.axios, this.basePath)); - } - /** - * List alarm receiver templates. - * @summary List alarm receiver templates - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AlarmApi - */ - public listReceiverTemplates(options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).listReceiverTemplates(options).then((request) => request(this.axios, this.basePath)); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, } +}; - /** - * List alarm receivers, do not support filter, list all receivers at once. - * @summary List alarm receivers - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AlarmApi - */ - public listReceivers(options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).listReceivers(options).then((request) => request(this.axios, this.basePath)); +/** + * InfoApi - functional programming interface + * @export + */ +export const InfoApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = InfoApiAxiosParamCreator(configuration) + return { + /** + * Set configurable infos + * @summary Set configurable infos + * @param {ParamConfigurableInfo} body metric query request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async configureInfo(body: ParamConfigurableInfo, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.configureInfo(body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['InfoApi.configureInfo']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get process info of OceanBase Dashboard, including process name etc. + * @summary Get process info + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getProcessInfo(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProcessInfo(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['InfoApi.getProcessInfo']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * get statistic data + * @summary get statistic data + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatistics(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatistics(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['InfoApi.getStatistics']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, } +}; + +/** + * InfoApi - factory interface + * @export + */ +export const InfoApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = InfoApiFp(configuration) + return { + /** + * Set configurable infos + * @summary Set configurable infos + * @param {ParamConfigurableInfo} body metric query request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + configureInfo(body: ParamConfigurableInfo, options?: any): AxiosPromise { + return localVarFp.configureInfo(body, options).then((request) => request(axios, basePath)); + }, + /** + * Get process info of OceanBase Dashboard, including process name etc. + * @summary Get process info + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getProcessInfo(options?: any): AxiosPromise { + return localVarFp.getProcessInfo(options).then((request) => request(axios, basePath)); + }, + /** + * get statistic data + * @summary get statistic data + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatistics(options?: any): AxiosPromise { + return localVarFp.getStatistics(options).then((request) => request(axios, basePath)); + }, + }; +}; +/** + * InfoApi - object-oriented interface + * @export + * @class InfoApi + * @extends {BaseAPI} + */ +export class InfoApi extends BaseAPI { /** - * List alarm routes, do not support filter, list all routes at once. - * @summary List alarm routes + * Set configurable infos + * @summary Set configurable infos + * @param {ParamConfigurableInfo} body metric query request body * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AlarmApi + * @memberof InfoApi */ - public listRoutes(options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).listRoutes(options).then((request) => request(this.axios, this.basePath)); + public configureInfo(body: ParamConfigurableInfo, options?: RawAxiosRequestConfig) { + return InfoApiFp(this.configuration).configureInfo(body, options).then((request) => request(this.axios, this.basePath)); } /** - * List alarm rules, filter with alarm objects type, severity and keywords. - * @summary List alarm rules - * @param {RuleRuleFilter} [body] rule filter + * Get process info of OceanBase Dashboard, including process name etc. + * @summary Get process info * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AlarmApi + * @memberof InfoApi */ - public listRules(body?: RuleRuleFilter, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).listRules(body, options).then((request) => request(this.axios, this.basePath)); + public getProcessInfo(options?: RawAxiosRequestConfig) { + return InfoApiFp(this.configuration).getProcessInfo(options).then((request) => request(this.axios, this.basePath)); } /** - * List alarm silencers, filter with alarm objects and keywords. - * @summary List alarm silencers - * @param {SilenceSilencerFilter} [body] silencer filter + * get statistic data + * @summary get statistic data * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AlarmApi + * @memberof InfoApi */ - public listSilencers(body?: SilenceSilencerFilter, options?: RawAxiosRequestConfig) { - return AlarmApiFp(this.configuration).listSilencers(body, options).then((request) => request(this.axios, this.basePath)); + public getStatistics(options?: RawAxiosRequestConfig) { + return InfoApiFp(this.configuration).getStatistics(options).then((request) => request(this.axios, this.basePath)); } } /** - * ClusterApi - axios parameter creator + * InspectionApi - axios parameter creator * @export */ -export const ClusterApiAxiosParamCreator = function (configuration?: Configuration) { +export const InspectionApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * create k8s namespace - * @summary create k8s namespace - * @param {ParamCreateNamespaceParam} body create obcluster request body + * create or update inspection policy + * @summary create or update inspection policy + * @param {InspectionPolicy} body inspection policy * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createK8sNamespace: async (body: ParamCreateNamespaceParam, options: RawAxiosRequestConfig = {}): Promise => { + createOrUpdateInspectionPolicy: async (body: InspectionPolicy, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined - assertParamExists('createK8sNamespace', 'body', body) - const localVarPath = `/api/v1/cluster/namespaces`; + assertParamExists('createOrUpdateInspectionPolicy', 'body', body) + const localVarPath = `/api/v1/inspection/policies`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -8272,7 +10776,7 @@ export const ClusterApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -8294,17 +10798,13 @@ export const ClusterApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * list k8s events - * @summary list k8s event - * @param {ListK8sEventsObjectTypeEnum} [objectType] related object types - * @param {ListK8sEventsTypeEnum} [type] event level - * @param {string} [name] Object name - * @param {string} [namespace] Namespace + * delete inspection policy + * @summary delete inspection policy * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listK8sEvents: async (objectType?: ListK8sEventsObjectTypeEnum, type?: ListK8sEventsTypeEnum, name?: string, namespace?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/cluster/events`; + deleteInspectionPolicy: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/inspection/policies/{namespace}/{name}/{scenario}`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -8312,29 +10812,79 @@ export const ClusterApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - if (objectType !== undefined) { - localVarQueryParameter['objectType'] = objectType; - } - if (type !== undefined) { - localVarQueryParameter['type'] = type; - } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - if (name !== undefined) { - localVarQueryParameter['name'] = name; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * get inspection policy + * @summary get inspection policy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInspectionPolicy: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/inspection/policies/{namespace}/{name}`; + // 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; } - if (namespace !== undefined) { - localVarQueryParameter['namespace'] = namespace; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * get inspection report + * @summary get inspection report + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInspectionReport: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/inspection/reports/{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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -8347,13 +10897,16 @@ export const ClusterApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * list k8s namespaces - * @summary list k8s namespaces + * list inspection policies + * @summary list inspection policies + * @param {string} [namespace] Namespace + * @param {string} [name] Object name + * @param {string} [obclusterName] obcluster name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listK8sNamespaces: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/cluster/namespaces`; + listInspectionPolicies: async (namespace?: string, name?: string, obclusterName?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/inspection/policies`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -8368,6 +10921,18 @@ export const ClusterApiAxiosParamCreator = function (configuration?: Configurati // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + if (namespace !== undefined) { + localVarQueryParameter['namespace'] = namespace; + } + + if (name !== undefined) { + localVarQueryParameter['name'] = name; + } + + if (obclusterName !== undefined) { + localVarQueryParameter['obclusterName'] = obclusterName; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -8380,13 +10945,13 @@ export const ClusterApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * list k8s nodes - * @summary list k8s nodes + * list inspection reports + * @summary list inspection reports * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listK8sNodes: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/cluster/nodes`; + listInspectionReports: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/inspection/reports`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -8413,13 +10978,13 @@ export const ClusterApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * list k8s storage classes - * @summary list k8s storage classes + * trigger inspection + * @summary trigger inspection * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listK8sStorageClasses: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/cluster/storageClasses`; + triggerInspection: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/inspection/policies/{namespace}/{name}/{scenario}`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -8427,7 +10992,7 @@ export const ClusterApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -8449,245 +11014,285 @@ export const ClusterApiAxiosParamCreator = function (configuration?: Configurati }; /** - * ClusterApi - functional programming interface + * InspectionApi - functional programming interface * @export */ -export const ClusterApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ClusterApiAxiosParamCreator(configuration) +export const InspectionApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = InspectionApiAxiosParamCreator(configuration) return { /** - * create k8s namespace - * @summary create k8s namespace - * @param {ParamCreateNamespaceParam} body create obcluster request body + * create or update inspection policy + * @summary create or update inspection policy + * @param {InspectionPolicy} body inspection policy * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createK8sNamespace(body: ParamCreateNamespaceParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createK8sNamespace(body, options); + async createOrUpdateInspectionPolicy(body: InspectionPolicy, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOrUpdateInspectionPolicy(body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ClusterApi.createK8sNamespace']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['InspectionApi.createOrUpdateInspectionPolicy']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * list k8s events - * @summary list k8s event - * @param {ListK8sEventsObjectTypeEnum} [objectType] related object types - * @param {ListK8sEventsTypeEnum} [type] event level - * @param {string} [name] Object name - * @param {string} [namespace] Namespace + * delete inspection policy + * @summary delete inspection policy * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listK8sEvents(objectType?: ListK8sEventsObjectTypeEnum, type?: ListK8sEventsTypeEnum, name?: string, namespace?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listK8sEvents(objectType, type, name, namespace, options); + async deleteInspectionPolicy(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteInspectionPolicy(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ClusterApi.listK8sEvents']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['InspectionApi.deleteInspectionPolicy']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * list k8s namespaces - * @summary list k8s namespaces + * get inspection policy + * @summary get inspection policy * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listK8sNamespaces(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listK8sNamespaces(options); + async getInspectionPolicy(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getInspectionPolicy(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ClusterApi.listK8sNamespaces']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['InspectionApi.getInspectionPolicy']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * list k8s nodes - * @summary list k8s nodes + * get inspection report + * @summary get inspection report * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listK8sNodes(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listK8sNodes(options); + async getInspectionReport(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getInspectionReport(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ClusterApi.listK8sNodes']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['InspectionApi.getInspectionReport']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * list k8s storage classes - * @summary list k8s storage classes + * list inspection policies + * @summary list inspection policies + * @param {string} [namespace] Namespace + * @param {string} [name] Object name + * @param {string} [obclusterName] obcluster name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listK8sStorageClasses(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listK8sStorageClasses(options); + async listInspectionPolicies(namespace?: string, name?: string, obclusterName?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listInspectionPolicies(namespace, name, obclusterName, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ClusterApi.listK8sStorageClasses']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['InspectionApi.listInspectionPolicies']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * list inspection reports + * @summary list inspection reports + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listInspectionReports(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listInspectionReports(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['InspectionApi.listInspectionReports']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * trigger inspection + * @summary trigger inspection + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async triggerInspection(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.triggerInspection(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['InspectionApi.triggerInspection']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * ClusterApi - factory interface + * InspectionApi - factory interface * @export */ -export const ClusterApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ClusterApiFp(configuration) +export const InspectionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = InspectionApiFp(configuration) return { /** - * create k8s namespace - * @summary create k8s namespace - * @param {ParamCreateNamespaceParam} body create obcluster request body + * create or update inspection policy + * @summary create or update inspection policy + * @param {InspectionPolicy} body inspection policy * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createK8sNamespace(body: ParamCreateNamespaceParam, options?: any): AxiosPromise { - return localVarFp.createK8sNamespace(body, options).then((request) => request(axios, basePath)); + createOrUpdateInspectionPolicy(body: InspectionPolicy, options?: any): AxiosPromise { + return localVarFp.createOrUpdateInspectionPolicy(body, options).then((request) => request(axios, basePath)); }, /** - * list k8s events - * @summary list k8s event - * @param {ListK8sEventsObjectTypeEnum} [objectType] related object types - * @param {ListK8sEventsTypeEnum} [type] event level - * @param {string} [name] Object name - * @param {string} [namespace] Namespace + * delete inspection policy + * @summary delete inspection policy * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listK8sEvents(objectType?: ListK8sEventsObjectTypeEnum, type?: ListK8sEventsTypeEnum, name?: string, namespace?: string, options?: any): AxiosPromise { - return localVarFp.listK8sEvents(objectType, type, name, namespace, options).then((request) => request(axios, basePath)); + deleteInspectionPolicy(options?: any): AxiosPromise { + return localVarFp.deleteInspectionPolicy(options).then((request) => request(axios, basePath)); }, /** - * list k8s namespaces - * @summary list k8s namespaces + * get inspection policy + * @summary get inspection policy * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listK8sNamespaces(options?: any): AxiosPromise { - return localVarFp.listK8sNamespaces(options).then((request) => request(axios, basePath)); + getInspectionPolicy(options?: any): AxiosPromise { + return localVarFp.getInspectionPolicy(options).then((request) => request(axios, basePath)); }, /** - * list k8s nodes - * @summary list k8s nodes + * get inspection report + * @summary get inspection report * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listK8sNodes(options?: any): AxiosPromise { - return localVarFp.listK8sNodes(options).then((request) => request(axios, basePath)); + getInspectionReport(options?: any): AxiosPromise { + return localVarFp.getInspectionReport(options).then((request) => request(axios, basePath)); }, /** - * list k8s storage classes - * @summary list k8s storage classes + * list inspection policies + * @summary list inspection policies + * @param {string} [namespace] Namespace + * @param {string} [name] Object name + * @param {string} [obclusterName] obcluster name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listK8sStorageClasses(options?: any): AxiosPromise { - return localVarFp.listK8sStorageClasses(options).then((request) => request(axios, basePath)); + listInspectionPolicies(namespace?: string, name?: string, obclusterName?: string, options?: any): AxiosPromise { + return localVarFp.listInspectionPolicies(namespace, name, obclusterName, options).then((request) => request(axios, basePath)); + }, + /** + * list inspection reports + * @summary list inspection reports + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listInspectionReports(options?: any): AxiosPromise { + return localVarFp.listInspectionReports(options).then((request) => request(axios, basePath)); + }, + /** + * trigger inspection + * @summary trigger inspection + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + triggerInspection(options?: any): AxiosPromise { + return localVarFp.triggerInspection(options).then((request) => request(axios, basePath)); }, }; }; /** - * ClusterApi - object-oriented interface + * InspectionApi - object-oriented interface * @export - * @class ClusterApi + * @class InspectionApi * @extends {BaseAPI} */ -export class ClusterApi extends BaseAPI { +export class InspectionApi extends BaseAPI { /** - * create k8s namespace - * @summary create k8s namespace - * @param {ParamCreateNamespaceParam} body create obcluster request body + * create or update inspection policy + * @summary create or update inspection policy + * @param {InspectionPolicy} body inspection policy * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ClusterApi + * @memberof InspectionApi */ - public createK8sNamespace(body: ParamCreateNamespaceParam, options?: RawAxiosRequestConfig) { - return ClusterApiFp(this.configuration).createK8sNamespace(body, options).then((request) => request(this.axios, this.basePath)); + public createOrUpdateInspectionPolicy(body: InspectionPolicy, options?: RawAxiosRequestConfig) { + return InspectionApiFp(this.configuration).createOrUpdateInspectionPolicy(body, options).then((request) => request(this.axios, this.basePath)); } /** - * list k8s events - * @summary list k8s event - * @param {ListK8sEventsObjectTypeEnum} [objectType] related object types - * @param {ListK8sEventsTypeEnum} [type] event level - * @param {string} [name] Object name - * @param {string} [namespace] Namespace + * delete inspection policy + * @summary delete inspection policy * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ClusterApi + * @memberof InspectionApi */ - public listK8sEvents(objectType?: ListK8sEventsObjectTypeEnum, type?: ListK8sEventsTypeEnum, name?: string, namespace?: string, options?: RawAxiosRequestConfig) { - return ClusterApiFp(this.configuration).listK8sEvents(objectType, type, name, namespace, options).then((request) => request(this.axios, this.basePath)); + public deleteInspectionPolicy(options?: RawAxiosRequestConfig) { + return InspectionApiFp(this.configuration).deleteInspectionPolicy(options).then((request) => request(this.axios, this.basePath)); } /** - * list k8s namespaces - * @summary list k8s namespaces + * get inspection policy + * @summary get inspection policy * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ClusterApi + * @memberof InspectionApi */ - public listK8sNamespaces(options?: RawAxiosRequestConfig) { - return ClusterApiFp(this.configuration).listK8sNamespaces(options).then((request) => request(this.axios, this.basePath)); + public getInspectionPolicy(options?: RawAxiosRequestConfig) { + return InspectionApiFp(this.configuration).getInspectionPolicy(options).then((request) => request(this.axios, this.basePath)); } /** - * list k8s nodes - * @summary list k8s nodes + * get inspection report + * @summary get inspection report * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ClusterApi + * @memberof InspectionApi */ - public listK8sNodes(options?: RawAxiosRequestConfig) { - return ClusterApiFp(this.configuration).listK8sNodes(options).then((request) => request(this.axios, this.basePath)); + public getInspectionReport(options?: RawAxiosRequestConfig) { + return InspectionApiFp(this.configuration).getInspectionReport(options).then((request) => request(this.axios, this.basePath)); } /** - * list k8s storage classes - * @summary list k8s storage classes + * list inspection policies + * @summary list inspection policies + * @param {string} [namespace] Namespace + * @param {string} [name] Object name + * @param {string} [obclusterName] obcluster name * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ClusterApi + * @memberof InspectionApi */ - public listK8sStorageClasses(options?: RawAxiosRequestConfig) { - return ClusterApiFp(this.configuration).listK8sStorageClasses(options).then((request) => request(this.axios, this.basePath)); + public listInspectionPolicies(namespace?: string, name?: string, obclusterName?: string, options?: RawAxiosRequestConfig) { + return InspectionApiFp(this.configuration).listInspectionPolicies(namespace, name, obclusterName, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * list inspection reports + * @summary list inspection reports + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InspectionApi + */ + public listInspectionReports(options?: RawAxiosRequestConfig) { + return InspectionApiFp(this.configuration).listInspectionReports(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * trigger inspection + * @summary trigger inspection + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InspectionApi + */ + public triggerInspection(options?: RawAxiosRequestConfig) { + return InspectionApiFp(this.configuration).triggerInspection(options).then((request) => request(this.axios, this.basePath)); } } -/** - * @export - */ -export const ListK8sEventsObjectTypeEnum = { - OBCLUSTER: 'OBCLUSTER', - OBTENANT: 'OBTENANT', - OBBACKUPPOLICY: 'OBBACKUPPOLICY', - OBPROXY: 'OBPROXY' -} as const; -export type ListK8sEventsObjectTypeEnum = typeof ListK8sEventsObjectTypeEnum[keyof typeof ListK8sEventsObjectTypeEnum]; -/** - * @export - */ -export const ListK8sEventsTypeEnum = { - NORMAL: 'NORMAL', - WARNING: 'WARNING' -} as const; -export type ListK8sEventsTypeEnum = typeof ListK8sEventsTypeEnum[keyof typeof ListK8sEventsTypeEnum]; /** - * InfoApi - axios parameter creator + * JobApi - axios parameter creator * @export */ -export const InfoApiAxiosParamCreator = function (configuration?: Configuration) { +export const JobApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Set configurable infos - * @summary Set configurable infos - * @param {ParamConfigurableInfo} body metric query request body + * Delete a job by id + * @summary Delete a job * @param {*} [options] Override http request option. * @throws {RequiredError} */ - configureInfo: async (body: ParamConfigurableInfo, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'body' is not null or undefined - assertParamExists('configureInfo', 'body', body) - const localVarPath = `/api/v1/configurable-infos`; + deleteJob: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/jobs/{id}`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -8695,7 +11300,7 @@ export const InfoApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -8704,39 +11309,6 @@ export const InfoApiAxiosParamCreator = function (configuration?: Configuration) - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get process info of OceanBase Dashboard, including process name etc. - * @summary Get process info - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getProcessInfo: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/info`; - // 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: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -8747,13 +11319,13 @@ export const InfoApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * get statistic data - * @summary get statistic data + * Get job by id + * @summary Get job * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getStatistics: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/statistics`; + getJob: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/jobs/{id}`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -8777,135 +11349,100 @@ export const InfoApiAxiosParamCreator = function (configuration?: Configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, - }; - }, - } -}; - -/** - * InfoApi - functional programming interface - * @export - */ -export const InfoApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = InfoApiAxiosParamCreator(configuration) - return { - /** - * Set configurable infos - * @summary Set configurable infos - * @param {ParamConfigurableInfo} body metric query request body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async configureInfo(body: ParamConfigurableInfo, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.configureInfo(body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['InfoApi.configureInfo']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }; }, + } +}; + +/** + * JobApi - functional programming interface + * @export + */ +export const JobApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = JobApiAxiosParamCreator(configuration) + return { /** - * Get process info of OceanBase Dashboard, including process name etc. - * @summary Get process info + * Delete a job by id + * @summary Delete a job * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getProcessInfo(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getProcessInfo(options); + async deleteJob(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteJob(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['InfoApi.getProcessInfo']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['JobApi.deleteJob']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * get statistic data - * @summary get statistic data + * Get job by id + * @summary Get job * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getStatistics(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatistics(options); + async getJob(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getJob(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['InfoApi.getStatistics']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['JobApi.getJob']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * InfoApi - factory interface + * JobApi - factory interface * @export */ -export const InfoApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = InfoApiFp(configuration) +export const JobApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = JobApiFp(configuration) return { /** - * Set configurable infos - * @summary Set configurable infos - * @param {ParamConfigurableInfo} body metric query request body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - configureInfo(body: ParamConfigurableInfo, options?: any): AxiosPromise { - return localVarFp.configureInfo(body, options).then((request) => request(axios, basePath)); - }, - /** - * Get process info of OceanBase Dashboard, including process name etc. - * @summary Get process info + * Delete a job by id + * @summary Delete a job * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getProcessInfo(options?: any): AxiosPromise { - return localVarFp.getProcessInfo(options).then((request) => request(axios, basePath)); + deleteJob(options?: any): AxiosPromise { + return localVarFp.deleteJob(options).then((request) => request(axios, basePath)); }, /** - * get statistic data - * @summary get statistic data + * Get job by id + * @summary Get job * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getStatistics(options?: any): AxiosPromise { - return localVarFp.getStatistics(options).then((request) => request(axios, basePath)); + getJob(options?: any): AxiosPromise { + return localVarFp.getJob(options).then((request) => request(axios, basePath)); }, }; }; /** - * InfoApi - object-oriented interface + * JobApi - object-oriented interface * @export - * @class InfoApi + * @class JobApi * @extends {BaseAPI} */ -export class InfoApi extends BaseAPI { - /** - * Set configurable infos - * @summary Set configurable infos - * @param {ParamConfigurableInfo} body metric query request body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InfoApi - */ - public configureInfo(body: ParamConfigurableInfo, options?: RawAxiosRequestConfig) { - return InfoApiFp(this.configuration).configureInfo(body, options).then((request) => request(this.axios, this.basePath)); - } - +export class JobApi extends BaseAPI { /** - * Get process info of OceanBase Dashboard, including process name etc. - * @summary Get process info + * Delete a job by id + * @summary Delete a job * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof InfoApi + * @memberof JobApi */ - public getProcessInfo(options?: RawAxiosRequestConfig) { - return InfoApiFp(this.configuration).getProcessInfo(options).then((request) => request(this.axios, this.basePath)); + public deleteJob(options?: RawAxiosRequestConfig) { + return JobApiFp(this.configuration).deleteJob(options).then((request) => request(this.axios, this.basePath)); } /** - * get statistic data - * @summary get statistic data + * Get job by id + * @summary Get job * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof InfoApi + * @memberof JobApi */ - public getStatistics(options?: RawAxiosRequestConfig) { - return InfoApiFp(this.configuration).getStatistics(options).then((request) => request(this.axios, this.basePath)); + public getJob(options?: RawAxiosRequestConfig) { + return JobApiFp(this.configuration).getJob(options).then((request) => request(this.axios, this.basePath)); } } @@ -9240,6 +11777,53 @@ export const OBClusterApiAxiosParamCreator = function (configuration?: Configura options: localVarRequestOptions, }; }, + /** + * delete specified observers from the obcluster + * @summary delete observers + * @param {string} namespace obcluster namespace + * @param {string} name obcluster name + * @param {ParamDeleteOBServersParam} body delete observers request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteOBServers: async (namespace: string, name: string, body: ParamDeleteOBServersParam, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'namespace' is not null or undefined + assertParamExists('deleteOBServers', 'namespace', namespace) + // verify required parameter 'name' is not null or undefined + assertParamExists('deleteOBServers', 'name', name) + // verify required parameter 'body' is not null or undefined + assertParamExists('deleteOBServers', 'body', body) + const localVarPath = `/api/v1/obclusters/namespace/{namespace}/name/{name}/observers` + .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))) + .replace(`{${"name"}}`, encodeURIComponent(String(name))); + // 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 ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * delete obzone * @summary delete obzone @@ -9471,6 +12055,100 @@ export const OBClusterApiAxiosParamCreator = function (configuration?: Configura options: localVarRequestOptions, }; }, + /** + * patch obcluster configuration including resources, storage, monitor and parameters + * @summary patch obcluster + * @param {string} namespace obcluster namespace + * @param {string} name obcluster name + * @param {ParamPatchOBClusterParam} body patch obcluster request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + patchOBCluster: async (namespace: string, name: string, body: ParamPatchOBClusterParam, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'namespace' is not null or undefined + assertParamExists('patchOBCluster', 'namespace', namespace) + // verify required parameter 'name' is not null or undefined + assertParamExists('patchOBCluster', 'name', name) + // verify required parameter 'body' is not null or undefined + assertParamExists('patchOBCluster', 'body', body) + const localVarPath = `/api/v1/obclusters/namespace/{namespace}/name/{name}` + .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))) + .replace(`{${"name"}}`, encodeURIComponent(String(name))); + // 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: 'PATCH', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * restart specified observers in the obcluster + * @summary restart observers + * @param {string} namespace obcluster namespace + * @param {string} name obcluster name + * @param {ParamRestartOBServersParam} body restart observers request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + restartOBServers: async (namespace: string, name: string, body: ParamRestartOBServersParam, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'namespace' is not null or undefined + assertParamExists('restartOBServers', 'namespace', namespace) + // verify required parameter 'name' is not null or undefined + assertParamExists('restartOBServers', 'name', name) + // verify required parameter 'body' is not null or undefined + assertParamExists('restartOBServers', 'body', body) + const localVarPath = `/api/v1/obclusters/namespace/{namespace}/name/{name}/restart` + .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))) + .replace(`{${"name"}}`, encodeURIComponent(String(name))); + // 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * scale observer * @summary scale observer @@ -9615,12 +12293,27 @@ export const OBClusterApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOBCluster(namespace: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOBCluster(namespace: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOBCluster(namespace, name, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['OBClusterApi.deleteOBCluster']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * delete specified observers from the obcluster + * @summary delete observers + * @param {string} namespace obcluster namespace + * @param {string} name obcluster name + * @param {ParamDeleteOBServersParam} body delete observers request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteOBServers(namespace: string, name: string, body: ParamDeleteOBServersParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOBServers(namespace, name, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBClusterApi.deleteOBServers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * delete obzone * @summary delete obzone @@ -9702,6 +12395,36 @@ export const OBClusterApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['OBClusterApi.listOBClusters']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * patch obcluster configuration including resources, storage, monitor and parameters + * @summary patch obcluster + * @param {string} namespace obcluster namespace + * @param {string} name obcluster name + * @param {ParamPatchOBClusterParam} body patch obcluster request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async patchOBCluster(namespace: string, name: string, body: ParamPatchOBClusterParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.patchOBCluster(namespace, name, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBClusterApi.patchOBCluster']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * restart specified observers in the obcluster + * @summary restart observers + * @param {string} namespace obcluster namespace + * @param {string} name obcluster name + * @param {ParamRestartOBServersParam} body restart observers request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async restartOBServers(namespace: string, name: string, body: ParamRestartOBServersParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.restartOBServers(namespace, name, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBClusterApi.restartOBServers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * scale observer * @summary scale observer @@ -9773,9 +12496,21 @@ export const OBClusterApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOBCluster(namespace: string, name: string, options?: any): AxiosPromise { + deleteOBCluster(namespace: string, name: string, options?: any): AxiosPromise { return localVarFp.deleteOBCluster(namespace, name, options).then((request) => request(axios, basePath)); }, + /** + * delete specified observers from the obcluster + * @summary delete observers + * @param {string} namespace obcluster namespace + * @param {string} name obcluster name + * @param {ParamDeleteOBServersParam} body delete observers request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteOBServers(namespace: string, name: string, body: ParamDeleteOBServersParam, options?: any): AxiosPromise { + return localVarFp.deleteOBServers(namespace, name, body, options).then((request) => request(axios, basePath)); + }, /** * delete obzone * @summary delete obzone @@ -9839,6 +12574,30 @@ export const OBClusterApiFactory = function (configuration?: Configuration, base listOBClusters(options?: any): AxiosPromise { return localVarFp.listOBClusters(options).then((request) => request(axios, basePath)); }, + /** + * patch obcluster configuration including resources, storage, monitor and parameters + * @summary patch obcluster + * @param {string} namespace obcluster namespace + * @param {string} name obcluster name + * @param {ParamPatchOBClusterParam} body patch obcluster request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + patchOBCluster(namespace: string, name: string, body: ParamPatchOBClusterParam, options?: any): AxiosPromise { + return localVarFp.patchOBCluster(namespace, name, body, options).then((request) => request(axios, basePath)); + }, + /** + * restart specified observers in the obcluster + * @summary restart observers + * @param {string} namespace obcluster namespace + * @param {string} name obcluster name + * @param {ParamRestartOBServersParam} body restart observers request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + restartOBServers(namespace: string, name: string, body: ParamRestartOBServersParam, options?: any): AxiosPromise { + return localVarFp.restartOBServers(namespace, name, body, options).then((request) => request(axios, basePath)); + }, /** * scale observer * @summary scale observer @@ -9913,6 +12672,20 @@ export class OBClusterApi extends BaseAPI { return OBClusterApiFp(this.configuration).deleteOBCluster(namespace, name, options).then((request) => request(this.axios, this.basePath)); } + /** + * delete specified observers from the obcluster + * @summary delete observers + * @param {string} namespace obcluster namespace + * @param {string} name obcluster name + * @param {ParamDeleteOBServersParam} body delete observers request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBClusterApi + */ + public deleteOBServers(namespace: string, name: string, body: ParamDeleteOBServersParam, options?: RawAxiosRequestConfig) { + return OBClusterApiFp(this.configuration).deleteOBServers(namespace, name, body, options).then((request) => request(this.axios, this.basePath)); + } + /** * delete obzone * @summary delete obzone @@ -9988,6 +12761,34 @@ export class OBClusterApi extends BaseAPI { return OBClusterApiFp(this.configuration).listOBClusters(options).then((request) => request(this.axios, this.basePath)); } + /** + * patch obcluster configuration including resources, storage, monitor and parameters + * @summary patch obcluster + * @param {string} namespace obcluster namespace + * @param {string} name obcluster name + * @param {ParamPatchOBClusterParam} body patch obcluster request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBClusterApi + */ + public patchOBCluster(namespace: string, name: string, body: ParamPatchOBClusterParam, options?: RawAxiosRequestConfig) { + return OBClusterApiFp(this.configuration).patchOBCluster(namespace, name, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * restart specified observers in the obcluster + * @summary restart observers + * @param {string} namespace obcluster namespace + * @param {string} name obcluster name + * @param {ParamRestartOBServersParam} body restart observers request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBClusterApi + */ + public restartOBServers(namespace: string, name: string, body: ParamRestartOBServersParam, options?: RawAxiosRequestConfig) { + return OBClusterApiFp(this.configuration).restartOBServers(namespace, name, body, options).then((request) => request(this.axios, this.basePath)); + } + /** * scale observer * @summary scale observer @@ -11106,19 +13907,290 @@ export const OBTenantApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * List related events of specific tenant, including restore, backup and backup policy events - * @summary List related events of specific tenant + * List all the databases under obtenant + * @summary List obtenant databases + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listOBTenantDatabases: async (namespace: string, name: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'namespace' is not null or undefined + assertParamExists('listOBTenantDatabases', 'namespace', namespace) + // verify required parameter 'name' is not null or undefined + assertParamExists('listOBTenantDatabases', 'name', name) + const localVarPath = `/api/v1/obtenants/{namespace}/{name}/databases` + .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))) + .replace(`{${"name"}}`, encodeURIComponent(String(name))); + // 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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List related events of specific tenant, including restore, backup and backup policy events + * @summary List related events of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listOBTenantRelatedEvents: async (namespace: string, name: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'namespace' is not null or undefined + assertParamExists('listOBTenantRelatedEvents', 'namespace', namespace) + // verify required parameter 'name' is not null or undefined + assertParamExists('listOBTenantRelatedEvents', 'name', name) + const localVarPath = `/api/v1/obtenants/{namespace}/{name}/related-events` + .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))) + .replace(`{${"name"}}`, encodeURIComponent(String(name))); + // 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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all the users under obtenant + * @summary List obtenant users + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listOBTenantUsers: async (namespace: string, name: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'namespace' is not null or undefined + assertParamExists('listOBTenantUsers', 'namespace', namespace) + // verify required parameter 'name' is not null or undefined + assertParamExists('listOBTenantUsers', 'name', name) + const localVarPath = `/api/v1/obtenants/{namespace}/{name}/users` + .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))) + .replace(`{${"name"}}`, encodeURIComponent(String(name))); + // 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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Patch an obtenant pool in a specific namespace + * @summary Patch obtenant pool + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {string} zoneName obzone name + * @param {ParamTenantPoolSpec} body patch obtenant pool request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + patchOBTenantPool: async (namespace: string, name: string, zoneName: string, body: ParamTenantPoolSpec, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'namespace' is not null or undefined + assertParamExists('patchOBTenantPool', 'namespace', namespace) + // verify required parameter 'name' is not null or undefined + assertParamExists('patchOBTenantPool', 'name', name) + // verify required parameter 'zoneName' is not null or undefined + assertParamExists('patchOBTenantPool', 'zoneName', zoneName) + // verify required parameter 'body' is not null or undefined + assertParamExists('patchOBTenantPool', 'body', body) + const localVarPath = `/api/v1/obtenants/{namespace}/{name}/pools/{zoneName}` + .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))) + .replace(`{${"name"}}`, encodeURIComponent(String(name))) + .replace(`{${"zoneName"}}`, encodeURIComponent(String(zoneName))); + // 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: 'PATCH', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Patch tenant\'s configuration + * @summary Patch tenant\'s configuration + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {ParamPatchTenant} body patch tenant body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + patchTenant: async (namespace: string, name: string, body: ParamPatchTenant, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'namespace' is not null or undefined + assertParamExists('patchTenant', 'namespace', namespace) + // verify required parameter 'name' is not null or undefined + assertParamExists('patchTenant', 'name', name) + // verify required parameter 'body' is not null or undefined + assertParamExists('patchTenant', 'body', body) + const localVarPath = `/api/v1/obtenants/{namespace}/{name}` + .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))) + .replace(`{${"name"}}`, encodeURIComponent(String(name))); + // 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: 'PATCH', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Replay standby log of specific standby tenant + * @summary Replay standby log of specific standby tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {ParamReplayStandbyLog} body target timestamp to replay to + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + replayStandbyLog: async (namespace: string, name: string, body: ParamReplayStandbyLog, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'namespace' is not null or undefined + assertParamExists('replayStandbyLog', 'namespace', namespace) + // verify required parameter 'name' is not null or undefined + assertParamExists('replayStandbyLog', 'name', name) + // verify required parameter 'body' is not null or undefined + assertParamExists('replayStandbyLog', 'body', body) + const localVarPath = `/api/v1/obtenants/{namespace}/{name}/logreplay` + .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))) + .replace(`{${"name"}}`, encodeURIComponent(String(name))); + // 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Update backup policy of specific tenant + * @summary Update backup policy of specific tenant * @param {string} namespace obtenant namespace * @param {string} name obtenant name + * @param {ParamUpdateBackupPolicy} body update backup policy request body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listOBTenantRelatedEvents: async (namespace: string, name: string, options: RawAxiosRequestConfig = {}): Promise => { + updateBackupPolicy: async (namespace: string, name: string, body: ParamUpdateBackupPolicy, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'namespace' is not null or undefined - assertParamExists('listOBTenantRelatedEvents', 'namespace', namespace) + assertParamExists('updateBackupPolicy', 'namespace', namespace) // verify required parameter 'name' is not null or undefined - assertParamExists('listOBTenantRelatedEvents', 'name', name) - const localVarPath = `/api/v1/obtenants/{namespace}/{name}/related-events` + assertParamExists('updateBackupPolicy', 'name', name) + // verify required parameter 'body' is not null or undefined + assertParamExists('updateBackupPolicy', 'body', body) + const localVarPath = `/api/v1/obtenants/{namespace}/{name}/backupPolicy` .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))) .replace(`{${"name"}}`, encodeURIComponent(String(name))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -11128,7 +14200,7 @@ export const OBTenantApiAxiosParamCreator = function (configuration?: Configurat baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -11137,9 +14209,12 @@ export const OBTenantApiAxiosParamCreator = function (configuration?: Configurat + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -11147,28 +14222,21 @@ export const OBTenantApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Patch an obtenant pool in a specific namespace - * @summary Patch obtenant pool + * Upgrade tenant compatibility version of specific tenant to match the version of cluster + * @summary Upgrade tenant compatibility version of specific tenant * @param {string} namespace obtenant namespace * @param {string} name obtenant name - * @param {string} zoneName obzone name - * @param {ParamTenantPoolSpec} body patch obtenant pool request body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - patchOBTenantPool: async (namespace: string, name: string, zoneName: string, body: ParamTenantPoolSpec, options: RawAxiosRequestConfig = {}): Promise => { + upgradeTenantVersion: async (namespace: string, name: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'namespace' is not null or undefined - assertParamExists('patchOBTenantPool', 'namespace', namespace) + assertParamExists('upgradeTenantVersion', 'namespace', namespace) // verify required parameter 'name' is not null or undefined - assertParamExists('patchOBTenantPool', 'name', name) - // verify required parameter 'zoneName' is not null or undefined - assertParamExists('patchOBTenantPool', 'zoneName', zoneName) - // verify required parameter 'body' is not null or undefined - assertParamExists('patchOBTenantPool', 'body', body) - const localVarPath = `/api/v1/obtenants/{namespace}/{name}/pools/{zoneName}` + assertParamExists('upgradeTenantVersion', 'name', name) + const localVarPath = `/api/v1/obtenants/{namespace}/{name}/version` .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))) - .replace(`{${"name"}}`, encodeURIComponent(String(name))) - .replace(`{${"zoneName"}}`, encodeURIComponent(String(zoneName))); + .replace(`{${"name"}}`, encodeURIComponent(String(name))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -11176,7 +14244,7 @@ export const OBTenantApiAxiosParamCreator = function (configuration?: Configurat baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -11185,18 +14253,271 @@ export const OBTenantApiAxiosParamCreator = function (configuration?: Configurat - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, + } +}; + +/** + * OBTenantApi - functional programming interface + * @export + */ +export const OBTenantApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = OBTenantApiAxiosParamCreator(configuration) + return { + /** + * Change tenant role of specific tenant, if a tenant is a standby tenant, it can be changed to primary tenant, vice versa + * @summary Change tenant role of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {ParamChangeTenantRole} body target role to change to + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async changeTenantRole(namespace: string, name: string, body: ParamChangeTenantRole, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.changeTenantRole(namespace, name, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.changeTenantRole']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Change root password of specific tenant, encrypted by AES + * @summary Change root password of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {ParamChangeUserPassword} body new password + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async changeUserPassword(namespace: string, name: string, body: ParamChangeUserPassword, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.changeUserPassword(namespace, name, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.changeUserPassword']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create backup policy of specific tenant, passwords should be encrypted by AES + * @summary Create backup policy of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {ParamCreateBackupPolicy} body create backup policy request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createBackupPolicy(namespace: string, name: string, body: ParamCreateBackupPolicy, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createBackupPolicy(namespace, name, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.createBackupPolicy']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create an obtenant pool in a specific namespace + * @summary Create obtenant pool + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {string} zoneName obzone name + * @param {ParamTenantPoolSpec} body create obtenant pool request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createOBTenantPool(namespace: string, name: string, zoneName: string, body: ParamTenantPoolSpec, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOBTenantPool(namespace, name, zoneName, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.createOBTenantPool']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create an obtenant in a specific namespace, passwords should be encrypted by AES + * @summary Create tenant + * @param {ParamCreateOBTenantParam} body create obtenant request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createTenant(body: ParamCreateOBTenantParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createTenant(body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.createTenant']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Delete backup policy of specific tenant + * @summary Delete backup policy of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {string} [force] force delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteBackupPolicy(namespace: string, name: string, force?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBackupPolicy(namespace, name, force, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.deleteBackupPolicy']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Delete an obtenant pool in a specific namespace + * @summary Delete obtenant pool + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {string} zoneName obzone name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteOBTenantPool(namespace: string, name: string, zoneName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOBTenantPool(namespace, name, zoneName, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.deleteOBTenantPool']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Delete an obtenant in a specific namespace, ask user to confrim the deletion carefully + * @summary Delete tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteTenant(namespace: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTenant(namespace, name, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.deleteTenant']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get backup policy of specific tenant + * @summary Get backup policy of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBackupPolicy(namespace: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBackupPolicy(namespace, name, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.getBackupPolicy']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List statistics information of tenants + * @summary List statistics information of tenants + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOBTenantStatistic(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOBTenantStatistic(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.getOBTenantStatistic']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get an obtenant in a specific namespace + * @summary Get tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTenant(namespace: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTenant(namespace, name, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.getTenant']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all tenants and return them + * @summary List all tenants + * @param {string} [obcluster] obcluster to filter + * @param {string} [ns] namespace to filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listAllTenants(obcluster?: string, ns?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAllTenants(obcluster, ns, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.listAllTenants']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List backup jobs of specific tenant + * @summary List backup jobs of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {ListBackupJobsTypeEnum} type backup job type + * @param {number} [limit] limit + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listBackupJobs(namespace: string, name: string, type: ListBackupJobsTypeEnum, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listBackupJobs(namespace, name, type, limit, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.listBackupJobs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all the databases under obtenant + * @summary List obtenant databases + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listOBTenantDatabases(namespace: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listOBTenantDatabases(namespace, name, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.listOBTenantDatabases']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List related events of specific tenant, including restore, backup and backup policy events + * @summary List related events of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listOBTenantRelatedEvents(namespace: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listOBTenantRelatedEvents(namespace, name, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.listOBTenantRelatedEvents']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all the users under obtenant + * @summary List obtenant users + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listOBTenantUsers(namespace: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listOBTenantUsers(namespace, name, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.listOBTenantUsers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Patch an obtenant pool in a specific namespace + * @summary Patch obtenant pool + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {string} zoneName obzone name + * @param {ParamTenantPoolSpec} body patch obtenant pool request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async patchOBTenantPool(namespace: string, name: string, zoneName: string, body: ParamTenantPoolSpec, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.patchOBTenantPool(namespace, name, zoneName, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.patchOBTenantPool']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * Patch tenant\'s configuration * @summary Patch tenant\'s configuration @@ -11206,43 +14527,11 @@ export const OBTenantApiAxiosParamCreator = function (configuration?: Configurat * @param {*} [options] Override http request option. * @throws {RequiredError} */ - patchTenant: async (namespace: string, name: string, body: ParamPatchTenant, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'namespace' is not null or undefined - assertParamExists('patchTenant', 'namespace', namespace) - // verify required parameter 'name' is not null or undefined - assertParamExists('patchTenant', 'name', name) - // verify required parameter 'body' is not null or undefined - assertParamExists('patchTenant', 'body', body) - const localVarPath = `/api/v1/obtenants/{namespace}/{name}` - .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))) - .replace(`{${"name"}}`, encodeURIComponent(String(name))); - // 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: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + async patchTenant(namespace: string, name: string, body: ParamPatchTenant, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.patchTenant(namespace, name, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.patchTenant']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Replay standby log of specific standby tenant @@ -11253,43 +14542,11 @@ export const OBTenantApiAxiosParamCreator = function (configuration?: Configurat * @param {*} [options] Override http request option. * @throws {RequiredError} */ - replayStandbyLog: async (namespace: string, name: string, body: ParamReplayStandbyLog, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'namespace' is not null or undefined - assertParamExists('replayStandbyLog', 'namespace', namespace) - // verify required parameter 'name' is not null or undefined - assertParamExists('replayStandbyLog', 'name', name) - // verify required parameter 'body' is not null or undefined - assertParamExists('replayStandbyLog', 'body', body) - const localVarPath = `/api/v1/obtenants/{namespace}/{name}/logreplay` - .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))) - .replace(`{${"name"}}`, encodeURIComponent(String(name))); - // 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: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + async replayStandbyLog(namespace: string, name: string, body: ParamReplayStandbyLog, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.replayStandbyLog(namespace, name, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.replayStandbyLog']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Update backup policy of specific tenant @@ -11300,43 +14557,11 @@ export const OBTenantApiAxiosParamCreator = function (configuration?: Configurat * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateBackupPolicy: async (namespace: string, name: string, body: ParamUpdateBackupPolicy, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'namespace' is not null or undefined - assertParamExists('updateBackupPolicy', 'namespace', namespace) - // verify required parameter 'name' is not null or undefined - assertParamExists('updateBackupPolicy', 'name', name) - // verify required parameter 'body' is not null or undefined - assertParamExists('updateBackupPolicy', 'body', body) - const localVarPath = `/api/v1/obtenants/{namespace}/{name}/backupPolicy` - .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))) - .replace(`{${"name"}}`, encodeURIComponent(String(name))); - // 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: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + async updateBackupPolicy(namespace: string, name: string, body: ParamUpdateBackupPolicy, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateBackupPolicy(namespace, name, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.updateBackupPolicy']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Upgrade tenant compatibility version of specific tenant to match the version of cluster @@ -11346,48 +14571,21 @@ export const OBTenantApiAxiosParamCreator = function (configuration?: Configurat * @param {*} [options] Override http request option. * @throws {RequiredError} */ - upgradeTenantVersion: async (namespace: string, name: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'namespace' is not null or undefined - assertParamExists('upgradeTenantVersion', 'namespace', namespace) - // verify required parameter 'name' is not null or undefined - assertParamExists('upgradeTenantVersion', 'name', name) - const localVarPath = `/api/v1/obtenants/{namespace}/{name}/version` - .replace(`{${"namespace"}}`, encodeURIComponent(String(namespace))) - .replace(`{${"name"}}`, encodeURIComponent(String(name))); - // 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: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + async upgradeTenantVersion(namespace: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.upgradeTenantVersion(namespace, name, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OBTenantApi.upgradeTenantVersion']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * OBTenantApi - functional programming interface + * OBTenantApi - factory interface * @export */ -export const OBTenantApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = OBTenantApiAxiosParamCreator(configuration) +export const OBTenantApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = OBTenantApiFp(configuration) return { /** * Change tenant role of specific tenant, if a tenant is a standby tenant, it can be changed to primary tenant, vice versa @@ -11398,11 +14596,8 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async changeTenantRole(namespace: string, name: string, body: ParamChangeTenantRole, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.changeTenantRole(namespace, name, body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.changeTenantRole']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + changeTenantRole(namespace: string, name: string, body: ParamChangeTenantRole, options?: any): AxiosPromise { + return localVarFp.changeTenantRole(namespace, name, body, options).then((request) => request(axios, basePath)); }, /** * Change root password of specific tenant, encrypted by AES @@ -11413,11 +14608,8 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async changeUserPassword(namespace: string, name: string, body: ParamChangeUserPassword, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.changeUserPassword(namespace, name, body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.changeUserPassword']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + changeUserPassword(namespace: string, name: string, body: ParamChangeUserPassword, options?: any): AxiosPromise { + return localVarFp.changeUserPassword(namespace, name, body, options).then((request) => request(axios, basePath)); }, /** * Create backup policy of specific tenant, passwords should be encrypted by AES @@ -11428,11 +14620,8 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createBackupPolicy(namespace: string, name: string, body: ParamCreateBackupPolicy, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createBackupPolicy(namespace, name, body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.createBackupPolicy']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + createBackupPolicy(namespace: string, name: string, body: ParamCreateBackupPolicy, options?: any): AxiosPromise { + return localVarFp.createBackupPolicy(namespace, name, body, options).then((request) => request(axios, basePath)); }, /** * Create an obtenant pool in a specific namespace @@ -11444,11 +14633,8 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createOBTenantPool(namespace: string, name: string, zoneName: string, body: ParamTenantPoolSpec, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createOBTenantPool(namespace, name, zoneName, body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.createOBTenantPool']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + createOBTenantPool(namespace: string, name: string, zoneName: string, body: ParamTenantPoolSpec, options?: any): AxiosPromise { + return localVarFp.createOBTenantPool(namespace, name, zoneName, body, options).then((request) => request(axios, basePath)); }, /** * Create an obtenant in a specific namespace, passwords should be encrypted by AES @@ -11457,11 +14643,8 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createTenant(body: ParamCreateOBTenantParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createTenant(body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.createTenant']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + createTenant(body: ParamCreateOBTenantParam, options?: any): AxiosPromise { + return localVarFp.createTenant(body, options).then((request) => request(axios, basePath)); }, /** * Delete backup policy of specific tenant @@ -11472,11 +14655,8 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteBackupPolicy(namespace: string, name: string, force?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBackupPolicy(namespace, name, force, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.deleteBackupPolicy']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + deleteBackupPolicy(namespace: string, name: string, force?: string, options?: any): AxiosPromise { + return localVarFp.deleteBackupPolicy(namespace, name, force, options).then((request) => request(axios, basePath)); }, /** * Delete an obtenant pool in a specific namespace @@ -11484,14 +14664,11 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {string} namespace obtenant namespace * @param {string} name obtenant name * @param {string} zoneName obzone name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteOBTenantPool(namespace: string, name: string, zoneName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOBTenantPool(namespace, name, zoneName, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.deleteOBTenantPool']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteOBTenantPool(namespace: string, name: string, zoneName: string, options?: any): AxiosPromise { + return localVarFp.deleteOBTenantPool(namespace, name, zoneName, options).then((request) => request(axios, basePath)); }, /** * Delete an obtenant in a specific namespace, ask user to confrim the deletion carefully @@ -11501,11 +14678,8 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteTenant(namespace: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTenant(namespace, name, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.deleteTenant']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + deleteTenant(namespace: string, name: string, options?: any): AxiosPromise { + return localVarFp.deleteTenant(namespace, name, options).then((request) => request(axios, basePath)); }, /** * Get backup policy of specific tenant @@ -11515,11 +14689,8 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getBackupPolicy(namespace: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getBackupPolicy(namespace, name, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.getBackupPolicy']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + getBackupPolicy(namespace: string, name: string, options?: any): AxiosPromise { + return localVarFp.getBackupPolicy(namespace, name, options).then((request) => request(axios, basePath)); }, /** * List statistics information of tenants @@ -11527,11 +14698,8 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOBTenantStatistic(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getOBTenantStatistic(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.getOBTenantStatistic']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + getOBTenantStatistic(options?: any): AxiosPromise { + return localVarFp.getOBTenantStatistic(options).then((request) => request(axios, basePath)); }, /** * Get an obtenant in a specific namespace @@ -11541,11 +14709,8 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getTenant(namespace: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTenant(namespace, name, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.getTenant']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + getTenant(namespace: string, name: string, options?: any): AxiosPromise { + return localVarFp.getTenant(namespace, name, options).then((request) => request(axios, basePath)); }, /** * List all tenants and return them @@ -11555,11 +14720,8 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listAllTenants(obcluster?: string, ns?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAllTenants(obcluster, ns, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.listAllTenants']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + listAllTenants(obcluster?: string, ns?: string, options?: any): AxiosPromise { + return localVarFp.listAllTenants(obcluster, ns, options).then((request) => request(axios, basePath)); }, /** * List backup jobs of specific tenant @@ -11571,11 +14733,19 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listBackupJobs(namespace: string, name: string, type: ListBackupJobsTypeEnum, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listBackupJobs(namespace, name, type, limit, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.listBackupJobs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + listBackupJobs(namespace: string, name: string, type: ListBackupJobsTypeEnum, limit?: number, options?: any): AxiosPromise { + return localVarFp.listBackupJobs(namespace, name, type, limit, options).then((request) => request(axios, basePath)); + }, + /** + * List all the databases under obtenant + * @summary List obtenant databases + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listOBTenantDatabases(namespace: string, name: string, options?: any): AxiosPromise { + return localVarFp.listOBTenantDatabases(namespace, name, options).then((request) => request(axios, basePath)); }, /** * List related events of specific tenant, including restore, backup and backup policy events @@ -11585,11 +14755,19 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listOBTenantRelatedEvents(namespace: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listOBTenantRelatedEvents(namespace, name, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.listOBTenantRelatedEvents']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + listOBTenantRelatedEvents(namespace: string, name: string, options?: any): AxiosPromise { + return localVarFp.listOBTenantRelatedEvents(namespace, name, options).then((request) => request(axios, basePath)); + }, + /** + * List all the users under obtenant + * @summary List obtenant users + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listOBTenantUsers(namespace: string, name: string, options?: any): AxiosPromise { + return localVarFp.listOBTenantUsers(namespace, name, options).then((request) => request(axios, basePath)); }, /** * Patch an obtenant pool in a specific namespace @@ -11601,11 +14779,8 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async patchOBTenantPool(namespace: string, name: string, zoneName: string, body: ParamTenantPoolSpec, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.patchOBTenantPool(namespace, name, zoneName, body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.patchOBTenantPool']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + patchOBTenantPool(namespace: string, name: string, zoneName: string, body: ParamTenantPoolSpec, options?: any): AxiosPromise { + return localVarFp.patchOBTenantPool(namespace, name, zoneName, body, options).then((request) => request(axios, basePath)); }, /** * Patch tenant\'s configuration @@ -11616,11 +14791,8 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async patchTenant(namespace: string, name: string, body: ParamPatchTenant, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.patchTenant(namespace, name, body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.patchTenant']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + patchTenant(namespace: string, name: string, body: ParamPatchTenant, options?: any): AxiosPromise { + return localVarFp.patchTenant(namespace, name, body, options).then((request) => request(axios, basePath)); }, /** * Replay standby log of specific standby tenant @@ -11631,11 +14803,8 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async replayStandbyLog(namespace: string, name: string, body: ParamReplayStandbyLog, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.replayStandbyLog(namespace, name, body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.replayStandbyLog']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + replayStandbyLog(namespace: string, name: string, body: ParamReplayStandbyLog, options?: any): AxiosPromise { + return localVarFp.replayStandbyLog(namespace, name, body, options).then((request) => request(axios, basePath)); }, /** * Update backup policy of specific tenant @@ -11646,11 +14815,8 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateBackupPolicy(namespace: string, name: string, body: ParamUpdateBackupPolicy, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateBackupPolicy(namespace, name, body, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.updateBackupPolicy']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + updateBackupPolicy(namespace: string, name: string, body: ParamUpdateBackupPolicy, options?: any): AxiosPromise { + return localVarFp.updateBackupPolicy(namespace, name, body, options).then((request) => request(axios, basePath)); }, /** * Upgrade tenant compatibility version of specific tenant to match the version of cluster @@ -11660,521 +14826,892 @@ export const OBTenantApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async upgradeTenantVersion(namespace: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.upgradeTenantVersion(namespace, name, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['OBTenantApi.upgradeTenantVersion']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + upgradeTenantVersion(namespace: string, name: string, options?: any): AxiosPromise { + return localVarFp.upgradeTenantVersion(namespace, name, options).then((request) => request(axios, basePath)); }, + }; +}; + +/** + * OBTenantApi - object-oriented interface + * @export + * @class OBTenantApi + * @extends {BaseAPI} + */ +export class OBTenantApi extends BaseAPI { + /** + * Change tenant role of specific tenant, if a tenant is a standby tenant, it can be changed to primary tenant, vice versa + * @summary Change tenant role of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {ParamChangeTenantRole} body target role to change to + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public changeTenantRole(namespace: string, name: string, body: ParamChangeTenantRole, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).changeTenantRole(namespace, name, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Change root password of specific tenant, encrypted by AES + * @summary Change root password of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {ParamChangeUserPassword} body new password + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public changeUserPassword(namespace: string, name: string, body: ParamChangeUserPassword, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).changeUserPassword(namespace, name, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create backup policy of specific tenant, passwords should be encrypted by AES + * @summary Create backup policy of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {ParamCreateBackupPolicy} body create backup policy request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public createBackupPolicy(namespace: string, name: string, body: ParamCreateBackupPolicy, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).createBackupPolicy(namespace, name, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create an obtenant pool in a specific namespace + * @summary Create obtenant pool + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {string} zoneName obzone name + * @param {ParamTenantPoolSpec} body create obtenant pool request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public createOBTenantPool(namespace: string, name: string, zoneName: string, body: ParamTenantPoolSpec, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).createOBTenantPool(namespace, name, zoneName, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create an obtenant in a specific namespace, passwords should be encrypted by AES + * @summary Create tenant + * @param {ParamCreateOBTenantParam} body create obtenant request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public createTenant(body: ParamCreateOBTenantParam, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).createTenant(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete backup policy of specific tenant + * @summary Delete backup policy of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {string} [force] force delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public deleteBackupPolicy(namespace: string, name: string, force?: string, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).deleteBackupPolicy(namespace, name, force, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete an obtenant pool in a specific namespace + * @summary Delete obtenant pool + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {string} zoneName obzone name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public deleteOBTenantPool(namespace: string, name: string, zoneName: string, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).deleteOBTenantPool(namespace, name, zoneName, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete an obtenant in a specific namespace, ask user to confrim the deletion carefully + * @summary Delete tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public deleteTenant(namespace: string, name: string, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).deleteTenant(namespace, name, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get backup policy of specific tenant + * @summary Get backup policy of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public getBackupPolicy(namespace: string, name: string, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).getBackupPolicy(namespace, name, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List statistics information of tenants + * @summary List statistics information of tenants + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public getOBTenantStatistic(options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).getOBTenantStatistic(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get an obtenant in a specific namespace + * @summary Get tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public getTenant(namespace: string, name: string, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).getTenant(namespace, name, options).then((request) => request(this.axios, this.basePath)); } -}; + + /** + * List all tenants and return them + * @summary List all tenants + * @param {string} [obcluster] obcluster to filter + * @param {string} [ns] namespace to filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public listAllTenants(obcluster?: string, ns?: string, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).listAllTenants(obcluster, ns, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List backup jobs of specific tenant + * @summary List backup jobs of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {ListBackupJobsTypeEnum} type backup job type + * @param {number} [limit] limit + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public listBackupJobs(namespace: string, name: string, type: ListBackupJobsTypeEnum, limit?: number, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).listBackupJobs(namespace, name, type, limit, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all the databases under obtenant + * @summary List obtenant databases + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public listOBTenantDatabases(namespace: string, name: string, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).listOBTenantDatabases(namespace, name, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List related events of specific tenant, including restore, backup and backup policy events + * @summary List related events of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public listOBTenantRelatedEvents(namespace: string, name: string, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).listOBTenantRelatedEvents(namespace, name, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all the users under obtenant + * @summary List obtenant users + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public listOBTenantUsers(namespace: string, name: string, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).listOBTenantUsers(namespace, name, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Patch an obtenant pool in a specific namespace + * @summary Patch obtenant pool + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {string} zoneName obzone name + * @param {ParamTenantPoolSpec} body patch obtenant pool request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public patchOBTenantPool(namespace: string, name: string, zoneName: string, body: ParamTenantPoolSpec, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).patchOBTenantPool(namespace, name, zoneName, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Patch tenant\'s configuration + * @summary Patch tenant\'s configuration + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {ParamPatchTenant} body patch tenant body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public patchTenant(namespace: string, name: string, body: ParamPatchTenant, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).patchTenant(namespace, name, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Replay standby log of specific standby tenant + * @summary Replay standby log of specific standby tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {ParamReplayStandbyLog} body target timestamp to replay to + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public replayStandbyLog(namespace: string, name: string, body: ParamReplayStandbyLog, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).replayStandbyLog(namespace, name, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Update backup policy of specific tenant + * @summary Update backup policy of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {ParamUpdateBackupPolicy} body update backup policy request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public updateBackupPolicy(namespace: string, name: string, body: ParamUpdateBackupPolicy, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).updateBackupPolicy(namespace, name, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Upgrade tenant compatibility version of specific tenant to match the version of cluster + * @summary Upgrade tenant compatibility version of specific tenant + * @param {string} namespace obtenant namespace + * @param {string} name obtenant name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OBTenantApi + */ + public upgradeTenantVersion(namespace: string, name: string, options?: RawAxiosRequestConfig) { + return OBTenantApiFp(this.configuration).upgradeTenantVersion(namespace, name, options).then((request) => request(this.axios, this.basePath)); + } +} /** - * OBTenantApi - factory interface * @export */ -export const OBTenantApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = OBTenantApiFp(configuration) +export const ListBackupJobsTypeEnum = { + FULL: 'FULL', + INC: 'INC', + CLEAN: 'CLEAN', + ARCHIVE: 'ARCHIVE' +} as const; +export type ListBackupJobsTypeEnum = typeof ListBackupJobsTypeEnum[keyof typeof ListBackupJobsTypeEnum]; + + +/** + * SqlApi - axios parameter creator + * @export + */ +export const SqlApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Change tenant role of specific tenant, if a tenant is a standby tenant, it can be changed to primary tenant, vice versa - * @summary Change tenant role of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {ParamChangeTenantRole} body target role to change to - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - changeTenantRole(namespace: string, name: string, body: ParamChangeTenantRole, options?: any): AxiosPromise { - return localVarFp.changeTenantRole(namespace, name, body, options).then((request) => request(axios, basePath)); - }, - /** - * Change root password of specific tenant, encrypted by AES - * @summary Change root password of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {ParamChangeUserPassword} body new password - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - changeUserPassword(namespace: string, name: string, body: ParamChangeUserPassword, options?: any): AxiosPromise { - return localVarFp.changeUserPassword(namespace, name, body, options).then((request) => request(axios, basePath)); - }, - /** - * Create backup policy of specific tenant, passwords should be encrypted by AES - * @summary Create backup policy of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {ParamCreateBackupPolicy} body create backup policy request body + * list sqls metrics + * @summary list sql metrics * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createBackupPolicy(namespace: string, name: string, body: ParamCreateBackupPolicy, options?: any): AxiosPromise { - return localVarFp.createBackupPolicy(namespace, name, body, options).then((request) => request(axios, basePath)); + listSqlMetrics: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/sql/metrics`; + // 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: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Create an obtenant pool in a specific namespace - * @summary Create obtenant pool - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {string} zoneName obzone name - * @param {ParamTenantPoolSpec} body create obtenant pool request body + * list suspicious sqls + * @summary list suspicious sqls + * @param {SqlSqlFilter} body sql filter * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createOBTenantPool(namespace: string, name: string, zoneName: string, body: ParamTenantPoolSpec, options?: any): AxiosPromise { - return localVarFp.createOBTenantPool(namespace, name, zoneName, body, options).then((request) => request(axios, basePath)); + listSuspiciousSqls: async (body: SqlSqlFilter, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('listSuspiciousSqls', 'body', body) + const localVarPath = `/api/v1/sql/suspiciousSqls`; + // 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Create an obtenant in a specific namespace, passwords should be encrypted by AES - * @summary Create tenant - * @param {ParamCreateOBTenantParam} body create obtenant request body + * list top sqls ordering by spcecific metrics + * @summary list top sqls + * @param {SqlSqlFilter} body sql filter * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTenant(body: ParamCreateOBTenantParam, options?: any): AxiosPromise { - return localVarFp.createTenant(body, options).then((request) => request(axios, basePath)); + listTopSqls: async (body: SqlSqlFilter, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('listTopSqls', 'body', body) + const localVarPath = `/api/v1/sql/topSqls`; + // 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Delete backup policy of specific tenant - * @summary Delete backup policy of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {string} [force] force delete + * query detailed statistic info of a plan + * @summary query plan detail info + * @param {SqlPlanDetailParam} body param for query detailed plan info * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteBackupPolicy(namespace: string, name: string, force?: string, options?: any): AxiosPromise { - return localVarFp.deleteBackupPolicy(namespace, name, force, options).then((request) => request(axios, basePath)); + queryPlanDetailInfo: async (body: SqlPlanDetailParam, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('queryPlanDetailInfo', 'body', body) + const localVarPath = `/api/v1/sql/queryPlanDetailInfo`; + // 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Delete an obtenant pool in a specific namespace - * @summary Delete obtenant pool - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {string} zoneName obzone name + * query detailed statistic info of a SQL + * @summary query SQL detail info + * @param {SqlSqlDetailParam} body param for query detailed sql info * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOBTenantPool(namespace: string, name: string, zoneName: string, options?: any): AxiosPromise { - return localVarFp.deleteOBTenantPool(namespace, name, zoneName, options).then((request) => request(axios, basePath)); + querySqlDetailInfo: async (body: SqlSqlDetailParam, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('querySqlDetailInfo', 'body', body) + const localVarPath = `/api/v1/sql/querySqlDetailInfo`; + // 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, /** - * Delete an obtenant in a specific namespace, ask user to confrim the deletion carefully - * @summary Delete tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name + * list request statistics + * @summary list request statistics + * @param {SqlSqlRequestStatisticParam} body sql request statistic param * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteTenant(namespace: string, name: string, options?: any): AxiosPromise { - return localVarFp.deleteTenant(namespace, name, options).then((request) => request(axios, basePath)); + requestStatistics: async (body: SqlSqlRequestStatisticParam, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('requestStatistics', 'body', body) + const localVarPath = `/api/v1/sql/requestStatistics`; + // 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; }, + } +}; + +/** + * SqlApi - functional programming interface + * @export + */ +export const SqlApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SqlApiAxiosParamCreator(configuration) + return { /** - * Get backup policy of specific tenant - * @summary Get backup policy of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name + * list sqls metrics + * @summary list sql metrics * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getBackupPolicy(namespace: string, name: string, options?: any): AxiosPromise { - return localVarFp.getBackupPolicy(namespace, name, options).then((request) => request(axios, basePath)); + async listSqlMetrics(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSqlMetrics(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SqlApi.listSqlMetrics']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List statistics information of tenants - * @summary List statistics information of tenants + * list suspicious sqls + * @summary list suspicious sqls + * @param {SqlSqlFilter} body sql filter * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOBTenantStatistic(options?: any): AxiosPromise { - return localVarFp.getOBTenantStatistic(options).then((request) => request(axios, basePath)); + async listSuspiciousSqls(body: SqlSqlFilter, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSuspiciousSqls(body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SqlApi.listSuspiciousSqls']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Get an obtenant in a specific namespace - * @summary Get tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name + * list top sqls ordering by spcecific metrics + * @summary list top sqls + * @param {SqlSqlFilter} body sql filter * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTenant(namespace: string, name: string, options?: any): AxiosPromise { - return localVarFp.getTenant(namespace, name, options).then((request) => request(axios, basePath)); + async listTopSqls(body: SqlSqlFilter, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTopSqls(body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SqlApi.listTopSqls']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List all tenants and return them - * @summary List all tenants - * @param {string} [obcluster] obcluster to filter - * @param {string} [ns] namespace to filter + * query detailed statistic info of a plan + * @summary query plan detail info + * @param {SqlPlanDetailParam} body param for query detailed plan info * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAllTenants(obcluster?: string, ns?: string, options?: any): AxiosPromise { - return localVarFp.listAllTenants(obcluster, ns, options).then((request) => request(axios, basePath)); + async queryPlanDetailInfo(body: SqlPlanDetailParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.queryPlanDetailInfo(body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SqlApi.queryPlanDetailInfo']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List backup jobs of specific tenant - * @summary List backup jobs of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {ListBackupJobsTypeEnum} type backup job type - * @param {number} [limit] limit + * query detailed statistic info of a SQL + * @summary query SQL detail info + * @param {SqlSqlDetailParam} body param for query detailed sql info * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listBackupJobs(namespace: string, name: string, type: ListBackupJobsTypeEnum, limit?: number, options?: any): AxiosPromise { - return localVarFp.listBackupJobs(namespace, name, type, limit, options).then((request) => request(axios, basePath)); + async querySqlDetailInfo(body: SqlSqlDetailParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.querySqlDetailInfo(body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SqlApi.querySqlDetailInfo']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * List related events of specific tenant, including restore, backup and backup policy events - * @summary List related events of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name + * list request statistics + * @summary list request statistics + * @param {SqlSqlRequestStatisticParam} body sql request statistic param * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listOBTenantRelatedEvents(namespace: string, name: string, options?: any): AxiosPromise { - return localVarFp.listOBTenantRelatedEvents(namespace, name, options).then((request) => request(axios, basePath)); + async requestStatistics(body: SqlSqlRequestStatisticParam, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestStatistics(body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SqlApi.requestStatistics']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + } +}; + +/** + * SqlApi - factory interface + * @export + */ +export const SqlApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SqlApiFp(configuration) + return { /** - * Patch an obtenant pool in a specific namespace - * @summary Patch obtenant pool - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {string} zoneName obzone name - * @param {ParamTenantPoolSpec} body patch obtenant pool request body + * list sqls metrics + * @summary list sql metrics * @param {*} [options] Override http request option. * @throws {RequiredError} */ - patchOBTenantPool(namespace: string, name: string, zoneName: string, body: ParamTenantPoolSpec, options?: any): AxiosPromise { - return localVarFp.patchOBTenantPool(namespace, name, zoneName, body, options).then((request) => request(axios, basePath)); + listSqlMetrics(options?: any): AxiosPromise { + return localVarFp.listSqlMetrics(options).then((request) => request(axios, basePath)); }, /** - * Patch tenant\'s configuration - * @summary Patch tenant\'s configuration - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {ParamPatchTenant} body patch tenant body + * list suspicious sqls + * @summary list suspicious sqls + * @param {SqlSqlFilter} body sql filter * @param {*} [options] Override http request option. * @throws {RequiredError} */ - patchTenant(namespace: string, name: string, body: ParamPatchTenant, options?: any): AxiosPromise { - return localVarFp.patchTenant(namespace, name, body, options).then((request) => request(axios, basePath)); + listSuspiciousSqls(body: SqlSqlFilter, options?: any): AxiosPromise { + return localVarFp.listSuspiciousSqls(body, options).then((request) => request(axios, basePath)); }, /** - * Replay standby log of specific standby tenant - * @summary Replay standby log of specific standby tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {ParamReplayStandbyLog} body target timestamp to replay to + * list top sqls ordering by spcecific metrics + * @summary list top sqls + * @param {SqlSqlFilter} body sql filter * @param {*} [options] Override http request option. * @throws {RequiredError} */ - replayStandbyLog(namespace: string, name: string, body: ParamReplayStandbyLog, options?: any): AxiosPromise { - return localVarFp.replayStandbyLog(namespace, name, body, options).then((request) => request(axios, basePath)); + listTopSqls(body: SqlSqlFilter, options?: any): AxiosPromise { + return localVarFp.listTopSqls(body, options).then((request) => request(axios, basePath)); }, /** - * Update backup policy of specific tenant - * @summary Update backup policy of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {ParamUpdateBackupPolicy} body update backup policy request body + * query detailed statistic info of a plan + * @summary query plan detail info + * @param {SqlPlanDetailParam} body param for query detailed plan info * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateBackupPolicy(namespace: string, name: string, body: ParamUpdateBackupPolicy, options?: any): AxiosPromise { - return localVarFp.updateBackupPolicy(namespace, name, body, options).then((request) => request(axios, basePath)); + queryPlanDetailInfo(body: SqlPlanDetailParam, options?: any): AxiosPromise { + return localVarFp.queryPlanDetailInfo(body, options).then((request) => request(axios, basePath)); }, /** - * Upgrade tenant compatibility version of specific tenant to match the version of cluster - * @summary Upgrade tenant compatibility version of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name + * query detailed statistic info of a SQL + * @summary query SQL detail info + * @param {SqlSqlDetailParam} body param for query detailed sql info * @param {*} [options] Override http request option. * @throws {RequiredError} - */ - upgradeTenantVersion(namespace: string, name: string, options?: any): AxiosPromise { - return localVarFp.upgradeTenantVersion(namespace, name, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * OBTenantApi - object-oriented interface - * @export - * @class OBTenantApi - * @extends {BaseAPI} - */ -export class OBTenantApi extends BaseAPI { - /** - * Change tenant role of specific tenant, if a tenant is a standby tenant, it can be changed to primary tenant, vice versa - * @summary Change tenant role of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {ParamChangeTenantRole} body target role to change to - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OBTenantApi - */ - public changeTenantRole(namespace: string, name: string, body: ParamChangeTenantRole, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).changeTenantRole(namespace, name, body, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Change root password of specific tenant, encrypted by AES - * @summary Change root password of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {ParamChangeUserPassword} body new password - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OBTenantApi - */ - public changeUserPassword(namespace: string, name: string, body: ParamChangeUserPassword, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).changeUserPassword(namespace, name, body, options).then((request) => request(this.axios, this.basePath)); - } + */ + querySqlDetailInfo(body: SqlSqlDetailParam, options?: any): AxiosPromise { + return localVarFp.querySqlDetailInfo(body, options).then((request) => request(axios, basePath)); + }, + /** + * list request statistics + * @summary list request statistics + * @param {SqlSqlRequestStatisticParam} body sql request statistic param + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestStatistics(body: SqlSqlRequestStatisticParam, options?: any): AxiosPromise { + return localVarFp.requestStatistics(body, options).then((request) => request(axios, basePath)); + }, + }; +}; +/** + * SqlApi - object-oriented interface + * @export + * @class SqlApi + * @extends {BaseAPI} + */ +export class SqlApi extends BaseAPI { /** - * Create backup policy of specific tenant, passwords should be encrypted by AES - * @summary Create backup policy of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {ParamCreateBackupPolicy} body create backup policy request body + * list sqls metrics + * @summary list sql metrics * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof OBTenantApi + * @memberof SqlApi */ - public createBackupPolicy(namespace: string, name: string, body: ParamCreateBackupPolicy, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).createBackupPolicy(namespace, name, body, options).then((request) => request(this.axios, this.basePath)); + public listSqlMetrics(options?: RawAxiosRequestConfig) { + return SqlApiFp(this.configuration).listSqlMetrics(options).then((request) => request(this.axios, this.basePath)); } /** - * Create an obtenant pool in a specific namespace - * @summary Create obtenant pool - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {string} zoneName obzone name - * @param {ParamTenantPoolSpec} body create obtenant pool request body + * list suspicious sqls + * @summary list suspicious sqls + * @param {SqlSqlFilter} body sql filter * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof OBTenantApi + * @memberof SqlApi */ - public createOBTenantPool(namespace: string, name: string, zoneName: string, body: ParamTenantPoolSpec, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).createOBTenantPool(namespace, name, zoneName, body, options).then((request) => request(this.axios, this.basePath)); + public listSuspiciousSqls(body: SqlSqlFilter, options?: RawAxiosRequestConfig) { + return SqlApiFp(this.configuration).listSuspiciousSqls(body, options).then((request) => request(this.axios, this.basePath)); } /** - * Create an obtenant in a specific namespace, passwords should be encrypted by AES - * @summary Create tenant - * @param {ParamCreateOBTenantParam} body create obtenant request body + * list top sqls ordering by spcecific metrics + * @summary list top sqls + * @param {SqlSqlFilter} body sql filter * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof OBTenantApi + * @memberof SqlApi */ - public createTenant(body: ParamCreateOBTenantParam, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).createTenant(body, options).then((request) => request(this.axios, this.basePath)); + public listTopSqls(body: SqlSqlFilter, options?: RawAxiosRequestConfig) { + return SqlApiFp(this.configuration).listTopSqls(body, options).then((request) => request(this.axios, this.basePath)); } /** - * Delete backup policy of specific tenant - * @summary Delete backup policy of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {string} [force] force delete + * query detailed statistic info of a plan + * @summary query plan detail info + * @param {SqlPlanDetailParam} body param for query detailed plan info * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof OBTenantApi + * @memberof SqlApi */ - public deleteBackupPolicy(namespace: string, name: string, force?: string, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).deleteBackupPolicy(namespace, name, force, options).then((request) => request(this.axios, this.basePath)); + public queryPlanDetailInfo(body: SqlPlanDetailParam, options?: RawAxiosRequestConfig) { + return SqlApiFp(this.configuration).queryPlanDetailInfo(body, options).then((request) => request(this.axios, this.basePath)); } /** - * Delete an obtenant pool in a specific namespace - * @summary Delete obtenant pool - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {string} zoneName obzone name + * query detailed statistic info of a SQL + * @summary query SQL detail info + * @param {SqlSqlDetailParam} body param for query detailed sql info * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof OBTenantApi + * @memberof SqlApi */ - public deleteOBTenantPool(namespace: string, name: string, zoneName: string, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).deleteOBTenantPool(namespace, name, zoneName, options).then((request) => request(this.axios, this.basePath)); + public querySqlDetailInfo(body: SqlSqlDetailParam, options?: RawAxiosRequestConfig) { + return SqlApiFp(this.configuration).querySqlDetailInfo(body, options).then((request) => request(this.axios, this.basePath)); } /** - * Delete an obtenant in a specific namespace, ask user to confrim the deletion carefully - * @summary Delete tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name + * list request statistics + * @summary list request statistics + * @param {SqlSqlRequestStatisticParam} body sql request statistic param * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof OBTenantApi + * @memberof SqlApi */ - public deleteTenant(namespace: string, name: string, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).deleteTenant(namespace, name, options).then((request) => request(this.axios, this.basePath)); + public requestStatistics(body: SqlSqlRequestStatisticParam, options?: RawAxiosRequestConfig) { + return SqlApiFp(this.configuration).requestStatistics(body, options).then((request) => request(this.axios, this.basePath)); } +} - /** - * Get backup policy of specific tenant - * @summary Get backup policy of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OBTenantApi - */ - public getBackupPolicy(namespace: string, name: string, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).getBackupPolicy(namespace, name, options).then((request) => request(this.axios, this.basePath)); - } - /** - * List statistics information of tenants - * @summary List statistics information of tenants - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OBTenantApi - */ - public getOBTenantStatistic(options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).getOBTenantStatistic(options).then((request) => request(this.axios, this.basePath)); - } - /** - * Get an obtenant in a specific namespace - * @summary Get tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OBTenantApi - */ - public getTenant(namespace: string, name: string, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).getTenant(namespace, name, options).then((request) => request(this.axios, this.basePath)); - } +/** + * StorageApi - axios parameter creator + * @export + */ +export const StorageApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get file by id + * @summary Get file + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFile: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/storage/{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; + } - /** - * List all tenants and return them - * @summary List all tenants - * @param {string} [obcluster] obcluster to filter - * @param {string} [ns] namespace to filter - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OBTenantApi - */ - public listAllTenants(obcluster?: string, ns?: string, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).listAllTenants(obcluster, ns, options).then((request) => request(this.axios, this.basePath)); - } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * List backup jobs of specific tenant - * @summary List backup jobs of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {ListBackupJobsTypeEnum} type backup job type - * @param {number} [limit] limit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OBTenantApi - */ - public listBackupJobs(namespace: string, name: string, type: ListBackupJobsTypeEnum, limit?: number, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).listBackupJobs(namespace, name, type, limit, options).then((request) => request(this.axios, this.basePath)); - } + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration) - /** - * List related events of specific tenant, including restore, backup and backup policy events - * @summary List related events of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OBTenantApi - */ - public listOBTenantRelatedEvents(namespace: string, name: string, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).listOBTenantRelatedEvents(namespace, name, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Patch an obtenant pool in a specific namespace - * @summary Patch obtenant pool - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {string} zoneName obzone name - * @param {ParamTenantPoolSpec} body patch obtenant pool request body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OBTenantApi - */ - public patchOBTenantPool(namespace: string, name: string, zoneName: string, body: ParamTenantPoolSpec, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).patchOBTenantPool(namespace, name, zoneName, body, options).then((request) => request(this.axios, this.basePath)); - } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - /** - * Patch tenant\'s configuration - * @summary Patch tenant\'s configuration - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {ParamPatchTenant} body patch tenant body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OBTenantApi - */ - public patchTenant(namespace: string, name: string, body: ParamPatchTenant, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).patchTenant(namespace, name, body, options).then((request) => request(this.axios, this.basePath)); + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, } +}; - /** - * Replay standby log of specific standby tenant - * @summary Replay standby log of specific standby tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {ParamReplayStandbyLog} body target timestamp to replay to - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OBTenantApi - */ - public replayStandbyLog(namespace: string, name: string, body: ParamReplayStandbyLog, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).replayStandbyLog(namespace, name, body, options).then((request) => request(this.axios, this.basePath)); +/** + * StorageApi - functional programming interface + * @export + */ +export const StorageApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = StorageApiAxiosParamCreator(configuration) + return { + /** + * Get file by id + * @summary Get file + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getFile(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFile(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StorageApi.getFile']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, } +}; - /** - * Update backup policy of specific tenant - * @summary Update backup policy of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name - * @param {ParamUpdateBackupPolicy} body update backup policy request body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OBTenantApi - */ - public updateBackupPolicy(namespace: string, name: string, body: ParamUpdateBackupPolicy, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).updateBackupPolicy(namespace, name, body, options).then((request) => request(this.axios, this.basePath)); - } +/** + * StorageApi - factory interface + * @export + */ +export const StorageApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = StorageApiFp(configuration) + return { + /** + * Get file by id + * @summary Get file + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFile(options?: any): AxiosPromise { + return localVarFp.getFile(options).then((request) => request(axios, basePath)); + }, + }; +}; +/** + * StorageApi - object-oriented interface + * @export + * @class StorageApi + * @extends {BaseAPI} + */ +export class StorageApi extends BaseAPI { /** - * Upgrade tenant compatibility version of specific tenant to match the version of cluster - * @summary Upgrade tenant compatibility version of specific tenant - * @param {string} namespace obtenant namespace - * @param {string} name obtenant name + * Get file by id + * @summary Get file * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof OBTenantApi + * @memberof StorageApi */ - public upgradeTenantVersion(namespace: string, name: string, options?: RawAxiosRequestConfig) { - return OBTenantApiFp(this.configuration).upgradeTenantVersion(namespace, name, options).then((request) => request(this.axios, this.basePath)); + public getFile(options?: RawAxiosRequestConfig) { + return StorageApiFp(this.configuration).getFile(options).then((request) => request(this.axios, this.basePath)); } } -/** - * @export - */ -export const ListBackupJobsTypeEnum = { - FULL: 'FULL', - INC: 'INC', - CLEAN: 'CLEAN', - ARCHIVE: 'ARCHIVE' -} as const; -export type ListBackupJobsTypeEnum = typeof ListBackupJobsTypeEnum[keyof typeof ListBackupJobsTypeEnum]; /**