diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a9f959c7..6aaddec23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# 3.0.3-beta 2020-10-31 +## HuaweiCloud SDK DevStar + - ### Features + - Add the README.MD file. + - ### Bug Fix + - None + - ### Change + - None + # 3.0.2-beta 2020-10-20 ## HuaweiCloud SDK DevStar - ### Features diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index c917c34b2..73b438e50 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,12 @@ +# 3.0.3-beta 2020-10-31 +## HuaweiCloud SDK DevStar + - ### 新增特性 + - 增加README.MD文件 + - ### 解决问题 + - 无 + - ### 特性变更 + - 无 + # 3.0.2-beta 2020-10-20 ## HuaweiCloud SDK DevStar - ### 新增特性 diff --git a/README.md b/README.md index 708ce4bff..238dea9c2 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,9 @@ You could obtain and install Node.js SDK through following methods: Using npm to install project dependencies is the recommended method to use Node.js SDK: - You must install `@huaweicloud/huaweicloud-sdk-core` library no matter which product/service development kit you need to use. Take using Devstar SDK for example, you need to install `@huaweicloud/huaweicloud-sdk-core` library and `@huaweicloud/huaweicloud-sdk-devstar` library: + You must depended on `@huaweicloud/huaweicloud-sdk-core` library no matter which product/service development kit you need to use. Take using Devstar SDK for example, you need to install `@huaweicloud/huaweicloud-sdk-devstar` library: ``` xml - npm install @huaweicloud/huaweicloud-sdk-core @huaweicloud/huaweicloud-sdk-devstar + npm install @huaweicloud/huaweicloud-sdk-devstar ``` ## Use Node.js SDK @@ -35,8 +35,8 @@ You could obtain and install Node.js SDK through following methods: // User identity authentication import { BasicCredentials } from "@huaweicloud/huaweicloud-sdk-core/auth/BasicCredentials"; import { GlobalCredentials } from "@huaweicloud/huaweicloud-sdk-core/auth/GlobalCredentials"; - // {Service}Client, replace Devstar to your specified service, take DevstarClient for example - import { DevstarClient } from "@huaweicloud/huaweicloud-sdk-devstar/v1/DevstarClient"; + // {Service}Client, replace Devstar to your specified service, take DevStarClient for example + import { DevStarClient } from "@huaweicloud/huaweicloud-sdk-devstar/v1/DevStarClient"; // Import the corresponding product model import { ShowJobDetailRequest } from '@huaweicloud/huaweicloud-sdk-devstar/v1/model/ShowJobDetailRequest'; ``` @@ -47,7 +47,7 @@ You could obtain and install Node.js SDK through following methods: ``` nodejs // Use default configuration - const client = DevstarClient.newBuilder() + const client = DevStarClient.newBuilder() ``` 2.2 Proxy(Optional) @@ -116,7 +116,7 @@ You could obtain and install Node.js SDK through following methods: 4. Initialize the {Service}Client instance ``` nodejs - const client = DevstarClient.newBuilder() + const client = DevStarClient.newBuilder() .withCredential(basicCredentials) .withEndpoint(endpoint) .withProxyAgent(proxy) @@ -233,20 +233,19 @@ You could obtain and install Node.js SDK through following methods: ## Code Example -- The following example shows how to query job detail, you need to substitute your real `{Service}Client` for `DevstarClient` in actual use. +- The following example shows how to query job detail, you need to substitute your real `{Service}Client` for `DevStarClient` in actual use. - Substitute the values for `{your ak string}`, `{your sk string}`, `{your endpoint string}`, `{your project id}`and `{job id}`. ``` nodejs import express = require('express'); - import { DevstarClient } from "@huaweicloud/huaweicloud-sdk-devstar/v1/DevstarClient"; + import { DevStarClient } from "@huaweicloud/huaweicloud-sdk-devstar/v1/DevStarClient"; import { BasicCredentials } from "@huaweicloud/huaweicloud-sdk-core/auth/BasicCredentials"; import { ShowJobDetailRequest } from '@huaweicloud/huaweicloud-sdk-devstar/v1/model/ShowJobDetailRequest'; // Create a new express application instance const app: express.Application = express(); - process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; app.get('/', function (req: any, res: { send: (arg0: string) => void; }) { - const client = DevstarClient.newBuilder() + const client = DevStarClient.newBuilder() .withCredential(new BasicCredentials() .withAk("{your ak string}") .withSk("{your sk string}") diff --git a/README_CN.md b/README_CN.md index fbf31045c..12d873bf4 100644 --- a/README_CN.md +++ b/README_CN.md @@ -25,9 +25,9 @@ 通过 npm 安装项目依赖是使用 Node.js SDK 的推荐方法 - 无论您要使用哪个产品/服务的开发工具包,都必须安装@huaweicloud/huaweicloud-sdk-core。以使用虚拟私有云Devstar SDK为例,您需要安装@huaweicloud/huaweicloud-sdk-core和@huaweicloud/huaweicloud-sdk-devstar: + 无论您要使用哪个产品/服务的开发工具包,都必须依赖@huaweicloud/huaweicloud-sdk-core。以使用虚拟私有云Devstar SDK为例,您需要安装@huaweicloud/huaweicloud-sdk-devstar: ``` xml - npm install @huaweicloud/huaweicloud-sdk-core @huaweicloud/huaweicloud-sdk-devstar + npm install @huaweicloud/huaweicloud-sdk-devstar ``` ### 开始使用 @@ -38,8 +38,8 @@ // 用户身份认证 import { BasicCredentials } from "@huaweicloud/huaweicloud-sdk-core/auth/BasicCredentials"; import { GlobalCredentials } from "@huaweicloud/huaweicloud-sdk-core/auth/GlobalCredentials"; - // 导入指定云服务的 {Service}Client,此处以 DevstarClient 为例 - import { DevstarClient } from "@huaweicloud/huaweicloud-sdk-devstar/v1/DevstarClient"; + // 导入指定云服务的 {Service}Client,此处以 DevStarClient 为例 + import { DevStarClient } from "@huaweicloud/huaweicloud-sdk-devstar/v1/DevStarClient"; // 导入相应产品的 model import { ShowJobDetailRequest } from '@huaweicloud/huaweicloud-sdk-devstar/v1/model/ShowJobDetailRequest'; ``` @@ -50,7 +50,7 @@ ``` nodejs // 使用默认配置 - const client = DevstarClient.newBuilder() + const client = DevStarClient.newBuilder() ``` 2.2 代理配置(可选) @@ -121,8 +121,8 @@ 4. 初始化客户端 ``` nodejs - // 初始化指定云服务的客户端 {Service}Client ,以初始化 DevstarClient 为例 - const client = DevstarClient.newBuilder() + // 初始化指定云服务的客户端 {Service}Client ,以初始化 DevStarClient 为例 + const client = DevStarClient.newBuilder() .withCredential(basicCredentials) .withEndpoint(endpoint) .withProxyAgent(proxy) @@ -242,15 +242,14 @@ ``` nodejs import express = require('express'); - import { DevstarClient } from "@huaweicloud/huaweicloud-sdk-devstar/v1/DevstarClient"; + import { DevStarClient } from "@huaweicloud/huaweicloud-sdk-devstar/v1/DevStarClient"; import { BasicCredentials } from "@huaweicloud/huaweicloud-sdk-core/auth/BasicCredentials"; import { ShowJobDetailRequest } from '@huaweicloud/huaweicloud-sdk-devstar/v1/model/ShowJobDetailRequest'; // Create a new express application instance const app: express.Application = express(); - process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; app.get('/', function (req: any, res: { send: (arg0: string) => void; }) { - const client = DevstarClient.newBuilder() + const client = DevStarClient.newBuilder() .withCredential(new BasicCredentials() .withAk("{your ak string}") .withSk("{your sk string}") diff --git a/core/ClientBuilder.ts b/core/ClientBuilder.ts index 618c18f48..f923d48eb 100644 --- a/core/ClientBuilder.ts +++ b/core/ClientBuilder.ts @@ -131,20 +131,23 @@ export class ClientBuilder { // 判断是否有_ let hash = {}; for (let key in credential) { - const value = credential[key] - if (key.indexOf('_') == -1) { - key = key.toLowerCase(); - key = 'with' + key.charAt(0).toUpperCase() + key.slice(1); - } else { - const arr = key.split('_').map(item => { - item = item.toLowerCase(); - return item.charAt(0).toUpperCase() + item.slice(1); - }) - if (Array.isArray(arr)) { - key = 'with' + arr.join(""); + if (key.indexOf("HUAWEICLOUD_SDK_") == 0) { + const value = credential[key] + key = key.substring(16); + if (key.indexOf('_') == -1) { + key = key.toLowerCase(); + key = 'with' + key.charAt(0).toUpperCase() + key.slice(1); + } else { + const arr = key.split('_').map(item => { + item = item.toLowerCase(); + return item.charAt(0).toUpperCase() + item.slice(1); + }) + if (Array.isArray(arr)) { + key = 'with' + arr.join(""); + } } + hash[key] = value } - hash[key] = value } credential = hash; for (const key in credential) { diff --git a/core/http/DefaultHttpClient.ts b/core/http/DefaultHttpClient.ts index fe9a207da..d5c19d8ce 100644 --- a/core/http/DefaultHttpClient.ts +++ b/core/http/DefaultHttpClient.ts @@ -155,7 +155,7 @@ export class DefaultHttpClient implements HttpClient { res.result = res.data; delete res.data; - let requestId = res.headers['x-request-id']; + let requestId = res.headers ? res.headers['x-request-id'] : undefined; let reponseLength = res.result ? JSON.stringify(res.result).length : 1; log4jsLogger.info('"' + requestParams.method + ' ' + requestParams.url + '" ' + res.status + ' ' + reponseLength + ' ' + requestId); if (process.env.DEBUG) { @@ -169,11 +169,18 @@ export class DefaultHttpClient implements HttpClient { let response = err.response; DefaultHttpClient.httpResponse = err; - let requestId = response.headers['x-request-id']; - let reponseLength = response.data ? JSON.stringify(response.data).length : 1; - log4jsLogger.info('"' + requestParams.method + ' ' + requestParams.url + '" ' + response.status + ' ' + reponseLength + ' ' + requestId); + let requestId; + let reponseLength; + let status; + if (response) { + requestId = response.headers ? response.headers['x-request-id'] : undefined; + reponseLength = response.data ? JSON.stringify(response.data).length : 1; + status = response.status; + } + + log4jsLogger.info('"' + requestParams.method + ' ' + requestParams.url + '" ' + status + ' ' + reponseLength + ' ' + requestId); if (process.env.DEBUG) { - log4jsLogger.debug('request: ' + JSON.stringify(requestParams) + ". response: " + JSON.stringify(response.data)); + log4jsLogger.debug('request: ' + JSON.stringify(requestParams) + ". response: " + JSON.stringify(err)); } // return another promise that rejects with 'err' to be handled in generated code diff --git a/package.json b/package.json index 74841ba8c..715ef73b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "huaweicloud-sdk-nodejs-v3", - "version": "3.0.2-beta", + "version": "3.0.3-beta", "description": "Core code for Huaweicloud SDK for Node.js", "main": "index.js", "scripts": { diff --git a/services/devstar/huaweicloud-sdk-devstar.ts b/services/devstar/huaweicloud-sdk-devstar.ts index daae119ca..4ab93ac8c 100644 --- a/services/devstar/huaweicloud-sdk-devstar.ts +++ b/services/devstar/huaweicloud-sdk-devstar.ts @@ -1,4 +1 @@ -/** - * Generated bundle index. Do not edit. - */ -export * from './v1/public-api'; \ No newline at end of file +export * from './v1/public-api'; diff --git a/services/devstar/v1/DevStarClient.ts b/services/devstar/v1/DevStarClient.ts index 2e5cd1a24..4bba5e08e 100644 --- a/services/devstar/v1/DevStarClient.ts +++ b/services/devstar/v1/DevStarClient.ts @@ -2,20 +2,42 @@ import { HcClient } from "@huaweicloud/huaweicloud-sdk-core/HcClient"; import { ClientBuilder } from "@huaweicloud/huaweicloud-sdk-core/ClientBuilder"; import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; +import { CodehubJobInfo } from './model/CodehubJobInfo'; +import { CreateTemplateViewHistoriesRequest } from './model/CreateTemplateViewHistoriesRequest'; +import { CreateTemplateViewHistoriesResponse } from './model/CreateTemplateViewHistoriesResponse'; import { DownloadApplicationCodeRequest } from './model/DownloadApplicationCodeRequest'; import { DownloadApplicationCodeResponse } from './model/DownloadApplicationCodeResponse'; import { ListPublishedTemplatesRequest } from './model/ListPublishedTemplatesRequest'; import { ListPublishedTemplatesResponse } from './model/ListPublishedTemplatesResponse'; +import { ListTemplateViewHistoriesRequest } from './model/ListTemplateViewHistoriesRequest'; +import { ListTemplateViewHistoriesResponse } from './model/ListTemplateViewHistoriesResponse'; +import { ListTemplatesV2Request } from './model/ListTemplatesV2Request'; +import { ListTemplatesV2Response } from './model/ListTemplatesV2Response'; +import { PipelineTemplateInfo } from './model/PipelineTemplateInfo'; import { PropertiesInfo } from './model/PropertiesInfo'; +import { Reference } from './model/Reference'; import { RepositoryInfo } from './model/RepositoryInfo'; +import { RunCodehubTemplateJobRequest } from './model/RunCodehubTemplateJobRequest'; +import { RunCodehubTemplateJobResponse } from './model/RunCodehubTemplateJobResponse'; import { RunDevstarTemplateJobRequest } from './model/RunDevstarTemplateJobRequest'; import { RunDevstarTemplateJobResponse } from './model/RunDevstarTemplateJobResponse'; import { ShowJobDetailRequest } from './model/ShowJobDetailRequest'; import { ShowJobDetailResponse } from './model/ShowJobDetailResponse'; import { ShowTemplateDetailRequest } from './model/ShowTemplateDetailRequest'; import { ShowTemplateDetailResponse } from './model/ShowTemplateDetailResponse'; +import { ShowTemplateFileRequest } from './model/ShowTemplateFileRequest'; +import { ShowTemplateFileResponse } from './model/ShowTemplateFileResponse'; +import { ShowTemplateV3Request } from './model/ShowTemplateV3Request'; +import { ShowTemplateV3Response } from './model/ShowTemplateV3Response'; +import { TagInfo } from './model/TagInfo'; +import { TemplateInfo } from './model/TemplateInfo'; import { TemplateJobInfo } from './model/TemplateJobInfo'; +import { TemplateProductExt } from './model/TemplateProductExt'; +import { TemplateQueryV2 } from './model/TemplateQueryV2'; import { TemplateSimpleInfo } from './model/TemplateSimpleInfo'; +import { TemplateViewHistory } from './model/TemplateViewHistory'; +import { TemplatesInfo } from './model/TemplatesInfo'; +import { TopicCategory } from './model/TopicCategory'; export class DevStarClient { public static newBuilder(): ClientBuilder { @@ -53,6 +75,28 @@ export class DevStarClient { }); }); } + /** + * 通过 Codehub 的模板进行应用代码创建 通过 Codehub 模板创建生成应用代码的任务,并将应用代码存储于指定的 CodeHub 仓库中或者生成代码压缩包,可以通过返回的任务 ID 查询相关任务状态 - 接口鉴权方式 通过华为云服务获取的用户token - 代码生成位置 应用代码生成后的地址,目前支持codehub地址和压缩包下载地址。 + * @summary CodeHub 模板生成代码 + * @param {CodehubJobInfo} runCodehubTemplateJobRequestBody 创建任务参数 + * @param {'zh-cn' | 'en-us'} [xLanguage] 语言类型 中文:zh-cn 英文:en-us + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public runCodehubTemplateJob(runCodehubTemplateJobRequest?: RunCodehubTemplateJobRequest): Promise { + // @ts-ignore + return new Promise((resolve: (arg0: any) => any, reject: (arg0: any) => any) => { + const options = ParamCreater().runCodehubTemplateJob(runCodehubTemplateJobRequest); + + return this.hcClient.sendRequest(options).then( + (res: any) => { + return resolve(res); + }, + (err: any) => { + return reject(err); + }); + }); + } /** * 通过DevStar的模板进行应用代码创建 通过 DevStar 模板创建生成应用代码的任务,并将应用代码存储于指定的 CodeHub 仓库中,可以通过返回的任务 ID 查询相关任务状态 - 接口鉴权方式 通过华为云服务获取的用户token - 代码生成位置 应用代码生成后的地址,目前支持codehub地址和压缩包下载地址。 * @summary Devstar 模板生成代码 @@ -97,6 +141,52 @@ export class DevStarClient { }); }); } + /** + * 读取模板文件 + * @summary 读取模板文件 + * @param {string} templateId 模板ID + * @param {string} filePath 文件相对路径 + * @param {'zh-cn' | 'en-us'} [xLanguage] 语言类型 中文:zh-cn 英文:en-us + * @param {'source-package' | 'introduction'} [type] 读取文件来源. source-package: 源文件压缩包, introduction: 说明文件 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showTemplateFile(showTemplateFileRequest?: ShowTemplateFileRequest): Promise { + // @ts-ignore + return new Promise((resolve: (arg0: any) => any, reject: (arg0: any) => any) => { + const options = ParamCreater().showTemplateFile(showTemplateFileRequest); + + return this.hcClient.sendRequest(options).then( + (res: any) => { + return resolve(res); + }, + (err: any) => { + return reject(err); + }); + }); + } + /** + * 生成模板浏览记录 + * @summary 生成模板浏览历史记录 + * @param {TemplatesInfo} createTemplateViewHistoriesRequestBody 模板信息 + * @param {'zh-cn' | 'en-us'} [xLanguage] 语言类型 中文:zh-cn 英文:en-us + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createTemplateViewHistories(createTemplateViewHistoriesRequest?: CreateTemplateViewHistoriesRequest): Promise { + // @ts-ignore + return new Promise((resolve: (arg0: any) => any, reject: (arg0: any) => any) => { + const options = ParamCreater().createTemplateViewHistories(createTemplateViewHistoriesRequest); + + return this.hcClient.sendRequest(options).then( + (res: any) => { + return resolve(res); + }, + (err: any) => { + return reject(err); + }); + }); + } /** * 查询模板列表 * @summary 查询模板列表 @@ -121,6 +211,73 @@ export class DevStarClient { }); }); } + /** + * 查询用户浏览过的模板(只返回最近浏览的5个模板) + * @summary 我浏览的模板记录 + * @param {0 | 1} platformSource 平台来源(0:codelabs、1:devstar) + * @param {'zh-cn' | 'en-us'} [xLanguage] 语言类型 中文:zh-cn 英文:en-us + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listTemplateViewHistories(listTemplateViewHistoriesRequest?: ListTemplateViewHistoriesRequest): Promise { + // @ts-ignore + return new Promise((resolve: (arg0: any) => any, reject: (arg0: any) => any) => { + const options = ParamCreater().listTemplateViewHistories(listTemplateViewHistoriesRequest); + + return this.hcClient.sendRequest(options).then( + (res: any) => { + return resolve(res); + }, + (err: any) => { + return reject(err); + }); + }); + } + /** + * 查询模板列表 + * @summary 查询模板列表 + * @param {string} actionId query(查询) + * @param {'zh-cn' | 'en-us'} [xLanguage] 语言类型 中文:zh-cn 英文:en-us + * @param {TemplateQueryV2} [listTemplatesV2RequestBody] 模板列表查询参数 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listTemplatesV2(listTemplatesV2Request?: ListTemplatesV2Request): Promise { + // @ts-ignore + return new Promise((resolve: (arg0: any) => any, reject: (arg0: any) => any) => { + const options = ParamCreater().listTemplatesV2(listTemplatesV2Request); + + return this.hcClient.sendRequest(options).then( + (res: any) => { + return resolve(res); + }, + (err: any) => { + return reject(err); + }); + }); + } + /** + * 获取模板详情-模板id、名称、描述、作者、标签、上架时间等信息。 + * @summary 模板详情 + * @param {string} templateId 模板ID + * @param {'zh-cn' | 'en-us'} [xLanguage] 语言类型 中文:zh-cn 英文:en-us + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showTemplateV3(showTemplateV3Request?: ShowTemplateV3Request): Promise { + // @ts-ignore + return new Promise((resolve: (arg0: any) => any, reject: (arg0: any) => any) => { + const options = ParamCreater().showTemplateV3(showTemplateV3Request); + + return this.hcClient.sendRequest(options).then( + (res: any) => { + return resolve(res); + }, + (err: any) => { + return reject(err); + }); + }); + } /** * 查询模板详情 * @summary 查询模板详情 @@ -191,6 +348,46 @@ export const ParamCreater = function () { return options; }, + /** + * 通过 Codehub 的模板进行应用代码创建 通过 Codehub 模板创建生成应用代码的任务,并将应用代码存储于指定的 CodeHub 仓库中或者生成代码压缩包,可以通过返回的任务 ID 查询相关任务状态 - 接口鉴权方式 通过华为云服务获取的用户token - 代码生成位置 应用代码生成后的地址,目前支持codehub地址和压缩包下载地址。 + */ + runCodehubTemplateJob(runCodehubTemplateJobRequest?: RunCodehubTemplateJobRequest) { + const options = { + method: "POST", + url: "/v1/jobs/codehub", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + var body: any; + let xLanguage; + + if (runCodehubTemplateJobRequest !== null && runCodehubTemplateJobRequest !== undefined) { + if (runCodehubTemplateJobRequest instanceof RunCodehubTemplateJobRequest) { + body = runCodehubTemplateJobRequest.body + xLanguage = runCodehubTemplateJobRequest.xLanguage; + } else { + body = runCodehubTemplateJobRequest['body']; + xLanguage = runCodehubTemplateJobRequest['X-Language']; + } + } + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + /** * 通过DevStar的模板进行应用代码创建 通过 DevStar 模板创建生成应用代码的任务,并将应用代码存储于指定的 CodeHub 仓库中,可以通过返回的任务 ID 查询相关任务状态 - 接口鉴权方式 通过华为云服务获取的用户token - 代码生成位置 应用代码生成后的地址,目前支持codehub地址和压缩包下载地址。 */ @@ -210,7 +407,7 @@ export const ParamCreater = function () { if (runDevstarTemplateJobRequest !== null && runDevstarTemplateJobRequest !== undefined) { if (runDevstarTemplateJobRequest instanceof RunDevstarTemplateJobRequest) { - body = runDevstarTemplateJobRequest.body !== undefined ? runDevstarTemplateJobRequest.body.getParseParam() : runDevstarTemplateJobRequest.body; + body = runDevstarTemplateJobRequest.body xLanguage = runDevstarTemplateJobRequest.xLanguage; } else { body = runDevstarTemplateJobRequest['body']; @@ -270,6 +467,102 @@ export const ParamCreater = function () { return options; }, + /** + * 读取模板文件 + */ + showTemplateFile(showTemplateFileRequest?: ShowTemplateFileRequest) { + const options = { + method: "GET", + url: "/v1/templates/{template_id}/files", + contentType: "", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + let templateId; + let filePath; + let xLanguage; + let type; + + if (showTemplateFileRequest !== null && showTemplateFileRequest !== undefined) { + if (showTemplateFileRequest instanceof ShowTemplateFileRequest) { + templateId = showTemplateFileRequest.templateId; + filePath = showTemplateFileRequest.filePath; + xLanguage = showTemplateFileRequest.xLanguage; + type = showTemplateFileRequest.type; + } else { + templateId = showTemplateFileRequest['template_id']; + filePath = showTemplateFileRequest['file_path']; + xLanguage = showTemplateFileRequest['X-Language']; + type = showTemplateFileRequest['type']; + } + } + + if (templateId === null || templateId === undefined) { + throw new RequiredError('templateId','Required parameter templateId was null or undefined when calling showTemplateFile.'); + } + if (filePath === null || filePath === undefined) { + throw new RequiredError('filePath','Required parameter filePath was null or undefined when calling showTemplateFile.'); + } + if (filePath !== null && filePath !== undefined) { + localVarQueryParameter['file_path'] = filePath; + } + if (type !== null && type !== undefined) { + localVarQueryParameter['type'] = type; + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + + options.queryParams = localVarQueryParameter; + options.pathParams = { 'template_id': templateId, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 生成模板浏览记录 + */ + createTemplateViewHistories(createTemplateViewHistoriesRequest?: CreateTemplateViewHistoriesRequest) { + const options = { + method: "POST", + url: "/v1/templates/view-histories", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + var body: any; + let xLanguage; + + if (createTemplateViewHistoriesRequest !== null && createTemplateViewHistoriesRequest !== undefined) { + if (createTemplateViewHistoriesRequest instanceof CreateTemplateViewHistoriesRequest) { + body = createTemplateViewHistoriesRequest.body + xLanguage = createTemplateViewHistoriesRequest.xLanguage; + } else { + body = createTemplateViewHistoriesRequest['body']; + xLanguage = createTemplateViewHistoriesRequest['X-Language']; + } + } + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + /** * 查询模板列表 */ @@ -322,6 +615,136 @@ export const ParamCreater = function () { return options; }, + /** + * 查询用户浏览过的模板(只返回最近浏览的5个模板) + */ + listTemplateViewHistories(listTemplateViewHistoriesRequest?: ListTemplateViewHistoriesRequest) { + const options = { + method: "GET", + url: "/v1/templates/view-histories", + contentType: "", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + let platformSource; + let xLanguage; + + if (listTemplateViewHistoriesRequest !== null && listTemplateViewHistoriesRequest !== undefined) { + if (listTemplateViewHistoriesRequest instanceof ListTemplateViewHistoriesRequest) { + platformSource = listTemplateViewHistoriesRequest.platformSource; + xLanguage = listTemplateViewHistoriesRequest.xLanguage; + } else { + platformSource = listTemplateViewHistoriesRequest['platform_source']; + xLanguage = listTemplateViewHistoriesRequest['X-Language']; + } + } + + if (platformSource === null || platformSource === undefined) { + throw new RequiredError('platformSource','Required parameter platformSource was null or undefined when calling listTemplateViewHistories.'); + } + if (platformSource !== null && platformSource !== undefined) { + localVarQueryParameter['platform_source'] = platformSource; + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + + options.queryParams = localVarQueryParameter; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 查询模板列表 + */ + listTemplatesV2(listTemplatesV2Request?: ListTemplatesV2Request) { + const options = { + method: "POST", + url: "/v2/templates/action", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + var body: any; + let actionId; + let xLanguage; + + if (listTemplatesV2Request !== null && listTemplatesV2Request !== undefined) { + if (listTemplatesV2Request instanceof ListTemplatesV2Request) { + actionId = listTemplatesV2Request.actionId; + xLanguage = listTemplatesV2Request.xLanguage; + body = listTemplatesV2Request.body + } else { + actionId = listTemplatesV2Request['action_id']; + xLanguage = listTemplatesV2Request['X-Language']; + body = listTemplatesV2Request['body']; + } + } + + if (actionId === null || actionId === undefined) { + throw new RequiredError('actionId','Required parameter actionId was null or undefined when calling listTemplatesV2.'); + } + if (actionId !== null && actionId !== undefined) { + localVarQueryParameter['action_id'] = actionId; + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.queryParams = localVarQueryParameter; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取模板详情-模板id、名称、描述、作者、标签、上架时间等信息。 + */ + showTemplateV3(showTemplateV3Request?: ShowTemplateV3Request) { + const options = { + method: "GET", + url: "/v3/templates/{template_id}", + contentType: "", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + let templateId; + let xLanguage; + + if (showTemplateV3Request !== null && showTemplateV3Request !== undefined) { + if (showTemplateV3Request instanceof ShowTemplateV3Request) { + templateId = showTemplateV3Request.templateId; + xLanguage = showTemplateV3Request.xLanguage; + } else { + templateId = showTemplateV3Request['template_id']; + xLanguage = showTemplateV3Request['X-Language']; + } + } + + if (templateId === null || templateId === undefined) { + throw new RequiredError('templateId','Required parameter templateId was null or undefined when calling showTemplateV3.'); + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + + options.pathParams = { 'template_id': templateId, }; + options.headers = localVarHeaderParameter; + return options; + }, + /** * 查询模板详情 */ diff --git a/services/devstar/v1/model/CodehubJobInfo.ts b/services/devstar/v1/model/CodehubJobInfo.ts new file mode 100644 index 000000000..3318fae84 --- /dev/null +++ b/services/devstar/v1/model/CodehubJobInfo.ts @@ -0,0 +1,84 @@ +import { RepositoryInfo } from './RepositoryInfo'; + + +export class CodehubJobInfo { + private 'application_name': string | undefined; + public privately?: boolean; + private 'short_id'?: string | undefined; + private 'code_url'?: string | undefined; + private 'region_id'?: string | undefined; + private 'repo_type'?: number | undefined; + public properties?: object; + private 'repo_info'?: RepositoryInfo | undefined; + public constructor(applicationName: any) { + this['application_name'] = applicationName; + } + public withApplicationName(applicationName: string): CodehubJobInfo { + this['application_name'] = applicationName; + return this; + } + public set applicationName(applicationName: string | undefined) { + this['application_name'] = applicationName; + } + public get applicationName() { + return this['application_name']; + } + public withPrivately(privately: boolean): CodehubJobInfo { + this['privately'] = privately; + return this; + } + public withShortId(shortId: string): CodehubJobInfo { + this['short_id'] = shortId; + return this; + } + public set shortId(shortId: string | undefined) { + this['short_id'] = shortId; + } + public get shortId() { + return this['short_id']; + } + public withCodeUrl(codeUrl: string): CodehubJobInfo { + this['code_url'] = codeUrl; + return this; + } + public set codeUrl(codeUrl: string | undefined) { + this['code_url'] = codeUrl; + } + public get codeUrl() { + return this['code_url']; + } + public withRegionId(regionId: string): CodehubJobInfo { + this['region_id'] = regionId; + return this; + } + public set regionId(regionId: string | undefined) { + this['region_id'] = regionId; + } + public get regionId() { + return this['region_id']; + } + public withRepoType(repoType: number): CodehubJobInfo { + this['repo_type'] = repoType; + return this; + } + public set repoType(repoType: number | undefined) { + this['repo_type'] = repoType; + } + public get repoType() { + return this['repo_type']; + } + public withProperties(properties: object): CodehubJobInfo { + this['properties'] = properties; + return this; + } + public withRepoInfo(repoInfo: RepositoryInfo): CodehubJobInfo { + this['repo_info'] = repoInfo; + return this; + } + public set repoInfo(repoInfo: RepositoryInfo | undefined) { + this['repo_info'] = repoInfo; + } + public get repoInfo() { + return this['repo_info']; + } +} \ No newline at end of file diff --git a/services/devstar/v1/model/CreateTemplateViewHistoriesRequest.ts b/services/devstar/v1/model/CreateTemplateViewHistoriesRequest.ts new file mode 100644 index 000000000..d9650b9b0 --- /dev/null +++ b/services/devstar/v1/model/CreateTemplateViewHistoriesRequest.ts @@ -0,0 +1,32 @@ +import { TemplatesInfo } from './TemplatesInfo'; + + +export class CreateTemplateViewHistoriesRequest { + private 'X-Language'?: CreateTemplateViewHistoriesRequestXLanguageEnum | undefined; + public body?: TemplatesInfo; + public constructor() { + } + public withXLanguage(xLanguage: CreateTemplateViewHistoriesRequestXLanguageEnum): CreateTemplateViewHistoriesRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: CreateTemplateViewHistoriesRequestXLanguageEnum | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage() { + return this['X-Language']; + } + public withBody(body: TemplatesInfo): CreateTemplateViewHistoriesRequest { + this['body'] = body; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum CreateTemplateViewHistoriesRequestXLanguageEnum { + ZH_CN = 'zh-cn', + EN_US = 'en-us' +} diff --git a/services/devstar/v1/model/CreateTemplateViewHistoriesResponse.ts b/services/devstar/v1/model/CreateTemplateViewHistoriesResponse.ts new file mode 100644 index 000000000..a68e5b41b --- /dev/null +++ b/services/devstar/v1/model/CreateTemplateViewHistoriesResponse.ts @@ -0,0 +1,19 @@ +import { TemplateViewHistory } from './TemplateViewHistory'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class CreateTemplateViewHistoriesResponse extends SdkResponse { + public templates?: Array; + public count?: number; + public constructor() { + super(); + } + public withTemplates(templates: Array): CreateTemplateViewHistoriesResponse { + this['templates'] = templates; + return this; + } + public withCount(count: number): CreateTemplateViewHistoriesResponse { + this['count'] = count; + return this; + } +} \ No newline at end of file diff --git a/services/devstar/v1/model/DownloadApplicationCodeRequest.ts b/services/devstar/v1/model/DownloadApplicationCodeRequest.ts index 110d4f937..cf516bd65 100644 --- a/services/devstar/v1/model/DownloadApplicationCodeRequest.ts +++ b/services/devstar/v1/model/DownloadApplicationCodeRequest.ts @@ -1,19 +1,31 @@ export class DownloadApplicationCodeRequest { - public xLanguage?: DownloadApplicationCodeRequestXLanguageEnum; - public jobId: string; + private 'X-Language'?: DownloadApplicationCodeRequestXLanguageEnum | undefined; + private 'job_id': string | undefined; public constructor(jobId: any) { - this.jobId = jobId; + this['job_id'] = jobId; } - public withXLanguage(xLanguage?: DownloadApplicationCodeRequestXLanguageEnum): DownloadApplicationCodeRequest { - this.xLanguage = xLanguage; + public withXLanguage(xLanguage: DownloadApplicationCodeRequestXLanguageEnum): DownloadApplicationCodeRequest { + this['X-Language'] = xLanguage; return this; } + public set xLanguage(xLanguage: DownloadApplicationCodeRequestXLanguageEnum | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage() { + return this['X-Language']; + } public withJobId(jobId: string): DownloadApplicationCodeRequest { - this.jobId = jobId; + this['job_id'] = jobId; return this; } + public set jobId(jobId: string | undefined) { + this['job_id'] = jobId; + } + public get jobId() { + return this['job_id']; + } } /** diff --git a/services/devstar/v1/model/ListPublishedTemplatesRequest.ts b/services/devstar/v1/model/ListPublishedTemplatesRequest.ts index c2e690ca5..c51d8180d 100644 --- a/services/devstar/v1/model/ListPublishedTemplatesRequest.ts +++ b/services/devstar/v1/model/ListPublishedTemplatesRequest.ts @@ -1,26 +1,32 @@ export class ListPublishedTemplatesRequest { - public xLanguage?: ListPublishedTemplatesRequestXLanguageEnum; + private 'X-Language'?: ListPublishedTemplatesRequestXLanguageEnum | undefined; public keyword?: string; public offset?: number; public limit?: number; public constructor() { } - public withXLanguage(xLanguage?: ListPublishedTemplatesRequestXLanguageEnum): ListPublishedTemplatesRequest { - this.xLanguage = xLanguage; + public withXLanguage(xLanguage: ListPublishedTemplatesRequestXLanguageEnum): ListPublishedTemplatesRequest { + this['X-Language'] = xLanguage; return this; } - public withKeyword(keyword?: string): ListPublishedTemplatesRequest { - this.keyword = keyword; + public set xLanguage(xLanguage: ListPublishedTemplatesRequestXLanguageEnum | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage() { + return this['X-Language']; + } + public withKeyword(keyword: string): ListPublishedTemplatesRequest { + this['keyword'] = keyword; return this; } - public withOffset(offset?: number): ListPublishedTemplatesRequest { - this.offset = offset; + public withOffset(offset: number): ListPublishedTemplatesRequest { + this['offset'] = offset; return this; } - public withLimit(limit?: number): ListPublishedTemplatesRequest { - this.limit = limit; + public withLimit(limit: number): ListPublishedTemplatesRequest { + this['limit'] = limit; return this; } } diff --git a/services/devstar/v1/model/ListPublishedTemplatesResponse.ts b/services/devstar/v1/model/ListPublishedTemplatesResponse.ts index 3cf907b4c..74ad9db83 100644 --- a/services/devstar/v1/model/ListPublishedTemplatesResponse.ts +++ b/services/devstar/v1/model/ListPublishedTemplatesResponse.ts @@ -8,12 +8,12 @@ export class ListPublishedTemplatesResponse extends SdkResponse { public constructor() { super(); } - public withCount(count?: number): ListPublishedTemplatesResponse { - this.count = count; + public withCount(count: number): ListPublishedTemplatesResponse { + this['count'] = count; return this; } - public withTemplates(templates?: Array): ListPublishedTemplatesResponse { - this.templates = templates; + public withTemplates(templates: Array): ListPublishedTemplatesResponse { + this['templates'] = templates; return this; } } \ No newline at end of file diff --git a/services/devstar/v1/model/ListTemplateViewHistoriesRequest.ts b/services/devstar/v1/model/ListTemplateViewHistoriesRequest.ts new file mode 100644 index 000000000..fbf1ac46d --- /dev/null +++ b/services/devstar/v1/model/ListTemplateViewHistoriesRequest.ts @@ -0,0 +1,46 @@ + + +export class ListTemplateViewHistoriesRequest { + private 'X-Language'?: ListTemplateViewHistoriesRequestXLanguageEnum | undefined; + private 'platform_source': ListTemplateViewHistoriesRequestPlatformSourceEnum | undefined; + public constructor(platformSource: any) { + this['platform_source'] = platformSource; + } + public withXLanguage(xLanguage: ListTemplateViewHistoriesRequestXLanguageEnum): ListTemplateViewHistoriesRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: ListTemplateViewHistoriesRequestXLanguageEnum | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage() { + return this['X-Language']; + } + public withPlatformSource(platformSource: ListTemplateViewHistoriesRequestPlatformSourceEnum): ListTemplateViewHistoriesRequest { + this['platform_source'] = platformSource; + return this; + } + public set platformSource(platformSource: ListTemplateViewHistoriesRequestPlatformSourceEnum | undefined) { + this['platform_source'] = platformSource; + } + public get platformSource() { + return this['platform_source']; + } +} + +/** + * @export + * @enum {string} + */ +export enum ListTemplateViewHistoriesRequestXLanguageEnum { + ZH_CN = 'zh-cn', + EN_US = 'en-us' +} +/** + * @export + * @enum {string} + */ +export enum ListTemplateViewHistoriesRequestPlatformSourceEnum { + NUMBER_0 = 0, + NUMBER_1 = 1 +} diff --git a/services/devstar/v1/model/ListTemplateViewHistoriesResponse.ts b/services/devstar/v1/model/ListTemplateViewHistoriesResponse.ts new file mode 100644 index 000000000..ccc21c200 --- /dev/null +++ b/services/devstar/v1/model/ListTemplateViewHistoriesResponse.ts @@ -0,0 +1,19 @@ +import { TemplateViewHistory } from './TemplateViewHistory'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListTemplateViewHistoriesResponse extends SdkResponse { + public templates?: Array; + public count?: number; + public constructor() { + super(); + } + public withTemplates(templates: Array): ListTemplateViewHistoriesResponse { + this['templates'] = templates; + return this; + } + public withCount(count: number): ListTemplateViewHistoriesResponse { + this['count'] = count; + return this; + } +} \ No newline at end of file diff --git a/services/devstar/v1/model/ListTemplatesV2Request.ts b/services/devstar/v1/model/ListTemplatesV2Request.ts new file mode 100644 index 000000000..f34fc7206 --- /dev/null +++ b/services/devstar/v1/model/ListTemplatesV2Request.ts @@ -0,0 +1,44 @@ +import { TemplateQueryV2 } from './TemplateQueryV2'; + + +export class ListTemplatesV2Request { + private 'X-Language'?: ListTemplatesV2RequestXLanguageEnum | undefined; + private 'action_id': string | undefined; + public body?: TemplateQueryV2; + public constructor(actionId: any) { + this['action_id'] = actionId; + } + public withXLanguage(xLanguage: ListTemplatesV2RequestXLanguageEnum): ListTemplatesV2Request { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: ListTemplatesV2RequestXLanguageEnum | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage() { + return this['X-Language']; + } + public withActionId(actionId: string): ListTemplatesV2Request { + this['action_id'] = actionId; + return this; + } + public set actionId(actionId: string | undefined) { + this['action_id'] = actionId; + } + public get actionId() { + return this['action_id']; + } + public withBody(body: TemplateQueryV2): ListTemplatesV2Request { + this['body'] = body; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ListTemplatesV2RequestXLanguageEnum { + ZH_CN = 'zh-cn', + EN_US = 'en-us' +} diff --git a/services/devstar/v1/model/ListTemplatesV2Response.ts b/services/devstar/v1/model/ListTemplatesV2Response.ts new file mode 100644 index 000000000..86352d8f4 --- /dev/null +++ b/services/devstar/v1/model/ListTemplatesV2Response.ts @@ -0,0 +1,19 @@ +import { TemplateInfo } from './TemplateInfo'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListTemplatesV2Response extends SdkResponse { + public count?: number; + public templates?: Array; + public constructor() { + super(); + } + public withCount(count: number): ListTemplatesV2Response { + this['count'] = count; + return this; + } + public withTemplates(templates: Array): ListTemplatesV2Response { + this['templates'] = templates; + return this; + } +} \ No newline at end of file diff --git a/services/devstar/v1/model/PipelineTemplateInfo.ts b/services/devstar/v1/model/PipelineTemplateInfo.ts new file mode 100644 index 000000000..8cade0ed9 --- /dev/null +++ b/services/devstar/v1/model/PipelineTemplateInfo.ts @@ -0,0 +1,21 @@ + + +export class PipelineTemplateInfo { + public id?: string; + public name?: string; + public detail?: string; + public constructor() { + } + public withId(id: string): PipelineTemplateInfo { + this['id'] = id; + return this; + } + public withName(name: string): PipelineTemplateInfo { + this['name'] = name; + return this; + } + public withDetail(detail: string): PipelineTemplateInfo { + this['detail'] = detail; + return this; + } +} \ No newline at end of file diff --git a/services/devstar/v1/model/PropertiesInfo.ts b/services/devstar/v1/model/PropertiesInfo.ts index 03e5a8a21..c58f5048a 100644 --- a/services/devstar/v1/model/PropertiesInfo.ts +++ b/services/devstar/v1/model/PropertiesInfo.ts @@ -14,133 +14,48 @@ export class PropertiesInfo { public isShow?: boolean; public constructor() { } - public withKey(key?: string): PropertiesInfo { - this.key = key; - return this; - } - public withDefaultValue(defaultValue?: string): PropertiesInfo { - this.defaultValue = defaultValue; - return this; - } - public withLabel(label?: string): PropertiesInfo { - this.label = label; - return this; - } - public withType(type?: string): PropertiesInfo { - this.type = type; - return this; - } - public withHelpText(helpText?: string): PropertiesInfo { - this.helpText = helpText; - return this; - } - public withReadOnly(readOnly?: boolean): PropertiesInfo { - this.readOnly = readOnly; - return this; - } - public withRequired(required?: boolean): PropertiesInfo { - this.required = required; - return this; - } - public withRegType(regType?: string): PropertiesInfo { - this.regType = regType; - return this; - } - public withRegPattern(regPattern?: string): PropertiesInfo { - this.regPattern = regPattern; - return this; - } - public withRegTip(regTip?: string): PropertiesInfo { - this.regTip = regTip; - return this; - } - public withIsShow(isShow?: boolean): PropertiesInfo { - this.isShow = isShow; - return this; - } - public getParseParam() { - const parseParam = new PropertiesInfoParse(); - if(this.key !== null && this.key !== undefined) { - parseParam.setKey(this.key); - } - if(this.defaultValue !== null && this.defaultValue !== undefined) { - parseParam.setDefaultValue(this.defaultValue); - } - if(this.label !== null && this.label !== undefined) { - parseParam.setLabel(this.label); - } - if(this.type !== null && this.type !== undefined) { - parseParam.setType(this.type); - } - if(this.helpText !== null && this.helpText !== undefined) { - parseParam.setHelpText(this.helpText); - } - if(this.readOnly !== null && this.readOnly !== undefined) { - parseParam.setReadOnly(this.readOnly); - } - if(this.required !== null && this.required !== undefined) { - parseParam.setRequired(this.required); - } - if(this.regType !== null && this.regType !== undefined) { - parseParam.setRegType(this.regType); - } - if(this.regPattern !== null && this.regPattern !== undefined) { - parseParam.setRegPattern(this.regPattern); - } - if(this.regTip !== null && this.regTip !== undefined) { - parseParam.setRegTip(this.regTip); - } - if(this.isShow !== null && this.isShow !== undefined) { - parseParam.setIsShow(this.isShow); - } - return parseParam; - } -} - -export class PropertiesInfoParse { - private 'key'?: any; - private 'defaultValue'?: any; - private 'label'?: any; - private 'type'?: any; - private 'helpText'?: any; - private 'readOnly'?: any; - private 'required'?: any; - private 'regType'?: any; - private 'regPattern'?: any; - private 'regTip'?: any; - private 'isShow'?: any; - - public setKey(key?: any) { + public withKey(key: string): PropertiesInfo { this['key'] = key; + return this; } - public setDefaultValue(defaultValue?: any) { + public withDefaultValue(defaultValue: string): PropertiesInfo { this['defaultValue'] = defaultValue; + return this; } - public setLabel(label?: any) { + public withLabel(label: string): PropertiesInfo { this['label'] = label; + return this; } - public setType(type?: any) { + public withType(type: string): PropertiesInfo { this['type'] = type; + return this; } - public setHelpText(helpText?: any) { + public withHelpText(helpText: string): PropertiesInfo { this['helpText'] = helpText; + return this; } - public setReadOnly(readOnly?: any) { + public withReadOnly(readOnly: boolean): PropertiesInfo { this['readOnly'] = readOnly; + return this; } - public setRequired(required?: any) { + public withRequired(required: boolean): PropertiesInfo { this['required'] = required; + return this; } - public setRegType(regType?: any) { + public withRegType(regType: string): PropertiesInfo { this['regType'] = regType; + return this; } - public setRegPattern(regPattern?: any) { + public withRegPattern(regPattern: string): PropertiesInfo { this['regPattern'] = regPattern; + return this; } - public setRegTip(regTip?: any) { + public withRegTip(regTip: string): PropertiesInfo { this['regTip'] = regTip; + return this; } - public setIsShow(isShow?: any) { + public withIsShow(isShow: boolean): PropertiesInfo { this['isShow'] = isShow; + return this; } } \ No newline at end of file diff --git a/services/devstar/v1/model/Reference.ts b/services/devstar/v1/model/Reference.ts new file mode 100644 index 000000000..79cdca08a --- /dev/null +++ b/services/devstar/v1/model/Reference.ts @@ -0,0 +1,26 @@ + + +export class Reference { + public title?: string; + public url?: string; + public type?: number; + public productshort?: string; + public constructor() { + } + public withTitle(title: string): Reference { + this['title'] = title; + return this; + } + public withUrl(url: string): Reference { + this['url'] = url; + return this; + } + public withType(type: number): Reference { + this['type'] = type; + return this; + } + public withProductshort(productshort: string): Reference { + this['productshort'] = productshort; + return this; + } +} \ No newline at end of file diff --git a/services/devstar/v1/model/RepositoryInfo.ts b/services/devstar/v1/model/RepositoryInfo.ts index 06745d17f..0f0c84a62 100644 --- a/services/devstar/v1/model/RepositoryInfo.ts +++ b/services/devstar/v1/model/RepositoryInfo.ts @@ -2,49 +2,32 @@ export class RepositoryInfo { public name?: string; - public projectId?: string; - public regionId?: string; + private 'project_id'?: string | undefined; + private 'region_id'?: string | undefined; public constructor() { } - public withName(name?: string): RepositoryInfo { - this.name = name; + public withName(name: string): RepositoryInfo { + this['name'] = name; return this; } - public withProjectId(projectId?: string): RepositoryInfo { - this.projectId = projectId; + public withProjectId(projectId: string): RepositoryInfo { + this['project_id'] = projectId; return this; } - public withRegionId(regionId?: string): RepositoryInfo { - this.regionId = regionId; - return this; + public set projectId(projectId: string | undefined) { + this['project_id'] = projectId; } - public getParseParam() { - const parseParam = new RepositoryInfoParse(); - if(this.name !== null && this.name !== undefined) { - parseParam.setName(this.name); - } - if(this.projectId !== null && this.projectId !== undefined) { - parseParam.setProjectId(this.projectId); - } - if(this.regionId !== null && this.regionId !== undefined) { - parseParam.setRegionId(this.regionId); - } - return parseParam; - } -} - -export class RepositoryInfoParse { - private 'name'?: any; - private 'project_id'?: any; - private 'region_id'?: any; - - public setName(name?: any) { - this['name'] = name; + public get projectId() { + return this['project_id']; } - public setProjectId(projectId?: any) { - this['project_id'] = projectId; + public withRegionId(regionId: string): RepositoryInfo { + this['region_id'] = regionId; + return this; } - public setRegionId(regionId?: any) { + public set regionId(regionId: string | undefined) { this['region_id'] = regionId; } + public get regionId() { + return this['region_id']; + } } \ No newline at end of file diff --git a/services/devstar/v1/model/RunCodehubTemplateJobRequest.ts b/services/devstar/v1/model/RunCodehubTemplateJobRequest.ts new file mode 100644 index 000000000..1646a1ba7 --- /dev/null +++ b/services/devstar/v1/model/RunCodehubTemplateJobRequest.ts @@ -0,0 +1,32 @@ +import { CodehubJobInfo } from './CodehubJobInfo'; + + +export class RunCodehubTemplateJobRequest { + private 'X-Language'?: RunCodehubTemplateJobRequestXLanguageEnum | undefined; + public body?: CodehubJobInfo; + public constructor() { + } + public withXLanguage(xLanguage: RunCodehubTemplateJobRequestXLanguageEnum): RunCodehubTemplateJobRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: RunCodehubTemplateJobRequestXLanguageEnum | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage() { + return this['X-Language']; + } + public withBody(body: CodehubJobInfo): RunCodehubTemplateJobRequest { + this['body'] = body; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum RunCodehubTemplateJobRequestXLanguageEnum { + ZH_CN = 'zh-cn', + EN_US = 'en-us' +} diff --git a/services/devstar/v1/model/RunCodehubTemplateJobResponse.ts b/services/devstar/v1/model/RunCodehubTemplateJobResponse.ts new file mode 100644 index 000000000..cb10975e2 --- /dev/null +++ b/services/devstar/v1/model/RunCodehubTemplateJobResponse.ts @@ -0,0 +1,19 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class RunCodehubTemplateJobResponse extends SdkResponse { + private 'job_id'?: string | undefined; + public constructor() { + super(); + } + public withJobId(jobId: string): RunCodehubTemplateJobResponse { + this['job_id'] = jobId; + return this; + } + public set jobId(jobId: string | undefined) { + this['job_id'] = jobId; + } + public get jobId() { + return this['job_id']; + } +} \ No newline at end of file diff --git a/services/devstar/v1/model/RunDevstarTemplateJobRequest.ts b/services/devstar/v1/model/RunDevstarTemplateJobRequest.ts index d488440f9..822e56fb3 100644 --- a/services/devstar/v1/model/RunDevstarTemplateJobRequest.ts +++ b/services/devstar/v1/model/RunDevstarTemplateJobRequest.ts @@ -2,20 +2,23 @@ import { TemplateJobInfo } from './TemplateJobInfo'; export class RunDevstarTemplateJobRequest { - public xLanguage?: RunDevstarTemplateJobRequestXLanguageEnum; + private 'X-Language'?: RunDevstarTemplateJobRequestXLanguageEnum | undefined; public body?: TemplateJobInfo; public constructor() { } - public withXLanguage(xLanguage?: RunDevstarTemplateJobRequestXLanguageEnum): RunDevstarTemplateJobRequest { - this.xLanguage = xLanguage; + public withXLanguage(xLanguage: RunDevstarTemplateJobRequestXLanguageEnum): RunDevstarTemplateJobRequest { + this['X-Language'] = xLanguage; return this; } - public withBody(body?: TemplateJobInfo): RunDevstarTemplateJobRequest { - this.body = body; - return this; + public set xLanguage(xLanguage: RunDevstarTemplateJobRequestXLanguageEnum | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage() { + return this['X-Language']; } - public getParseParam() { - return this.body; + public withBody(body: TemplateJobInfo): RunDevstarTemplateJobRequest { + this['body'] = body; + return this; } } diff --git a/services/devstar/v1/model/RunDevstarTemplateJobResponse.ts b/services/devstar/v1/model/RunDevstarTemplateJobResponse.ts index c1863c9d9..d614bbc08 100644 --- a/services/devstar/v1/model/RunDevstarTemplateJobResponse.ts +++ b/services/devstar/v1/model/RunDevstarTemplateJobResponse.ts @@ -2,12 +2,18 @@ import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; export class RunDevstarTemplateJobResponse extends SdkResponse { - public jobId?: string; + private 'job_id'?: string | undefined; public constructor() { super(); } - public withJobId(jobId?: string): RunDevstarTemplateJobResponse { - this.jobId = jobId; + public withJobId(jobId: string): RunDevstarTemplateJobResponse { + this['job_id'] = jobId; return this; } + public set jobId(jobId: string | undefined) { + this['job_id'] = jobId; + } + public get jobId() { + return this['job_id']; + } } \ No newline at end of file diff --git a/services/devstar/v1/model/ShowJobDetailRequest.ts b/services/devstar/v1/model/ShowJobDetailRequest.ts index ba1971145..3371c897a 100644 --- a/services/devstar/v1/model/ShowJobDetailRequest.ts +++ b/services/devstar/v1/model/ShowJobDetailRequest.ts @@ -1,19 +1,31 @@ export class ShowJobDetailRequest { - public xLanguage?: ShowJobDetailRequestXLanguageEnum; - public jobId: string; + private 'X-Language'?: ShowJobDetailRequestXLanguageEnum | undefined; + private 'job_id': string | undefined; public constructor(jobId: any) { - this.jobId = jobId; + this['job_id'] = jobId; } - public withXLanguage(xLanguage?: ShowJobDetailRequestXLanguageEnum): ShowJobDetailRequest { - this.xLanguage = xLanguage; + public withXLanguage(xLanguage: ShowJobDetailRequestXLanguageEnum): ShowJobDetailRequest { + this['X-Language'] = xLanguage; return this; } + public set xLanguage(xLanguage: ShowJobDetailRequestXLanguageEnum | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage() { + return this['X-Language']; + } public withJobId(jobId: string): ShowJobDetailRequest { - this.jobId = jobId; + this['job_id'] = jobId; return this; } + public set jobId(jobId: string | undefined) { + this['job_id'] = jobId; + } + public get jobId() { + return this['job_id']; + } } /** diff --git a/services/devstar/v1/model/ShowJobDetailResponse.ts b/services/devstar/v1/model/ShowJobDetailResponse.ts index b156f273f..c8211c56f 100644 --- a/services/devstar/v1/model/ShowJobDetailResponse.ts +++ b/services/devstar/v1/model/ShowJobDetailResponse.ts @@ -4,25 +4,37 @@ import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; export class ShowJobDetailResponse extends SdkResponse { public id?: string; public name?: string; - public jobStatus?: object; - public jobResult?: string; + private 'job_status'?: object | undefined; + private 'job_result'?: string | undefined; public constructor() { super(); } - public withId(id?: string): ShowJobDetailResponse { - this.id = id; + public withId(id: string): ShowJobDetailResponse { + this['id'] = id; return this; } - public withName(name?: string): ShowJobDetailResponse { - this.name = name; + public withName(name: string): ShowJobDetailResponse { + this['name'] = name; return this; } - public withJobStatus(jobStatus?: object): ShowJobDetailResponse { - this.jobStatus = jobStatus; + public withJobStatus(jobStatus: object): ShowJobDetailResponse { + this['job_status'] = jobStatus; return this; } - public withJobResult(jobResult?: string): ShowJobDetailResponse { - this.jobResult = jobResult; + public set jobStatus(jobStatus: object | undefined) { + this['job_status'] = jobStatus; + } + public get jobStatus() { + return this['job_status']; + } + public withJobResult(jobResult: string): ShowJobDetailResponse { + this['job_result'] = jobResult; return this; } + public set jobResult(jobResult: string | undefined) { + this['job_result'] = jobResult; + } + public get jobResult() { + return this['job_result']; + } } \ No newline at end of file diff --git a/services/devstar/v1/model/ShowTemplateDetailRequest.ts b/services/devstar/v1/model/ShowTemplateDetailRequest.ts index b7fbdd110..09705ba60 100644 --- a/services/devstar/v1/model/ShowTemplateDetailRequest.ts +++ b/services/devstar/v1/model/ShowTemplateDetailRequest.ts @@ -1,19 +1,31 @@ export class ShowTemplateDetailRequest { - public xLanguage?: ShowTemplateDetailRequestXLanguageEnum; - public templateId: string; + private 'X-Language'?: ShowTemplateDetailRequestXLanguageEnum | undefined; + private 'template_id': string | undefined; public constructor(templateId: any) { - this.templateId = templateId; + this['template_id'] = templateId; } - public withXLanguage(xLanguage?: ShowTemplateDetailRequestXLanguageEnum): ShowTemplateDetailRequest { - this.xLanguage = xLanguage; + public withXLanguage(xLanguage: ShowTemplateDetailRequestXLanguageEnum): ShowTemplateDetailRequest { + this['X-Language'] = xLanguage; return this; } + public set xLanguage(xLanguage: ShowTemplateDetailRequestXLanguageEnum | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage() { + return this['X-Language']; + } public withTemplateId(templateId: string): ShowTemplateDetailRequest { - this.templateId = templateId; + this['template_id'] = templateId; return this; } + public set templateId(templateId: string | undefined) { + this['template_id'] = templateId; + } + public get templateId() { + return this['template_id']; + } } /** diff --git a/services/devstar/v1/model/ShowTemplateDetailResponse.ts b/services/devstar/v1/model/ShowTemplateDetailResponse.ts index d452f8b34..92d03b9af 100644 --- a/services/devstar/v1/model/ShowTemplateDetailResponse.ts +++ b/services/devstar/v1/model/ShowTemplateDetailResponse.ts @@ -6,54 +6,84 @@ export class ShowTemplateDetailResponse extends SdkResponse { public id?: string; public title?: string; public description?: string; - public regionId?: string; - public repostoryId?: string; - public codeUrl?: string; - public sshUrl?: string; - public projectUuid?: string; + private 'region_id'?: string | undefined; + private 'repostory_id'?: string | undefined; + private 'code_url'?: string | undefined; + private 'ssh_url'?: string | undefined; + private 'project_uuid'?: string | undefined; public status?: number; public properties?: Array; public constructor() { super(); } - public withId(id?: string): ShowTemplateDetailResponse { - this.id = id; + public withId(id: string): ShowTemplateDetailResponse { + this['id'] = id; return this; } - public withTitle(title?: string): ShowTemplateDetailResponse { - this.title = title; + public withTitle(title: string): ShowTemplateDetailResponse { + this['title'] = title; return this; } - public withDescription(description?: string): ShowTemplateDetailResponse { - this.description = description; + public withDescription(description: string): ShowTemplateDetailResponse { + this['description'] = description; return this; } - public withRegionId(regionId?: string): ShowTemplateDetailResponse { - this.regionId = regionId; + public withRegionId(regionId: string): ShowTemplateDetailResponse { + this['region_id'] = regionId; return this; } - public withRepostoryId(repostoryId?: string): ShowTemplateDetailResponse { - this.repostoryId = repostoryId; + public set regionId(regionId: string | undefined) { + this['region_id'] = regionId; + } + public get regionId() { + return this['region_id']; + } + public withRepostoryId(repostoryId: string): ShowTemplateDetailResponse { + this['repostory_id'] = repostoryId; return this; } - public withCodeUrl(codeUrl?: string): ShowTemplateDetailResponse { - this.codeUrl = codeUrl; + public set repostoryId(repostoryId: string | undefined) { + this['repostory_id'] = repostoryId; + } + public get repostoryId() { + return this['repostory_id']; + } + public withCodeUrl(codeUrl: string): ShowTemplateDetailResponse { + this['code_url'] = codeUrl; return this; } - public withSshUrl(sshUrl?: string): ShowTemplateDetailResponse { - this.sshUrl = sshUrl; + public set codeUrl(codeUrl: string | undefined) { + this['code_url'] = codeUrl; + } + public get codeUrl() { + return this['code_url']; + } + public withSshUrl(sshUrl: string): ShowTemplateDetailResponse { + this['ssh_url'] = sshUrl; return this; } - public withProjectUuid(projectUuid?: string): ShowTemplateDetailResponse { - this.projectUuid = projectUuid; + public set sshUrl(sshUrl: string | undefined) { + this['ssh_url'] = sshUrl; + } + public get sshUrl() { + return this['ssh_url']; + } + public withProjectUuid(projectUuid: string): ShowTemplateDetailResponse { + this['project_uuid'] = projectUuid; return this; } - public withStatus(status?: number): ShowTemplateDetailResponse { - this.status = status; + public set projectUuid(projectUuid: string | undefined) { + this['project_uuid'] = projectUuid; + } + public get projectUuid() { + return this['project_uuid']; + } + public withStatus(status: number): ShowTemplateDetailResponse { + this['status'] = status; return this; } - public withProperties(properties?: Array): ShowTemplateDetailResponse { - this.properties = properties; + public withProperties(properties: Array): ShowTemplateDetailResponse { + this['properties'] = properties; return this; } } \ No newline at end of file diff --git a/services/devstar/v1/model/ShowTemplateFileRequest.ts b/services/devstar/v1/model/ShowTemplateFileRequest.ts new file mode 100644 index 000000000..d28b2cd62 --- /dev/null +++ b/services/devstar/v1/model/ShowTemplateFileRequest.ts @@ -0,0 +1,63 @@ + + +export class ShowTemplateFileRequest { + private 'X-Language'?: ShowTemplateFileRequestXLanguageEnum | undefined; + private 'template_id': string | undefined; + private 'file_path': string | undefined; + public type?: ShowTemplateFileRequestTypeEnum; + public constructor(templateId: any, filePath: any) { + this['template_id'] = templateId; + this['file_path'] = filePath; + } + public withXLanguage(xLanguage: ShowTemplateFileRequestXLanguageEnum): ShowTemplateFileRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: ShowTemplateFileRequestXLanguageEnum | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage() { + return this['X-Language']; + } + public withTemplateId(templateId: string): ShowTemplateFileRequest { + this['template_id'] = templateId; + return this; + } + public set templateId(templateId: string | undefined) { + this['template_id'] = templateId; + } + public get templateId() { + return this['template_id']; + } + public withFilePath(filePath: string): ShowTemplateFileRequest { + this['file_path'] = filePath; + return this; + } + public set filePath(filePath: string | undefined) { + this['file_path'] = filePath; + } + public get filePath() { + return this['file_path']; + } + public withType(type: ShowTemplateFileRequestTypeEnum): ShowTemplateFileRequest { + this['type'] = type; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ShowTemplateFileRequestXLanguageEnum { + ZH_CN = 'zh-cn', + EN_US = 'en-us' +} +/** + * @export + * @enum {string} + */ +export enum ShowTemplateFileRequestTypeEnum { + SOURCE_PACKAGE = 'source-package', + INTRODUCTION = 'introduction' +} diff --git a/services/devstar/v1/model/ShowTemplateFileResponse.ts b/services/devstar/v1/model/ShowTemplateFileResponse.ts new file mode 100644 index 000000000..e00392ab1 --- /dev/null +++ b/services/devstar/v1/model/ShowTemplateFileResponse.ts @@ -0,0 +1,51 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowTemplateFileResponse extends SdkResponse { + public content?: string; + public encoding?: string; + private 'file_name'?: string | undefined; + private 'file_path'?: string | undefined; + private 'file_type'?: string | undefined; + public constructor() { + super(); + } + public withContent(content: string): ShowTemplateFileResponse { + this['content'] = content; + return this; + } + public withEncoding(encoding: string): ShowTemplateFileResponse { + this['encoding'] = encoding; + return this; + } + public withFileName(fileName: string): ShowTemplateFileResponse { + this['file_name'] = fileName; + return this; + } + public set fileName(fileName: string | undefined) { + this['file_name'] = fileName; + } + public get fileName() { + return this['file_name']; + } + public withFilePath(filePath: string): ShowTemplateFileResponse { + this['file_path'] = filePath; + return this; + } + public set filePath(filePath: string | undefined) { + this['file_path'] = filePath; + } + public get filePath() { + return this['file_path']; + } + public withFileType(fileType: string): ShowTemplateFileResponse { + this['file_type'] = fileType; + return this; + } + public set fileType(fileType: string | undefined) { + this['file_type'] = fileType; + } + public get fileType() { + return this['file_type']; + } +} \ No newline at end of file diff --git a/services/devstar/v1/model/ShowTemplateV3Request.ts b/services/devstar/v1/model/ShowTemplateV3Request.ts new file mode 100644 index 000000000..361c9dc02 --- /dev/null +++ b/services/devstar/v1/model/ShowTemplateV3Request.ts @@ -0,0 +1,38 @@ + + +export class ShowTemplateV3Request { + private 'X-Language'?: ShowTemplateV3RequestXLanguageEnum | undefined; + private 'template_id': string | undefined; + public constructor(templateId: any) { + this['template_id'] = templateId; + } + public withXLanguage(xLanguage: ShowTemplateV3RequestXLanguageEnum): ShowTemplateV3Request { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: ShowTemplateV3RequestXLanguageEnum | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage() { + return this['X-Language']; + } + public withTemplateId(templateId: string): ShowTemplateV3Request { + this['template_id'] = templateId; + return this; + } + public set templateId(templateId: string | undefined) { + this['template_id'] = templateId; + } + public get templateId() { + return this['template_id']; + } +} + +/** + * @export + * @enum {string} + */ +export enum ShowTemplateV3RequestXLanguageEnum { + ZH_CN = 'zh-cn', + EN_US = 'en-us' +} diff --git a/services/devstar/v1/model/ShowTemplateV3Response.ts b/services/devstar/v1/model/ShowTemplateV3Response.ts new file mode 100644 index 000000000..3bdd4d62d --- /dev/null +++ b/services/devstar/v1/model/ShowTemplateV3Response.ts @@ -0,0 +1,223 @@ +import { TagInfo } from './TagInfo'; +import { TopicCategory } from './TopicCategory'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowTemplateV3Response extends SdkResponse { + public id?: string; + public title?: string; + public description?: string; + private 'creator_id'?: string | undefined; + public creator?: string; + public nickname?: string; + public score?: number; + public status?: number; + private 'view_count'?: number | undefined; + private 'usage_count'?: number | undefined; + private 'created_at'?: string | undefined; + private 'updated_at'?: string | undefined; + private 'published_at'?: string | undefined; + private 'favorite_state'?: number | undefined; + public maintainers?: Array; + private 'platform_source'?: number | undefined; + public properties?: object; + public dependencies?: Array; + private 'dependency_type'?: string | undefined; + public store?: number; + private 'store_info'?: string | undefined; + private 'file_size'?: number | undefined; + public deployment?: object; + private 'is_static'?: number | undefined; + private 'update_id'?: string | undefined; + public topic?: Array; + public tags?: Array; + public constructor() { + super(); + } + public withId(id: string): ShowTemplateV3Response { + this['id'] = id; + return this; + } + public withTitle(title: string): ShowTemplateV3Response { + this['title'] = title; + return this; + } + public withDescription(description: string): ShowTemplateV3Response { + this['description'] = description; + return this; + } + public withCreatorId(creatorId: string): ShowTemplateV3Response { + this['creator_id'] = creatorId; + return this; + } + public set creatorId(creatorId: string | undefined) { + this['creator_id'] = creatorId; + } + public get creatorId() { + return this['creator_id']; + } + public withCreator(creator: string): ShowTemplateV3Response { + this['creator'] = creator; + return this; + } + public withNickname(nickname: string): ShowTemplateV3Response { + this['nickname'] = nickname; + return this; + } + public withScore(score: number): ShowTemplateV3Response { + this['score'] = score; + return this; + } + public withStatus(status: number): ShowTemplateV3Response { + this['status'] = status; + return this; + } + public withViewCount(viewCount: number): ShowTemplateV3Response { + this['view_count'] = viewCount; + return this; + } + public set viewCount(viewCount: number | undefined) { + this['view_count'] = viewCount; + } + public get viewCount() { + return this['view_count']; + } + public withUsageCount(usageCount: number): ShowTemplateV3Response { + this['usage_count'] = usageCount; + return this; + } + public set usageCount(usageCount: number | undefined) { + this['usage_count'] = usageCount; + } + public get usageCount() { + return this['usage_count']; + } + public withCreatedAt(createdAt: string): ShowTemplateV3Response { + this['created_at'] = createdAt; + return this; + } + public set createdAt(createdAt: string | undefined) { + this['created_at'] = createdAt; + } + public get createdAt() { + return this['created_at']; + } + public withUpdatedAt(updatedAt: string): ShowTemplateV3Response { + this['updated_at'] = updatedAt; + return this; + } + public set updatedAt(updatedAt: string | undefined) { + this['updated_at'] = updatedAt; + } + public get updatedAt() { + return this['updated_at']; + } + public withPublishedAt(publishedAt: string): ShowTemplateV3Response { + this['published_at'] = publishedAt; + return this; + } + public set publishedAt(publishedAt: string | undefined) { + this['published_at'] = publishedAt; + } + public get publishedAt() { + return this['published_at']; + } + public withFavoriteState(favoriteState: number): ShowTemplateV3Response { + this['favorite_state'] = favoriteState; + return this; + } + public set favoriteState(favoriteState: number | undefined) { + this['favorite_state'] = favoriteState; + } + public get favoriteState() { + return this['favorite_state']; + } + public withMaintainers(maintainers: Array): ShowTemplateV3Response { + this['maintainers'] = maintainers; + return this; + } + public withPlatformSource(platformSource: number): ShowTemplateV3Response { + this['platform_source'] = platformSource; + return this; + } + public set platformSource(platformSource: number | undefined) { + this['platform_source'] = platformSource; + } + public get platformSource() { + return this['platform_source']; + } + public withProperties(properties: object): ShowTemplateV3Response { + this['properties'] = properties; + return this; + } + public withDependencies(dependencies: Array): ShowTemplateV3Response { + this['dependencies'] = dependencies; + return this; + } + public withDependencyType(dependencyType: string): ShowTemplateV3Response { + this['dependency_type'] = dependencyType; + return this; + } + public set dependencyType(dependencyType: string | undefined) { + this['dependency_type'] = dependencyType; + } + public get dependencyType() { + return this['dependency_type']; + } + public withStore(store: number): ShowTemplateV3Response { + this['store'] = store; + return this; + } + public withStoreInfo(storeInfo: string): ShowTemplateV3Response { + this['store_info'] = storeInfo; + return this; + } + public set storeInfo(storeInfo: string | undefined) { + this['store_info'] = storeInfo; + } + public get storeInfo() { + return this['store_info']; + } + public withFileSize(fileSize: number): ShowTemplateV3Response { + this['file_size'] = fileSize; + return this; + } + public set fileSize(fileSize: number | undefined) { + this['file_size'] = fileSize; + } + public get fileSize() { + return this['file_size']; + } + public withDeployment(deployment: object): ShowTemplateV3Response { + this['deployment'] = deployment; + return this; + } + public withIsStatic(isStatic: number): ShowTemplateV3Response { + this['is_static'] = isStatic; + return this; + } + public set isStatic(isStatic: number | undefined) { + this['is_static'] = isStatic; + } + public get isStatic() { + return this['is_static']; + } + public withUpdateId(updateId: string): ShowTemplateV3Response { + this['update_id'] = updateId; + return this; + } + public set updateId(updateId: string | undefined) { + this['update_id'] = updateId; + } + public get updateId() { + return this['update_id']; + } + public withTopic(topic: Array): ShowTemplateV3Response { + this['topic'] = topic; + return this; + } + public withTags(tags: Array): ShowTemplateV3Response { + this['tags'] = tags; + return this; + } +} \ No newline at end of file diff --git a/services/devstar/v1/model/TagInfo.ts b/services/devstar/v1/model/TagInfo.ts new file mode 100644 index 000000000..6377f2135 --- /dev/null +++ b/services/devstar/v1/model/TagInfo.ts @@ -0,0 +1,16 @@ + + +export class TagInfo { + public id?: string; + public name?: string; + public constructor() { + } + public withId(id: string): TagInfo { + this['id'] = id; + return this; + } + public withName(name: string): TagInfo { + this['name'] = name; + return this; + } +} \ No newline at end of file diff --git a/services/devstar/v1/model/TemplateInfo.ts b/services/devstar/v1/model/TemplateInfo.ts new file mode 100644 index 000000000..d0d3d139a --- /dev/null +++ b/services/devstar/v1/model/TemplateInfo.ts @@ -0,0 +1,282 @@ +import { PipelineTemplateInfo } from './PipelineTemplateInfo'; +import { Reference } from './Reference'; +import { TagInfo } from './TagInfo'; +import { TemplateProductExt } from './TemplateProductExt'; +import { TopicCategory } from './TopicCategory'; + + +export class TemplateInfo { + public id?: string; + public title?: string; + public description?: string; + public productshorts?: Array; + public products?: Array; + public topic?: Array; + private 'creator_id'?: string | undefined; + public creator?: string; + public nickname?: string; + public score?: number; + public label?: string; + public store?: number; + private 'store_info'?: string | undefined; + public status?: number; + private 'view_count'?: number | undefined; + private 'usage_count'?: number | undefined; + private 'created_at'?: string | undefined; + private 'updated_at'?: string | undefined; + private 'published_at'?: string | undefined; + private 'favorite_state'?: number | undefined; + public tags?: Array; + public type?: number; + private 'is_static'?: number | undefined; + public maintainers?: Array; + private 'pipeline_template'?: PipelineTemplateInfo | undefined; + private 'platform_source'?: number | undefined; + public references?: Array; + public properties?: object; + public dependencies?: Array; + private 'dependency_type'?: string | undefined; + private 'forum_id'?: number | undefined; + private 'file_size'?: number | undefined; + public deployment?: object; + private 'update_id'?: string | undefined; + private 'is_support_cloudide'?: boolean | undefined; + public constructor() { + } + public withId(id: string): TemplateInfo { + this['id'] = id; + return this; + } + public withTitle(title: string): TemplateInfo { + this['title'] = title; + return this; + } + public withDescription(description: string): TemplateInfo { + this['description'] = description; + return this; + } + public withProductshorts(productshorts: Array): TemplateInfo { + this['productshorts'] = productshorts; + return this; + } + public withProducts(products: Array): TemplateInfo { + this['products'] = products; + return this; + } + public withTopic(topic: Array): TemplateInfo { + this['topic'] = topic; + return this; + } + public withCreatorId(creatorId: string): TemplateInfo { + this['creator_id'] = creatorId; + return this; + } + public set creatorId(creatorId: string | undefined) { + this['creator_id'] = creatorId; + } + public get creatorId() { + return this['creator_id']; + } + public withCreator(creator: string): TemplateInfo { + this['creator'] = creator; + return this; + } + public withNickname(nickname: string): TemplateInfo { + this['nickname'] = nickname; + return this; + } + public withScore(score: number): TemplateInfo { + this['score'] = score; + return this; + } + public withLabel(label: string): TemplateInfo { + this['label'] = label; + return this; + } + public withStore(store: number): TemplateInfo { + this['store'] = store; + return this; + } + public withStoreInfo(storeInfo: string): TemplateInfo { + this['store_info'] = storeInfo; + return this; + } + public set storeInfo(storeInfo: string | undefined) { + this['store_info'] = storeInfo; + } + public get storeInfo() { + return this['store_info']; + } + public withStatus(status: number): TemplateInfo { + this['status'] = status; + return this; + } + public withViewCount(viewCount: number): TemplateInfo { + this['view_count'] = viewCount; + return this; + } + public set viewCount(viewCount: number | undefined) { + this['view_count'] = viewCount; + } + public get viewCount() { + return this['view_count']; + } + public withUsageCount(usageCount: number): TemplateInfo { + this['usage_count'] = usageCount; + return this; + } + public set usageCount(usageCount: number | undefined) { + this['usage_count'] = usageCount; + } + public get usageCount() { + return this['usage_count']; + } + public withCreatedAt(createdAt: string): TemplateInfo { + this['created_at'] = createdAt; + return this; + } + public set createdAt(createdAt: string | undefined) { + this['created_at'] = createdAt; + } + public get createdAt() { + return this['created_at']; + } + public withUpdatedAt(updatedAt: string): TemplateInfo { + this['updated_at'] = updatedAt; + return this; + } + public set updatedAt(updatedAt: string | undefined) { + this['updated_at'] = updatedAt; + } + public get updatedAt() { + return this['updated_at']; + } + public withPublishedAt(publishedAt: string): TemplateInfo { + this['published_at'] = publishedAt; + return this; + } + public set publishedAt(publishedAt: string | undefined) { + this['published_at'] = publishedAt; + } + public get publishedAt() { + return this['published_at']; + } + public withFavoriteState(favoriteState: number): TemplateInfo { + this['favorite_state'] = favoriteState; + return this; + } + public set favoriteState(favoriteState: number | undefined) { + this['favorite_state'] = favoriteState; + } + public get favoriteState() { + return this['favorite_state']; + } + public withTags(tags: Array): TemplateInfo { + this['tags'] = tags; + return this; + } + public withType(type: number): TemplateInfo { + this['type'] = type; + return this; + } + public withIsStatic(isStatic: number): TemplateInfo { + this['is_static'] = isStatic; + return this; + } + public set isStatic(isStatic: number | undefined) { + this['is_static'] = isStatic; + } + public get isStatic() { + return this['is_static']; + } + public withMaintainers(maintainers: Array): TemplateInfo { + this['maintainers'] = maintainers; + return this; + } + public withPipelineTemplate(pipelineTemplate: PipelineTemplateInfo): TemplateInfo { + this['pipeline_template'] = pipelineTemplate; + return this; + } + public set pipelineTemplate(pipelineTemplate: PipelineTemplateInfo | undefined) { + this['pipeline_template'] = pipelineTemplate; + } + public get pipelineTemplate() { + return this['pipeline_template']; + } + public withPlatformSource(platformSource: number): TemplateInfo { + this['platform_source'] = platformSource; + return this; + } + public set platformSource(platformSource: number | undefined) { + this['platform_source'] = platformSource; + } + public get platformSource() { + return this['platform_source']; + } + public withReferences(references: Array): TemplateInfo { + this['references'] = references; + return this; + } + public withProperties(properties: object): TemplateInfo { + this['properties'] = properties; + return this; + } + public withDependencies(dependencies: Array): TemplateInfo { + this['dependencies'] = dependencies; + return this; + } + public withDependencyType(dependencyType: string): TemplateInfo { + this['dependency_type'] = dependencyType; + return this; + } + public set dependencyType(dependencyType: string | undefined) { + this['dependency_type'] = dependencyType; + } + public get dependencyType() { + return this['dependency_type']; + } + public withForumId(forumId: number): TemplateInfo { + this['forum_id'] = forumId; + return this; + } + public set forumId(forumId: number | undefined) { + this['forum_id'] = forumId; + } + public get forumId() { + return this['forum_id']; + } + public withFileSize(fileSize: number): TemplateInfo { + this['file_size'] = fileSize; + return this; + } + public set fileSize(fileSize: number | undefined) { + this['file_size'] = fileSize; + } + public get fileSize() { + return this['file_size']; + } + public withDeployment(deployment: object): TemplateInfo { + this['deployment'] = deployment; + return this; + } + public withUpdateId(updateId: string): TemplateInfo { + this['update_id'] = updateId; + return this; + } + public set updateId(updateId: string | undefined) { + this['update_id'] = updateId; + } + public get updateId() { + return this['update_id']; + } + public withIsSupportCloudide(isSupportCloudide: boolean): TemplateInfo { + this['is_support_cloudide'] = isSupportCloudide; + return this; + } + public set isSupportCloudide(isSupportCloudide: boolean | undefined) { + this['is_support_cloudide'] = isSupportCloudide; + } + public get isSupportCloudide() { + return this['is_support_cloudide']; + } +} \ No newline at end of file diff --git a/services/devstar/v1/model/TemplateJobInfo.ts b/services/devstar/v1/model/TemplateJobInfo.ts index a728dc0ca..34b9c65fd 100644 --- a/services/devstar/v1/model/TemplateJobInfo.ts +++ b/services/devstar/v1/model/TemplateJobInfo.ts @@ -2,75 +2,56 @@ import { RepositoryInfo } from './RepositoryInfo'; export class TemplateJobInfo { - public applicationName?: string; - public templateId: string; - public repoType?: number; + private 'application_name'?: string | undefined; + private 'template_id': string | undefined; + private 'repo_type'?: number | undefined; public properties?: object; - public repoInfo?: RepositoryInfo; + private 'repo_info'?: RepositoryInfo | undefined; public constructor(templateId: any) { - this.templateId = templateId; + this['template_id'] = templateId; } - public withApplicationName(applicationName?: string): TemplateJobInfo { - this.applicationName = applicationName; + public withApplicationName(applicationName: string): TemplateJobInfo { + this['application_name'] = applicationName; return this; } - public withTemplateId(templateId: string): TemplateJobInfo { - this.templateId = templateId; - return this; + public set applicationName(applicationName: string | undefined) { + this['application_name'] = applicationName; } - public withRepoType(repoType?: number): TemplateJobInfo { - this.repoType = repoType; - return this; + public get applicationName() { + return this['application_name']; } - public withProperties(properties?: object): TemplateJobInfo { - this.properties = properties; + public withTemplateId(templateId: string): TemplateJobInfo { + this['template_id'] = templateId; return this; } - public withRepoInfo(repoInfo?: RepositoryInfo): TemplateJobInfo { - this.repoInfo = repoInfo; - return this; + public set templateId(templateId: string | undefined) { + this['template_id'] = templateId; } - public getParseParam() { - const parseParam = new TemplateJobInfoParse(); - if(this.applicationName !== null && this.applicationName !== undefined) { - parseParam.setApplicationName(this.applicationName); - } - if(this.templateId !== null && this.templateId !== undefined) { - parseParam.setTemplateId(this.templateId); - } - if(this.repoType !== null && this.repoType !== undefined) { - parseParam.setRepoType(this.repoType); - } - if(this.properties !== null && this.properties !== undefined) { - parseParam.setProperties(this.properties); - } - if(this.repoInfo !== null && this.repoInfo !== undefined) { - parseParam.setRepoInfo(this.repoInfo.getParseParam()); - } - return parseParam; + public get templateId() { + return this['template_id']; } -} - -export class TemplateJobInfoParse { - private 'application_name'?: any; - private 'template_id'?: any; - private 'repo_type'?: any; - private 'properties'?: any; - private 'repo_info'?: any; - - public setApplicationName(applicationName?: any) { - this['application_name'] = applicationName; - } - public setTemplateId(templateId?: any) { - this['template_id'] = templateId; + public withRepoType(repoType: number): TemplateJobInfo { + this['repo_type'] = repoType; + return this; } - public setRepoType(repoType?: any) { + public set repoType(repoType: number | undefined) { this['repo_type'] = repoType; } - public setProperties(properties?: any) { + public get repoType() { + return this['repo_type']; + } + public withProperties(properties: object): TemplateJobInfo { this['properties'] = properties; + return this; } - public setRepoInfo(repoInfo?: any) { + public withRepoInfo(repoInfo: RepositoryInfo): TemplateJobInfo { this['repo_info'] = repoInfo; + return this; + } + public set repoInfo(repoInfo: RepositoryInfo | undefined) { + this['repo_info'] = repoInfo; + } + public get repoInfo() { + return this['repo_info']; } } \ No newline at end of file diff --git a/services/devstar/v1/model/TemplateProductExt.ts b/services/devstar/v1/model/TemplateProductExt.ts new file mode 100644 index 000000000..5d8843eee --- /dev/null +++ b/services/devstar/v1/model/TemplateProductExt.ts @@ -0,0 +1,82 @@ + + +export class TemplateProductExt { + public id?: string; + public productshort?: string; + private 'product_name'?: string | undefined; + private 'home_link'?: string | undefined; + private 'api_link'?: string | undefined; + private 'sdk_link'?: string | undefined; + private 'doc_link'?: string | undefined; + private 'logo_link'?: string | undefined; + public constructor() { + } + public withId(id: string): TemplateProductExt { + this['id'] = id; + return this; + } + public withProductshort(productshort: string): TemplateProductExt { + this['productshort'] = productshort; + return this; + } + public withProductName(productName: string): TemplateProductExt { + this['product_name'] = productName; + return this; + } + public set productName(productName: string | undefined) { + this['product_name'] = productName; + } + public get productName() { + return this['product_name']; + } + public withHomeLink(homeLink: string): TemplateProductExt { + this['home_link'] = homeLink; + return this; + } + public set homeLink(homeLink: string | undefined) { + this['home_link'] = homeLink; + } + public get homeLink() { + return this['home_link']; + } + public withApiLink(apiLink: string): TemplateProductExt { + this['api_link'] = apiLink; + return this; + } + public set apiLink(apiLink: string | undefined) { + this['api_link'] = apiLink; + } + public get apiLink() { + return this['api_link']; + } + public withSdkLink(sdkLink: string): TemplateProductExt { + this['sdk_link'] = sdkLink; + return this; + } + public set sdkLink(sdkLink: string | undefined) { + this['sdk_link'] = sdkLink; + } + public get sdkLink() { + return this['sdk_link']; + } + public withDocLink(docLink: string): TemplateProductExt { + this['doc_link'] = docLink; + return this; + } + public set docLink(docLink: string | undefined) { + this['doc_link'] = docLink; + } + public get docLink() { + return this['doc_link']; + } + public withLogoLink(logoLink: string): TemplateProductExt { + this['logo_link'] = logoLink; + return this; + } + public set logoLink(logoLink: string | undefined) { + this['logo_link'] = logoLink; + } + public get logoLink() { + return this['logo_link']; + } +} \ No newline at end of file diff --git a/services/devstar/v1/model/TemplateQueryV2.ts b/services/devstar/v1/model/TemplateQueryV2.ts new file mode 100644 index 000000000..f95de1dce --- /dev/null +++ b/services/devstar/v1/model/TemplateQueryV2.ts @@ -0,0 +1,123 @@ + + +export class TemplateQueryV2 { + public category?: Array; + public keyword?: string; + private 'sort_by'?: string | undefined; + public label?: string; + private 'my_templates'?: boolean | undefined; + public status?: number; + private 'status_array'?: Array | undefined; + public productshorts?: Array; + public offset?: number; + public limit?: number; + private 'tag_ids'?: Array | undefined; + public types?: Array; + private 'is_static'?: number | undefined; + private 'platform_source'?: Array | undefined; + private 'tag_names'?: Array | undefined; + public constructor() { + } + public withCategory(category: Array): TemplateQueryV2 { + this['category'] = category; + return this; + } + public withKeyword(keyword: string): TemplateQueryV2 { + this['keyword'] = keyword; + return this; + } + public withSortBy(sortBy: string): TemplateQueryV2 { + this['sort_by'] = sortBy; + return this; + } + public set sortBy(sortBy: string | undefined) { + this['sort_by'] = sortBy; + } + public get sortBy() { + return this['sort_by']; + } + public withLabel(label: string): TemplateQueryV2 { + this['label'] = label; + return this; + } + public withMyTemplates(myTemplates: boolean): TemplateQueryV2 { + this['my_templates'] = myTemplates; + return this; + } + public set myTemplates(myTemplates: boolean | undefined) { + this['my_templates'] = myTemplates; + } + public get myTemplates() { + return this['my_templates']; + } + public withStatus(status: number): TemplateQueryV2 { + this['status'] = status; + return this; + } + public withStatusArray(statusArray: Array): TemplateQueryV2 { + this['status_array'] = statusArray; + return this; + } + public set statusArray(statusArray: Array | undefined) { + this['status_array'] = statusArray; + } + public get statusArray() { + return this['status_array']; + } + public withProductshorts(productshorts: Array): TemplateQueryV2 { + this['productshorts'] = productshorts; + return this; + } + public withOffset(offset: number): TemplateQueryV2 { + this['offset'] = offset; + return this; + } + public withLimit(limit: number): TemplateQueryV2 { + this['limit'] = limit; + return this; + } + public withTagIds(tagIds: Array): TemplateQueryV2 { + this['tag_ids'] = tagIds; + return this; + } + public set tagIds(tagIds: Array | undefined) { + this['tag_ids'] = tagIds; + } + public get tagIds() { + return this['tag_ids']; + } + public withTypes(types: Array): TemplateQueryV2 { + this['types'] = types; + return this; + } + public withIsStatic(isStatic: number): TemplateQueryV2 { + this['is_static'] = isStatic; + return this; + } + public set isStatic(isStatic: number | undefined) { + this['is_static'] = isStatic; + } + public get isStatic() { + return this['is_static']; + } + public withPlatformSource(platformSource: Array): TemplateQueryV2 { + this['platform_source'] = platformSource; + return this; + } + public set platformSource(platformSource: Array | undefined) { + this['platform_source'] = platformSource; + } + public get platformSource() { + return this['platform_source']; + } + public withTagNames(tagNames: Array): TemplateQueryV2 { + this['tag_names'] = tagNames; + return this; + } + public set tagNames(tagNames: Array | undefined) { + this['tag_names'] = tagNames; + } + public get tagNames() { + return this['tag_names']; + } +} \ No newline at end of file diff --git a/services/devstar/v1/model/TemplateSimpleInfo.ts b/services/devstar/v1/model/TemplateSimpleInfo.ts index 83b07cf5c..ed9cd5629 100644 --- a/services/devstar/v1/model/TemplateSimpleInfo.ts +++ b/services/devstar/v1/model/TemplateSimpleInfo.ts @@ -6,45 +6,16 @@ export class TemplateSimpleInfo { public description?: string; public constructor() { } - public withId(id?: string): TemplateSimpleInfo { - this.id = id; - return this; - } - public withTitle(title?: string): TemplateSimpleInfo { - this.title = title; - return this; - } - public withDescription(description?: string): TemplateSimpleInfo { - this.description = description; - return this; - } - public getParseParam() { - const parseParam = new TemplateSimpleInfoParse(); - if(this.id !== null && this.id !== undefined) { - parseParam.setId(this.id); - } - if(this.title !== null && this.title !== undefined) { - parseParam.setTitle(this.title); - } - if(this.description !== null && this.description !== undefined) { - parseParam.setDescription(this.description); - } - return parseParam; - } -} - -export class TemplateSimpleInfoParse { - private 'id'?: any; - private 'title'?: any; - private 'description'?: any; - - public setId(id?: any) { + public withId(id: string): TemplateSimpleInfo { this['id'] = id; + return this; } - public setTitle(title?: any) { + public withTitle(title: string): TemplateSimpleInfo { this['title'] = title; + return this; } - public setDescription(description?: any) { + public withDescription(description: string): TemplateSimpleInfo { this['description'] = description; + return this; } } \ No newline at end of file diff --git a/services/devstar/v1/model/TemplateViewHistory.ts b/services/devstar/v1/model/TemplateViewHistory.ts new file mode 100644 index 000000000..87ef59adb --- /dev/null +++ b/services/devstar/v1/model/TemplateViewHistory.ts @@ -0,0 +1,30 @@ + + +export class TemplateViewHistory { + private 'template_id': string | undefined; + private 'template_title': string | undefined; + public constructor(templateId: any, templateTitle: any) { + this['template_id'] = templateId; + this['template_title'] = templateTitle; + } + public withTemplateId(templateId: string): TemplateViewHistory { + this['template_id'] = templateId; + return this; + } + public set templateId(templateId: string | undefined) { + this['template_id'] = templateId; + } + public get templateId() { + return this['template_id']; + } + public withTemplateTitle(templateTitle: string): TemplateViewHistory { + this['template_title'] = templateTitle; + return this; + } + public set templateTitle(templateTitle: string | undefined) { + this['template_title'] = templateTitle; + } + public get templateTitle() { + return this['template_title']; + } +} \ No newline at end of file diff --git a/services/devstar/v1/model/TemplatesInfo.ts b/services/devstar/v1/model/TemplatesInfo.ts new file mode 100644 index 000000000..6486c7f1d --- /dev/null +++ b/services/devstar/v1/model/TemplatesInfo.ts @@ -0,0 +1,30 @@ + + +export class TemplatesInfo { + private 'template_ids': Array | undefined; + private 'platform_source': number | undefined; + public constructor(templateIds: any, platformSource: any) { + this['template_ids'] = templateIds; + this['platform_source'] = platformSource; + } + public withTemplateIds(templateIds: Array): TemplatesInfo { + this['template_ids'] = templateIds; + return this; + } + public set templateIds(templateIds: Array | undefined) { + this['template_ids'] = templateIds; + } + public get templateIds() { + return this['template_ids']; + } + public withPlatformSource(platformSource: number): TemplatesInfo { + this['platform_source'] = platformSource; + return this; + } + public set platformSource(platformSource: number | undefined) { + this['platform_source'] = platformSource; + } + public get platformSource() { + return this['platform_source']; + } +} \ No newline at end of file diff --git a/services/devstar/v1/model/TopicCategory.ts b/services/devstar/v1/model/TopicCategory.ts new file mode 100644 index 000000000..c7d8dafb2 --- /dev/null +++ b/services/devstar/v1/model/TopicCategory.ts @@ -0,0 +1,50 @@ + + +export class TopicCategory { + private 'topic_id'?: string | undefined; + private 'topic_name'?: string | undefined; + private 'category_id'?: string | undefined; + private 'category_name'?: string | undefined; + public constructor() { + } + public withTopicId(topicId: string): TopicCategory { + this['topic_id'] = topicId; + return this; + } + public set topicId(topicId: string | undefined) { + this['topic_id'] = topicId; + } + public get topicId() { + return this['topic_id']; + } + public withTopicName(topicName: string): TopicCategory { + this['topic_name'] = topicName; + return this; + } + public set topicName(topicName: string | undefined) { + this['topic_name'] = topicName; + } + public get topicName() { + return this['topic_name']; + } + public withCategoryId(categoryId: string): TopicCategory { + this['category_id'] = categoryId; + return this; + } + public set categoryId(categoryId: string | undefined) { + this['category_id'] = categoryId; + } + public get categoryId() { + return this['category_id']; + } + public withCategoryName(categoryName: string): TopicCategory { + this['category_name'] = categoryName; + return this; + } + public set categoryName(categoryName: string | undefined) { + this['category_name'] = categoryName; + } + public get categoryName() { + return this['category_name']; + } +} \ No newline at end of file diff --git a/services/devstar/v1/public-api.ts b/services/devstar/v1/public-api.ts index 282158eba..80e231fa0 100644 --- a/services/devstar/v1/public-api.ts +++ b/services/devstar/v1/public-api.ts @@ -1,16 +1,38 @@ export * from './DevStarClient'; +export * from './model/CodehubJobInfo'; +export * from './model/CreateTemplateViewHistoriesRequest'; +export * from './model/CreateTemplateViewHistoriesResponse'; export * from './model/DownloadApplicationCodeRequest'; export * from './model/DownloadApplicationCodeResponse'; export * from './model/ListPublishedTemplatesRequest'; export * from './model/ListPublishedTemplatesResponse'; +export * from './model/ListTemplateViewHistoriesRequest'; +export * from './model/ListTemplateViewHistoriesResponse'; +export * from './model/ListTemplatesV2Request'; +export * from './model/ListTemplatesV2Response'; +export * from './model/PipelineTemplateInfo'; export * from './model/PropertiesInfo'; +export * from './model/Reference'; export * from './model/RepositoryInfo'; +export * from './model/RunCodehubTemplateJobRequest'; +export * from './model/RunCodehubTemplateJobResponse'; export * from './model/RunDevstarTemplateJobRequest'; export * from './model/RunDevstarTemplateJobResponse'; export * from './model/ShowJobDetailRequest'; export * from './model/ShowJobDetailResponse'; export * from './model/ShowTemplateDetailRequest'; export * from './model/ShowTemplateDetailResponse'; +export * from './model/ShowTemplateFileRequest'; +export * from './model/ShowTemplateFileResponse'; +export * from './model/ShowTemplateV3Request'; +export * from './model/ShowTemplateV3Response'; +export * from './model/TagInfo'; +export * from './model/TemplateInfo'; export * from './model/TemplateJobInfo'; -export * from './model/TemplateSimpleInfo'; \ No newline at end of file +export * from './model/TemplateProductExt'; +export * from './model/TemplateQueryV2'; +export * from './model/TemplateSimpleInfo'; +export * from './model/TemplateViewHistory'; +export * from './model/TemplatesInfo'; +export * from './model/TopicCategory'; \ No newline at end of file