diff --git a/CHANGELOG.md b/CHANGELOG.md index 60b4e77f3..13e1e8b4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +# 3.0.17-beta 2021-09-26 + +### HuaweiCloud SDK FunctionGraph + +- _Features_ + - Support the service `FunctionGraph`. +- _Bug Fix_ + - None +- _Change_ + - None + # 3.0.16-beta 2021-09-24 ### HuaweiCloud SDK CCE diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index e71427b24..9c7595fed 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,14 @@ +# 3.0.17-beta 2021-09-26 + +### HuaweiCloud SDK FunctionGraph + +- _新增特性_ + - 支持函数工作流服务 +- _解决问题_ + - 无 +- _特性变更_ + - 无 + # 3.0.16-beta 2021-09-24 ### HuaweiCloud SDK CCE diff --git a/package.json b/package.json index 52440edef..53a5505f3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "huaweicloud-sdk-nodejs-v3", - "version": "3.0.16-beta", + "version": "3.0.17-beta", "description": "Core code for Huaweicloud SDK for Node.js", "main": "index.js", "scripts": { diff --git a/services/functiongraph/huaweicloud-sdk-functiongraph.ts b/services/functiongraph/huaweicloud-sdk-functiongraph.ts new file mode 100644 index 000000000..b2fe7e980 --- /dev/null +++ b/services/functiongraph/huaweicloud-sdk-functiongraph.ts @@ -0,0 +1 @@ +export * from './v2/public-api'; diff --git a/services/functiongraph/v2/FunctionGraphClient.ts b/services/functiongraph/v2/FunctionGraphClient.ts new file mode 100644 index 000000000..5186adf19 --- /dev/null +++ b/services/functiongraph/v2/FunctionGraphClient.ts @@ -0,0 +1,2658 @@ +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 { AsyncInvokeFunctionRequest } from './model/AsyncInvokeFunctionRequest'; +import { AsyncInvokeFunctionResponse } from './model/AsyncInvokeFunctionResponse'; +import { AsyncInvokeReservedFunctionRequest } from './model/AsyncInvokeReservedFunctionRequest'; +import { AsyncInvokeReservedFunctionResponse } from './model/AsyncInvokeReservedFunctionResponse'; +import { BatchDeleteFunctionTriggersRequest } from './model/BatchDeleteFunctionTriggersRequest'; +import { BatchDeleteFunctionTriggersResponse } from './model/BatchDeleteFunctionTriggersResponse'; +import { CreateDependencyRequest } from './model/CreateDependencyRequest'; +import { CreateDependencyRequestBody } from './model/CreateDependencyRequestBody'; +import { CreateDependencyResponse } from './model/CreateDependencyResponse'; +import { CreateEventRequest } from './model/CreateEventRequest'; +import { CreateEventRequestBody } from './model/CreateEventRequestBody'; +import { CreateEventResponse } from './model/CreateEventResponse'; +import { CreateFunctionRequest } from './model/CreateFunctionRequest'; +import { CreateFunctionRequestBody } from './model/CreateFunctionRequestBody'; +import { CreateFunctionResponse } from './model/CreateFunctionResponse'; +import { CreateFunctionTriggerRequest } from './model/CreateFunctionTriggerRequest'; +import { CreateFunctionTriggerRequestBody } from './model/CreateFunctionTriggerRequestBody'; +import { CreateFunctionTriggerResponse } from './model/CreateFunctionTriggerResponse'; +import { CreateFunctionVersionRequest } from './model/CreateFunctionVersionRequest'; +import { CreateFunctionVersionRequestBody } from './model/CreateFunctionVersionRequestBody'; +import { CreateFunctionVersionResponse } from './model/CreateFunctionVersionResponse'; +import { CreateVersionAliasRequest } from './model/CreateVersionAliasRequest'; +import { CreateVersionAliasRequestBody } from './model/CreateVersionAliasRequestBody'; +import { CreateVersionAliasResponse } from './model/CreateVersionAliasResponse'; +import { DeleteDependencyRequest } from './model/DeleteDependencyRequest'; +import { DeleteDependencyResponse } from './model/DeleteDependencyResponse'; +import { DeleteEventRequest } from './model/DeleteEventRequest'; +import { DeleteEventResponse } from './model/DeleteEventResponse'; +import { DeleteFunctionAsyncInvokeConfigRequest } from './model/DeleteFunctionAsyncInvokeConfigRequest'; +import { DeleteFunctionAsyncInvokeConfigResponse } from './model/DeleteFunctionAsyncInvokeConfigResponse'; +import { DeleteFunctionRequest } from './model/DeleteFunctionRequest'; +import { DeleteFunctionResponse } from './model/DeleteFunctionResponse'; +import { DeleteFunctionTriggerRequest } from './model/DeleteFunctionTriggerRequest'; +import { DeleteFunctionTriggerResponse } from './model/DeleteFunctionTriggerResponse'; +import { DeleteReservedInstanceByIdRequest } from './model/DeleteReservedInstanceByIdRequest'; +import { DeleteReservedInstanceByIdResponse } from './model/DeleteReservedInstanceByIdResponse'; +import { DeleteVersionAliasRequest } from './model/DeleteVersionAliasRequest'; +import { DeleteVersionAliasResponse } from './model/DeleteVersionAliasResponse'; +import { Dependency } from './model/Dependency'; +import { EnableLtsLogsRequest } from './model/EnableLtsLogsRequest'; +import { EnableLtsLogsResponse } from './model/EnableLtsLogsResponse'; +import { ExportFunctionRequest } from './model/ExportFunctionRequest'; +import { ExportFunctionResponse } from './model/ExportFunctionResponse'; +import { FuncAsyncDestinationConfig } from './model/FuncAsyncDestinationConfig'; +import { FuncCode } from './model/FuncCode'; +import { FuncDestinationConfig } from './model/FuncDestinationConfig'; +import { FuncMount } from './model/FuncMount'; +import { FuncVpc } from './model/FuncVpc'; +import { ImportFunctionRequest } from './model/ImportFunctionRequest'; +import { ImportFunctionRequestBody } from './model/ImportFunctionRequestBody'; +import { ImportFunctionResponse } from './model/ImportFunctionResponse'; +import { InvokeFunctionRequest } from './model/InvokeFunctionRequest'; +import { InvokeFunctionResponse } from './model/InvokeFunctionResponse'; +import { ListDependenciesRequest } from './model/ListDependenciesRequest'; +import { ListDependenciesResponse } from './model/ListDependenciesResponse'; +import { ListDependenciesResult } from './model/ListDependenciesResult'; +import { ListEventsRequest } from './model/ListEventsRequest'; +import { ListEventsResponse } from './model/ListEventsResponse'; +import { ListEventsResult } from './model/ListEventsResult'; +import { ListFunctionAsyncInvokeConfigRequest } from './model/ListFunctionAsyncInvokeConfigRequest'; +import { ListFunctionAsyncInvokeConfigResponse } from './model/ListFunctionAsyncInvokeConfigResponse'; +import { ListFunctionAsyncInvokeConfigResult } from './model/ListFunctionAsyncInvokeConfigResult'; +import { ListFunctionResult } from './model/ListFunctionResult'; +import { ListFunctionStatisticsRequest } from './model/ListFunctionStatisticsRequest'; +import { ListFunctionStatisticsResponse } from './model/ListFunctionStatisticsResponse'; +import { ListFunctionStatisticsResponseBody } from './model/ListFunctionStatisticsResponseBody'; +import { ListFunctionTriggerResult } from './model/ListFunctionTriggerResult'; +import { ListFunctionTriggersRequest } from './model/ListFunctionTriggersRequest'; +import { ListFunctionTriggersResponse } from './model/ListFunctionTriggersResponse'; +import { ListFunctionVersionResult } from './model/ListFunctionVersionResult'; +import { ListFunctionVersionsRequest } from './model/ListFunctionVersionsRequest'; +import { ListFunctionVersionsResponse } from './model/ListFunctionVersionsResponse'; +import { ListFunctionsRequest } from './model/ListFunctionsRequest'; +import { ListFunctionsResponse } from './model/ListFunctionsResponse'; +import { ListQuotasRequest } from './model/ListQuotasRequest'; +import { ListQuotasResponse } from './model/ListQuotasResponse'; +import { ListQuotasResult } from './model/ListQuotasResult'; +import { ListStatisticsRequest } from './model/ListStatisticsRequest'; +import { ListStatisticsResponse } from './model/ListStatisticsResponse'; +import { ListVersionAliasResult } from './model/ListVersionAliasResult'; +import { ListVersionAliasesRequest } from './model/ListVersionAliasesRequest'; +import { ListVersionAliasesResponse } from './model/ListVersionAliasesResponse'; +import { MonthUsed } from './model/MonthUsed'; +import { MountConfig } from './model/MountConfig'; +import { MountUser } from './model/MountUser'; +import { PageInfo } from './model/PageInfo'; +import { Resources } from './model/Resources'; +import { ShowDependencyRequest } from './model/ShowDependencyRequest'; +import { ShowDependencyResponse } from './model/ShowDependencyResponse'; +import { ShowEventRequest } from './model/ShowEventRequest'; +import { ShowEventResponse } from './model/ShowEventResponse'; +import { ShowFunctionAsyncInvokeConfigRequest } from './model/ShowFunctionAsyncInvokeConfigRequest'; +import { ShowFunctionAsyncInvokeConfigResponse } from './model/ShowFunctionAsyncInvokeConfigResponse'; +import { ShowFunctionCodeRequest } from './model/ShowFunctionCodeRequest'; +import { ShowFunctionCodeResponse } from './model/ShowFunctionCodeResponse'; +import { ShowFunctionConfigRequest } from './model/ShowFunctionConfigRequest'; +import { ShowFunctionConfigResponse } from './model/ShowFunctionConfigResponse'; +import { ShowFunctionTriggerRequest } from './model/ShowFunctionTriggerRequest'; +import { ShowFunctionTriggerResponse } from './model/ShowFunctionTriggerResponse'; +import { ShowLtsLogDetailsRequest } from './model/ShowLtsLogDetailsRequest'; +import { ShowLtsLogDetailsResponse } from './model/ShowLtsLogDetailsResponse'; +import { ShowVersionAliasRequest } from './model/ShowVersionAliasRequest'; +import { ShowVersionAliasResponse } from './model/ShowVersionAliasResponse'; +import { SlaReportsValue } from './model/SlaReportsValue'; +import { StrategyConfig } from './model/StrategyConfig'; +import { UpdateDependencyRequest } from './model/UpdateDependencyRequest'; +import { UpdateDependencyRequestBody } from './model/UpdateDependencyRequestBody'; +import { UpdateDependencyResponse } from './model/UpdateDependencyResponse'; +import { UpdateEventRequest } from './model/UpdateEventRequest'; +import { UpdateEventRequestBody } from './model/UpdateEventRequestBody'; +import { UpdateEventResponse } from './model/UpdateEventResponse'; +import { UpdateFunctionAsyncInvokeConfigRequest } from './model/UpdateFunctionAsyncInvokeConfigRequest'; +import { UpdateFunctionAsyncInvokeConfigRequestBody } from './model/UpdateFunctionAsyncInvokeConfigRequestBody'; +import { UpdateFunctionAsyncInvokeConfigResponse } from './model/UpdateFunctionAsyncInvokeConfigResponse'; +import { UpdateFunctionCodeRequest } from './model/UpdateFunctionCodeRequest'; +import { UpdateFunctionCodeRequestBody } from './model/UpdateFunctionCodeRequestBody'; +import { UpdateFunctionCodeResponse } from './model/UpdateFunctionCodeResponse'; +import { UpdateFunctionConfigRequest } from './model/UpdateFunctionConfigRequest'; +import { UpdateFunctionConfigRequestBody } from './model/UpdateFunctionConfigRequestBody'; +import { UpdateFunctionConfigResponse } from './model/UpdateFunctionConfigResponse'; +import { UpdateFunctionReservedInstancesRequest } from './model/UpdateFunctionReservedInstancesRequest'; +import { UpdateFunctionReservedInstancesRequestBody } from './model/UpdateFunctionReservedInstancesRequestBody'; +import { UpdateFunctionReservedInstancesResponse } from './model/UpdateFunctionReservedInstancesResponse'; +import { UpdateTriggerRequest } from './model/UpdateTriggerRequest'; +import { UpdateTriggerRequestBody } from './model/UpdateTriggerRequestBody'; +import { UpdateTriggerResponse } from './model/UpdateTriggerResponse'; +import { UpdateVersionAliasRequest } from './model/UpdateVersionAliasRequest'; +import { UpdateVersionAliasRequestBody } from './model/UpdateVersionAliasRequestBody'; +import { UpdateVersionAliasResponse } from './model/UpdateVersionAliasResponse'; + +export class FunctionGraphClient { + public static newBuilder(): ClientBuilder { + return new ClientBuilder(newClient); + } + + private hcClient: HcClient; + public constructor(client: HcClient) { + this.hcClient = client; + } + + public getPath() { + return __dirname; + } + + /** + * 异步执行函数。 + * @summary 异步执行函数。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 + * @param {{ [key: string]: object; }} asyncInvokeFunctionRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public asyncInvokeFunction(asyncInvokeFunctionRequest?: AsyncInvokeFunctionRequest): Promise { + const options = ParamCreater().asyncInvokeFunction(asyncInvokeFunctionRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 函数异步执行并返回预留实例ID用于场景指客户端请求执行比较费时任务,不需要同步等待执行完成返回结果,该方法提前返回任务执行对应的预留实例ID, 如果预留实例有异常, 可以通过该实例ID把对应实例删除(该接口主要针对白名单用户)。 + * @summary 函数异步执行并返回预留实例ID。 + * @param {string} functionUrn 函数的URN(Uniform Resource Name),唯一标识函数。 + * @param {{ [key: string]: object; }} asyncInvokeReservedFunctionRequestBody 函数异步执行并返回预留实例请求body体。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public asyncInvokeReservedFunction(asyncInvokeReservedFunctionRequest?: AsyncInvokeReservedFunctionRequest): Promise { + const options = ParamCreater().asyncInvokeReservedFunction(asyncInvokeReservedFunctionRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 创建依赖包。 + * @summary 创建依赖包 + * @param {CreateDependencyRequestBody} createDependencyRequestBody 添加依赖包的请求体。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createDependency(createDependencyRequest?: CreateDependencyRequest): Promise { + const options = ParamCreater().createDependency(createDependencyRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 创建测试事件。 + * @summary 创建测试事件 + * @param {string} functionUrn 函数的URN(Uniform Resource Name),唯一标识函数。 + * @param {CreateEventRequestBody} createEventRequestBody 创建测试事件请求体。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createEvent(createEventRequest?: CreateEventRequest): Promise { + const options = ParamCreater().createEvent(createEventRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 创建指定的函数。 + * @summary 创建函数。 + * @param {CreateFunctionRequestBody} createFunctionRequestBody 创建函数请求body体。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createFunction(createFunctionRequest?: CreateFunctionRequest): Promise { + const options = ParamCreater().createFunction(createFunctionRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 发布函数版本。 + * @summary 发布函数版本。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 + * @param {CreateFunctionVersionRequestBody} createFunctionVersionRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createFunctionVersion(createFunctionVersionRequest?: CreateFunctionVersionRequest): Promise { + const options = ParamCreater().createFunctionVersion(createFunctionVersionRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 创建函数灰度版本别名。 + * @summary 创建函数版本别名。 + * @param {string} functionUrn 函数的URN。 + * @param {CreateVersionAliasRequestBody} createVersionAliasRequestBody 创建函数请求body体。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createVersionAlias(createVersionAliasRequest?: CreateVersionAliasRequest): Promise { + const options = ParamCreater().createVersionAlias(createVersionAliasRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 删除指定的依赖包。 + * @summary 删除依赖包 + * @param {string} dependId 依赖包的ID。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public deleteDependency(deleteDependencyRequest?: DeleteDependencyRequest): Promise { + const options = ParamCreater().deleteDependency(deleteDependencyRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 删除测试事件。 + * @summary 删除测试事件 + * @param {string} eventId 事件ID。 + * @param {string} functionUrn 函数的URN(Uniform Resource Name),唯一标识函数。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public deleteEvent(deleteEventRequest?: DeleteEventRequest): Promise { + const options = ParamCreater().deleteEvent(deleteEventRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 删除指定的函数或者特定的版本(不允许删除latest版本)。 如果URN中包含函数版本或者别名,则删除特定的函数版本或者别名指向的版本以及该版本关联的trigger。 如果URN中不包含版本或者别名,则删除整个函数,包含所有版本以及别名,触发器。 + * @summary 删除函数/版本。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 不允许删除函数的latest版本,如要删除整个函数(包含所有版本),提供不带任何版本号/别名的urn,如: urn:fss:xxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public deleteFunction(deleteFunctionRequest?: DeleteFunctionRequest): Promise { + const options = ParamCreater().deleteFunction(deleteFunctionRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 删除函数异步配置信息。 + * @summary 删除函数异步配置信息。 + * @param {string} functionUrn 函数的URN(Uniform Resource Name),唯一标识函数。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public deleteFunctionAsyncInvokeConfig(deleteFunctionAsyncInvokeConfigRequest?: DeleteFunctionAsyncInvokeConfigRequest): Promise { + const options = ParamCreater().deleteFunctionAsyncInvokeConfig(deleteFunctionAsyncInvokeConfigRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 预留实例异常时,可以根据预留实例ID删除该预留实例,注意:删除成功之后重新会重新拉起一个新的预留实例,业务高峰期可以更好的工作(该接口主要针对白名单用户) + * @summary 根据预留实例ID删除对应预留实例 + * @param {string} functionUrn 函数的URN(Uniform Resource Name),唯一标识函数。 + * @param {string} instanceId 预留实例id。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public deleteReservedInstanceById(deleteReservedInstanceByIdRequest?: DeleteReservedInstanceByIdRequest): Promise { + const options = ParamCreater().deleteReservedInstanceById(deleteReservedInstanceByIdRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 删除函数版本别名。 + * @summary 删除函数版本别名。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 + * @param {string} aliasName 要删除的别名名称。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public deleteVersionAlias(deleteVersionAliasRequest?: DeleteVersionAliasRequest): Promise { + const options = ParamCreater().deleteVersionAlias(deleteVersionAliasRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 开通lts日志上报功能。 + * @summary 开通lts日志上报功能。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public enableLtsLogs(): Promise { + const options = ParamCreater().enableLtsLogs(); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 导出函数。 + * @summary 导出函数。 + * @param {string} functionUrn 函数的URN(Uniform Resource Name),唯一标识函数。 + * @param {boolean} [config] 是否导出函数配置 + * @param {boolean} [code] 是否导出函数代码 + * @param {'type' | 'code'} [type] 兼容老的方式,type=code代表导出代码,type=config代码导出配置 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public exportFunction(exportFunctionRequest?: ExportFunctionRequest): Promise { + const options = ParamCreater().exportFunction(exportFunctionRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 导入函数。 + * @summary 导入函数。 + * @param {ImportFunctionRequestBody} importFunctionRequestBody 导入函数的请求body体。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public importFunction(importFunctionRequest?: ImportFunctionRequest): Promise { + const options = ParamCreater().importFunction(importFunctionRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 同步调用指的是客户端请求需要明确等到响应结果,也就是说这样的请求必须得调用到用户的函数,并且等到调用完成才返回。 + * @summary 同步执行函数。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 + * @param {{ [key: string]: object; }} invokeFunctionRequestBody + * @param {string} [xCffLogType] 取值为:tail(返回函数执行后的4K日志),或者为空(不返回日志)。 + * @param {string} [xCFFRequestVersion] 返回体格式,取值v0,v1。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public invokeFunction(invokeFunctionRequest?: InvokeFunctionRequest): Promise { + const options = ParamCreater().invokeFunction(invokeFunctionRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取依赖包列表。 + * @summary 获取依赖包列表 + * @param {'public' | 'private' | 'all'} [dependencyType] 依赖包类型public:公开,private:私有,all:全部。缺省时查询全量。 + * @param {'Java 8' | 'Node.js 6.10' | 'Node.js 8.10' | 'Node.js 10.16' | 'Node.js 12.13' | 'Python 2.7' | 'Python 3.6' | 'Go 1.8' | 'C#(.NET Core 2.0)' | 'C#(.NET Core 2.1)' | 'C#(.NET Core 3.1)' | 'PHP 7.3'} [runtime] 运行时语言 + * @param {string} [name] 依赖包名称。 + * @param {string} [marker] 上一次查询依赖包的最后记录位置,默认为\"0\"。 + * @param {string} [limit] 本次查询可获取的依赖包的最大数目,默认为\"400\"。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listDependencies(listDependenciesRequest?: ListDependenciesRequest): Promise { + const options = ParamCreater().listDependencies(listDependenciesRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取指定函数的测试事件列表。 + * @summary 获取测试事件列表 + * @param {string} functionUrn 函数的URN(Uniform Resource Name),唯一标识函数。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listEvents(listEventsRequest?: ListEventsRequest): Promise { + const options = ParamCreater().listEvents(listEventsRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取函数异步配置列表。 + * @summary 获取函数异步配置列表 + * @param {string} functionUrn 函数的URN(Uniform Resource Name),唯一标识函数。 + * @param {string} [marker] 上一次查询到的最后的记录位置。 + * @param {string} [limit] 每页显示的条目数量。 - 如果不提供该值或者提供的值等于0,则使用默认值:10,最大值100,大于100取值100。 - 如果该值小于0,则返回参数错误。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listFunctionAsyncInvokeConfig(listFunctionAsyncInvokeConfigRequest?: ListFunctionAsyncInvokeConfigRequest): Promise { + const options = ParamCreater().listFunctionAsyncInvokeConfig(listFunctionAsyncInvokeConfigRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取指定时间段的函数运行指标。 + * @summary 获取指定时间段的函数运行指标 + * @param {string} funcUrn 函数的URN(Uniform Resource Name),唯一标识函数。 + * @param {string} period 获取最近多少分钟内函数执行的指标。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listFunctionStatistics(listFunctionStatisticsRequest?: ListFunctionStatisticsRequest): Promise { + const options = ParamCreater().listFunctionStatistics(listFunctionStatisticsRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取指定函数的版本列表。 + * @summary 获取指定函数的版本列表。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 + * @param {string} [marker] 上一次查询到的最后的记录位置。 + * @param {string} [maxitems] 每次查询获取的最大函数记录数量。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listFunctionVersions(listFunctionVersionsRequest?: ListFunctionVersionsRequest): Promise { + const options = ParamCreater().listFunctionVersions(listFunctionVersionsRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取函数列表 + * @summary 获取函数列表 + * @param {string} [marker] 上一次查询到的最后的记录位置。 + * @param {string} [maxitems] 每次查询获取的最大函数记录数量 最大值:400 如果不提供该值或者提供的值大于400或等于0,则使用默认值:400 如果该值小于0,则返回参数错误。 + * @param {string} [packageName] 应用名称。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listFunctions(listFunctionsRequest?: ListFunctionsRequest): Promise { + const options = ParamCreater().listFunctions(listFunctionsRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 查询租户配额 + * @summary 查询租户配额 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listQuotas(): Promise { + const options = ParamCreater().listQuotas(); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 租户函数统计信息。 返回三类的统计信息,函数格式和大小使用情况包括配额和使用量,流量报告。 通过查询参数filter可以进行过滤,查询参数period可以指定返回的时间段。 + * @summary 租户函数统计信息 + * @param {'monitor_data' | 'monthly_report'} filter 参数过滤器。 + * @param {string} [period] 时间段单位为分钟,与filter参数配合使用。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listStatistics(listStatisticsRequest?: ListStatisticsRequest): Promise { + const options = ParamCreater().listStatistics(listStatisticsRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取函数版本别名列表。 + * @summary 获取指定函数所有版本别名列表。 + * @param {string} functionUrn 函数的URN。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listVersionAliases(listVersionAliasesRequest?: ListVersionAliasesRequest): Promise> { + const options = ParamCreater().listVersionAliases(listVersionAliasesRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取指定依赖包。 + * @summary 获取指定依赖包 + * @param {string} dependId 依赖包的ID。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showDependency(showDependencyRequest?: ShowDependencyRequest): Promise { + const options = ParamCreater().showDependency(showDependencyRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取测试事件详细信息。 + * @summary 获取测试事件详细信息 + * @param {string} eventId 事件ID。 + * @param {string} functionUrn 函数的URN(Uniform Resource Name),唯一标识函数。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showEvent(showEventRequest?: ShowEventRequest): Promise { + const options = ParamCreater().showEvent(showEventRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取函数异步配置信息。 + * @summary 获取函数异步配置信息。 + * @param {string} functionUrn 函数的URN(Uniform Resource Name),唯一标识函数。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showFunctionAsyncInvokeConfig(showFunctionAsyncInvokeConfigRequest?: ShowFunctionAsyncInvokeConfigRequest): Promise { + const options = ParamCreater().showFunctionAsyncInvokeConfig(showFunctionAsyncInvokeConfigRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取指定函数的代码。 + * @summary 获取指定函数代码。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showFunctionCode(showFunctionCodeRequest?: ShowFunctionCodeRequest): Promise { + const options = ParamCreater().showFunctionCode(showFunctionCodeRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取指定函数的metadata。 + * @summary 获取函数的metadata。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showFunctionConfig(showFunctionConfigRequest?: ShowFunctionConfigRequest): Promise { + const options = ParamCreater().showFunctionConfig(showFunctionConfigRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取指定函数的lts日志组日志流配置。 + * @summary 获取指定函数的lts日志组日志流配置。 + * @param {string} functionUrn 函数的URN(Uniform Resource Name),唯一标识函数。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showLtsLogDetails(showLtsLogDetailsRequest?: ShowLtsLogDetailsRequest): Promise { + const options = ParamCreater().showLtsLogDetails(showLtsLogDetailsRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取函数指定的版本别名信息。 + * @summary 获取函数版本的指定别名信息。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 + * @param {string} aliasName 要查询的别名名称。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showVersionAlias(showVersionAliasRequest?: ShowVersionAliasRequest): Promise { + const options = ParamCreater().showVersionAlias(showVersionAliasRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 更新依赖包指定依赖包。 + * @summary 更新依赖包指定依赖包 + * @param {string} dependId 依赖包的ID。 + * @param {UpdateDependencyRequestBody} updateDependencyRequestBody 更新依赖包的请求体。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public updateDependency(updateDependencyRequest?: UpdateDependencyRequest): Promise { + const options = ParamCreater().updateDependency(updateDependencyRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 更新测试事件。 + * @summary 更新测试事件 + * @param {string} eventId 事件ID。 + * @param {string} functionUrn 函数的URN(Uniform Resource Name),唯一标识函数。 + * @param {UpdateEventRequestBody} updateEventRequestBody 更新测试事件的请求体。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public updateEvent(updateEventRequest?: UpdateEventRequest): Promise { + const options = ParamCreater().updateEvent(updateEventRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 设置函数异步配置信息。 + * @summary 设置函数异步配置信息。 + * @param {string} functionUrn 函数的URN(Uniform Resource Name),唯一标识函数。 + * @param {UpdateFunctionAsyncInvokeConfigRequestBody} updateFunctionAsyncInvokeConfigRequestBody 设置函数异步配置请求体。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public updateFunctionAsyncInvokeConfig(updateFunctionAsyncInvokeConfigRequest?: UpdateFunctionAsyncInvokeConfigRequest): Promise { + const options = ParamCreater().updateFunctionAsyncInvokeConfig(updateFunctionAsyncInvokeConfigRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 修改指定的函数的代码。 + * @summary 修改函数代码。 + * @param {string} functionUrn 函数的URN,详细解释见表1 FunctionGraph函数字段说明表的描述。 + * @param {UpdateFunctionCodeRequestBody} updateFunctionCodeRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public updateFunctionCode(updateFunctionCodeRequest?: UpdateFunctionCodeRequest): Promise { + const options = ParamCreater().updateFunctionCode(updateFunctionCodeRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 修改指定的函数的metadata信息。 + * @summary 修改函数的metadata信息。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型。 + * @param {UpdateFunctionConfigRequestBody} updateFunctionConfigRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public updateFunctionConfig(updateFunctionConfigRequest?: UpdateFunctionConfigRequest): Promise { + const options = ParamCreater().updateFunctionConfig(updateFunctionConfigRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 为函数绑定预留实例 + * @summary 更新函数预留实例个数 + * @param {string} functionUrn 函数的URN(Uniform Resource Name),唯一标识函数。 + * @param {UpdateFunctionReservedInstancesRequestBody} updateFunctionReservedInstancesRequestBody 更新函数预留实例请求体 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public updateFunctionReservedInstances(updateFunctionReservedInstancesRequest?: UpdateFunctionReservedInstancesRequest): Promise { + const options = ParamCreater().updateFunctionReservedInstances(updateFunctionReservedInstancesRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 修改函数版本别名信息。 + * @summary 修改函数版本别名信息。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 + * @param {string} aliasName 要更新的别名名称。 + * @param {UpdateVersionAliasRequestBody} updateVersionAliasRequestBody 创建函数请求body体。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public updateVersionAlias(updateVersionAliasRequest?: UpdateVersionAliasRequest): Promise { + const options = ParamCreater().updateVersionAlias(updateVersionAliasRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 删除指定函数所有触发器设置。 在提供函数版本且非latest的情况下,删除对应函数版本的触发器。 在提供函数别名的情况下,删除对应函数别名的触发器。 在不提供函数版本(也不提供别名)或版本为latest的情况下,删除该函数所有的触发器(包括所有版本和别名)。 + * @summary 删除指定函数的所有触发器。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public batchDeleteFunctionTriggers(batchDeleteFunctionTriggersRequest?: BatchDeleteFunctionTriggersRequest): Promise { + const options = ParamCreater().batchDeleteFunctionTriggers(batchDeleteFunctionTriggersRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 创建触发器。 - 可以创建的触发器类型包括TIMER、APIG、CTS、DDS、DMS、DIS、LTS、OBS、SMN、KAFKA。 - DDS和KAFKA触发器创建时默认为DISABLED状态,其他触发器默认为ACTIVE状态。 - TIMER、DDS、DMS、KAFKA、LTS触发器支持禁用,其他触发器不支持。 + * @summary 创建触发器。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 + * @param {CreateFunctionTriggerRequestBody} createFunctionTriggerRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createFunctionTrigger(createFunctionTriggerRequest?: CreateFunctionTriggerRequest): Promise { + const options = ParamCreater().createFunctionTrigger(createFunctionTriggerRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 删除触发器。 + * @summary 删除触发器。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 + * @param {'TIMER' | 'APIG' | 'CTS' | 'DDS' | 'DMS' | 'DIS' | 'LTS' | 'OBS' | 'SMN' | 'KAFKA'} triggerTypeCode 触发器类型代码。 + * @param {string} triggerId 触发器编码。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public deleteFunctionTrigger(deleteFunctionTriggerRequest?: DeleteFunctionTriggerRequest): Promise { + const options = ParamCreater().deleteFunctionTrigger(deleteFunctionTriggerRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取指定函数的所有触发器设置。 + * @summary 获取指定函数的所有触发器。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listFunctionTriggers(listFunctionTriggersRequest?: ListFunctionTriggersRequest): Promise> { + const options = ParamCreater().listFunctionTriggers(listFunctionTriggersRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 获取特定触发器的信息。 + * @summary 获取指定触发器的信息。 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 + * @param {'TIMER' | 'APIG' | 'CTS' | 'DDS' | 'DMS' | 'DIS' | 'LTS' | 'OBS' | 'SMN' | 'KAFKA'} triggerTypeCode + * @param {string} triggerId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showFunctionTrigger(showFunctionTriggerRequest?: ShowFunctionTriggerRequest): Promise { + const options = ParamCreater().showFunctionTrigger(showFunctionTriggerRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } + /** + * 更新触发器 + * @summary 更新触发器 + * @param {string} functionUrn 函数的URN,详细解释见FunctionGraph函数模型的描述。 + * @param {'TIMER' | 'APIG' | 'CTS' | 'DDS' | 'DMS' | 'DIS' | 'LTS' | 'OBS' | 'SMN' | 'KAFKA'} triggerTypeCode 触发器类型代码。 + * @param {string} triggerId 触发器编码。 + * @param {UpdateTriggerRequestBody} updateTriggerRequestBody 更新触发器的请求body体。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public updateTrigger(updateTriggerRequest?: UpdateTriggerRequest): Promise { + const options = ParamCreater().updateTrigger(updateTriggerRequest); + options['responseHeaders'] = ['']; + // @ts-ignore + return this.hcClient.sendRequest(options); + } +} + +export const ParamCreater = function () { + return { + + /** + * 异步执行函数。 + */ + asyncInvokeFunction(asyncInvokeFunctionRequest?: AsyncInvokeFunctionRequest) { + const options = { + method: "POST", + url: "/v2/{project_id}/fgs/functions/{function_urn}/invocations-async", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + let functionUrn; + + if (asyncInvokeFunctionRequest !== null && asyncInvokeFunctionRequest !== undefined) { + if (asyncInvokeFunctionRequest instanceof AsyncInvokeFunctionRequest) { + functionUrn = asyncInvokeFunctionRequest.functionUrn; + body = asyncInvokeFunctionRequest.body + } else { + functionUrn = asyncInvokeFunctionRequest['function_urn']; + body = asyncInvokeFunctionRequest['body']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling asyncInvokeFunction.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 函数异步执行并返回预留实例ID用于场景指客户端请求执行比较费时任务,不需要同步等待执行完成返回结果,该方法提前返回任务执行对应的预留实例ID, 如果预留实例有异常, 可以通过该实例ID把对应实例删除(该接口主要针对白名单用户)。 + */ + asyncInvokeReservedFunction(asyncInvokeReservedFunctionRequest?: AsyncInvokeReservedFunctionRequest) { + const options = { + method: "POST", + url: "/v2/{project_id}/fgs/functions/{function_urn}/reserved-invocations", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + let functionUrn; + + if (asyncInvokeReservedFunctionRequest !== null && asyncInvokeReservedFunctionRequest !== undefined) { + if (asyncInvokeReservedFunctionRequest instanceof AsyncInvokeReservedFunctionRequest) { + functionUrn = asyncInvokeReservedFunctionRequest.functionUrn; + body = asyncInvokeReservedFunctionRequest.body + } else { + functionUrn = asyncInvokeReservedFunctionRequest['function_urn']; + body = asyncInvokeReservedFunctionRequest['body']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling asyncInvokeReservedFunction.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 创建依赖包。 + */ + createDependency(createDependencyRequest?: CreateDependencyRequest) { + const options = { + method: "POST", + url: "/v2/{project_id}/fgs/dependencies", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + + if (createDependencyRequest !== null && createDependencyRequest !== undefined) { + if (createDependencyRequest instanceof CreateDependencyRequest) { + body = createDependencyRequest.body + } else { + body = createDependencyRequest['body']; + } + } + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 创建测试事件。 + */ + createEvent(createEventRequest?: CreateEventRequest) { + const options = { + method: "POST", + url: "/v2/{project_id}/fgs/functions/{function_urn}/events", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + let functionUrn; + + if (createEventRequest !== null && createEventRequest !== undefined) { + if (createEventRequest instanceof CreateEventRequest) { + functionUrn = createEventRequest.functionUrn; + body = createEventRequest.body + } else { + functionUrn = createEventRequest['function_urn']; + body = createEventRequest['body']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling createEvent.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 创建指定的函数。 + */ + createFunction(createFunctionRequest?: CreateFunctionRequest) { + const options = { + method: "POST", + url: "/v2/{project_id}/fgs/functions", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + + if (createFunctionRequest !== null && createFunctionRequest !== undefined) { + if (createFunctionRequest instanceof CreateFunctionRequest) { + body = createFunctionRequest.body + } else { + body = createFunctionRequest['body']; + } + } + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 发布函数版本。 + */ + createFunctionVersion(createFunctionVersionRequest?: CreateFunctionVersionRequest) { + const options = { + method: "POST", + url: "/v2/{project_id}/fgs/functions/{function_urn}/versions", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + let functionUrn; + + if (createFunctionVersionRequest !== null && createFunctionVersionRequest !== undefined) { + if (createFunctionVersionRequest instanceof CreateFunctionVersionRequest) { + functionUrn = createFunctionVersionRequest.functionUrn; + body = createFunctionVersionRequest.body + } else { + functionUrn = createFunctionVersionRequest['function_urn']; + body = createFunctionVersionRequest['body']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling createFunctionVersion.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 创建函数灰度版本别名。 + */ + createVersionAlias(createVersionAliasRequest?: CreateVersionAliasRequest) { + const options = { + method: "POST", + url: "/v2/{project_id}/fgs/functions/{function_urn}/aliases", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + let functionUrn; + + if (createVersionAliasRequest !== null && createVersionAliasRequest !== undefined) { + if (createVersionAliasRequest instanceof CreateVersionAliasRequest) { + functionUrn = createVersionAliasRequest.functionUrn; + body = createVersionAliasRequest.body + } else { + functionUrn = createVersionAliasRequest['function_urn']; + body = createVersionAliasRequest['body']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling createVersionAlias.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 删除指定的依赖包。 + */ + deleteDependency(deleteDependencyRequest?: DeleteDependencyRequest) { + const options = { + method: "DELETE", + url: "/v2/{project_id}/fgs/dependencies/{depend_id}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let dependId; + + if (deleteDependencyRequest !== null && deleteDependencyRequest !== undefined) { + if (deleteDependencyRequest instanceof DeleteDependencyRequest) { + dependId = deleteDependencyRequest.dependId; + } else { + dependId = deleteDependencyRequest['depend_id']; + } + } + + if (dependId === null || dependId === undefined) { + throw new RequiredError('dependId','Required parameter dependId was null or undefined when calling deleteDependency.'); + } + + options.pathParams = { 'depend_id': dependId, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 删除测试事件。 + */ + deleteEvent(deleteEventRequest?: DeleteEventRequest) { + const options = { + method: "DELETE", + url: "/v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let eventId; + let functionUrn; + + if (deleteEventRequest !== null && deleteEventRequest !== undefined) { + if (deleteEventRequest instanceof DeleteEventRequest) { + eventId = deleteEventRequest.eventId; + functionUrn = deleteEventRequest.functionUrn; + } else { + eventId = deleteEventRequest['event_id']; + functionUrn = deleteEventRequest['function_urn']; + } + } + + if (eventId === null || eventId === undefined) { + throw new RequiredError('eventId','Required parameter eventId was null or undefined when calling deleteEvent.'); + } + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling deleteEvent.'); + } + + options.pathParams = { 'event_id': eventId,'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 删除指定的函数或者特定的版本(不允许删除latest版本)。 如果URN中包含函数版本或者别名,则删除特定的函数版本或者别名指向的版本以及该版本关联的trigger。 如果URN中不包含版本或者别名,则删除整个函数,包含所有版本以及别名,触发器。 + */ + deleteFunction(deleteFunctionRequest?: DeleteFunctionRequest) { + const options = { + method: "DELETE", + url: "/v2/{project_id}/fgs/functions/{function_urn}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let functionUrn; + + if (deleteFunctionRequest !== null && deleteFunctionRequest !== undefined) { + if (deleteFunctionRequest instanceof DeleteFunctionRequest) { + functionUrn = deleteFunctionRequest.functionUrn; + } else { + functionUrn = deleteFunctionRequest['function_urn']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling deleteFunction.'); + } + + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 删除函数异步配置信息。 + */ + deleteFunctionAsyncInvokeConfig(deleteFunctionAsyncInvokeConfigRequest?: DeleteFunctionAsyncInvokeConfigRequest) { + const options = { + method: "DELETE", + url: "/v2/{project_id}/fgs/functions/{function_urn}/async-invoke-config", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let functionUrn; + + if (deleteFunctionAsyncInvokeConfigRequest !== null && deleteFunctionAsyncInvokeConfigRequest !== undefined) { + if (deleteFunctionAsyncInvokeConfigRequest instanceof DeleteFunctionAsyncInvokeConfigRequest) { + functionUrn = deleteFunctionAsyncInvokeConfigRequest.functionUrn; + } else { + functionUrn = deleteFunctionAsyncInvokeConfigRequest['function_urn']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling deleteFunctionAsyncInvokeConfig.'); + } + + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 预留实例异常时,可以根据预留实例ID删除该预留实例,注意:删除成功之后重新会重新拉起一个新的预留实例,业务高峰期可以更好的工作(该接口主要针对白名单用户) + */ + deleteReservedInstanceById(deleteReservedInstanceByIdRequest?: DeleteReservedInstanceByIdRequest) { + const options = { + method: "DELETE", + url: "/v2/{project_id}/fgs/functions/{function_urn}/reservedinstances/{instance_id}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let functionUrn; + let instanceId; + + if (deleteReservedInstanceByIdRequest !== null && deleteReservedInstanceByIdRequest !== undefined) { + if (deleteReservedInstanceByIdRequest instanceof DeleteReservedInstanceByIdRequest) { + functionUrn = deleteReservedInstanceByIdRequest.functionUrn; + instanceId = deleteReservedInstanceByIdRequest.instanceId; + } else { + functionUrn = deleteReservedInstanceByIdRequest['function_urn']; + instanceId = deleteReservedInstanceByIdRequest['instance_id']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling deleteReservedInstanceById.'); + } + if (instanceId === null || instanceId === undefined) { + throw new RequiredError('instanceId','Required parameter instanceId was null or undefined when calling deleteReservedInstanceById.'); + } + + options.pathParams = { 'function_urn': functionUrn,'instance_id': instanceId, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 删除函数版本别名。 + */ + deleteVersionAlias(deleteVersionAliasRequest?: DeleteVersionAliasRequest) { + const options = { + method: "DELETE", + url: "/v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let functionUrn; + let aliasName; + + if (deleteVersionAliasRequest !== null && deleteVersionAliasRequest !== undefined) { + if (deleteVersionAliasRequest instanceof DeleteVersionAliasRequest) { + functionUrn = deleteVersionAliasRequest.functionUrn; + aliasName = deleteVersionAliasRequest.aliasName; + } else { + functionUrn = deleteVersionAliasRequest['function_urn']; + aliasName = deleteVersionAliasRequest['alias_name']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling deleteVersionAlias.'); + } + if (aliasName === null || aliasName === undefined) { + throw new RequiredError('aliasName','Required parameter aliasName was null or undefined when calling deleteVersionAlias.'); + } + + options.pathParams = { 'function_urn': functionUrn,'alias_name': aliasName, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 开通lts日志上报功能。 + */ + enableLtsLogs() { + const options = { + method: "POST", + url: "/v2/{project_id}/fgs/functions/enable-lts-logs", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 导出函数。 + */ + exportFunction(exportFunctionRequest?: ExportFunctionRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/functions/{function_urn}/export", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + let functionUrn; + let config; + let code; + let type; + + if (exportFunctionRequest !== null && exportFunctionRequest !== undefined) { + if (exportFunctionRequest instanceof ExportFunctionRequest) { + functionUrn = exportFunctionRequest.functionUrn; + config = exportFunctionRequest.config; + code = exportFunctionRequest.code; + type = exportFunctionRequest.type; + } else { + functionUrn = exportFunctionRequest['function_urn']; + config = exportFunctionRequest['config']; + code = exportFunctionRequest['code']; + type = exportFunctionRequest['type']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling exportFunction.'); + } + if (config !== null && config !== undefined) { + localVarQueryParameter['config'] = config; + } + if (code !== null && code !== undefined) { + localVarQueryParameter['code'] = code; + } + if (type !== null && type !== undefined) { + localVarQueryParameter['type'] = type; + } + + options.queryParams = localVarQueryParameter; + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 导入函数。 + */ + importFunction(importFunctionRequest?: ImportFunctionRequest) { + const options = { + method: "POST", + url: "/v2/{project_id}/fgs/functions/import", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + + if (importFunctionRequest !== null && importFunctionRequest !== undefined) { + if (importFunctionRequest instanceof ImportFunctionRequest) { + body = importFunctionRequest.body + } else { + body = importFunctionRequest['body']; + } + } + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 同步调用指的是客户端请求需要明确等到响应结果,也就是说这样的请求必须得调用到用户的函数,并且等到调用完成才返回。 + */ + invokeFunction(invokeFunctionRequest?: InvokeFunctionRequest) { + const options = { + method: "POST", + url: "/v2/{project_id}/fgs/functions/{function_urn}/invocations", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + let functionUrn; + let xCffLogType; + let xCFFRequestVersion; + + if (invokeFunctionRequest !== null && invokeFunctionRequest !== undefined) { + if (invokeFunctionRequest instanceof InvokeFunctionRequest) { + functionUrn = invokeFunctionRequest.functionUrn; + body = invokeFunctionRequest.body + xCffLogType = invokeFunctionRequest.xCffLogType; + xCFFRequestVersion = invokeFunctionRequest.xCFFRequestVersion; + } else { + functionUrn = invokeFunctionRequest['function_urn']; + body = invokeFunctionRequest['body']; + xCffLogType = invokeFunctionRequest['X-Cff-Log-Type']; + xCFFRequestVersion = invokeFunctionRequest['X-CFF-Request-Version']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling invokeFunction.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + if (xCffLogType !== undefined && xCffLogType !== null) { + localVarHeaderParameter['X-Cff-Log-Type'] = String(xCffLogType); + } + if (xCFFRequestVersion !== undefined && xCFFRequestVersion !== null) { + localVarHeaderParameter['X-CFF-Request-Version'] = String(xCFFRequestVersion); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取依赖包列表。 + */ + listDependencies(listDependenciesRequest?: ListDependenciesRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/dependencies", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + let dependencyType; + let runtime; + let name; + let marker; + let limit; + + if (listDependenciesRequest !== null && listDependenciesRequest !== undefined) { + if (listDependenciesRequest instanceof ListDependenciesRequest) { + dependencyType = listDependenciesRequest.dependencyType; + runtime = listDependenciesRequest.runtime; + name = listDependenciesRequest.name; + marker = listDependenciesRequest.marker; + limit = listDependenciesRequest.limit; + } else { + dependencyType = listDependenciesRequest['dependency_type']; + runtime = listDependenciesRequest['runtime']; + name = listDependenciesRequest['name']; + marker = listDependenciesRequest['marker']; + limit = listDependenciesRequest['limit']; + } + } + + if (dependencyType !== null && dependencyType !== undefined) { + localVarQueryParameter['dependency_type'] = dependencyType; + } + if (runtime !== null && runtime !== undefined) { + localVarQueryParameter['runtime'] = runtime; + } + if (name !== null && name !== undefined) { + localVarQueryParameter['name'] = name; + } + if (marker !== null && marker !== undefined) { + localVarQueryParameter['marker'] = marker; + } + if (limit !== null && limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + options.queryParams = localVarQueryParameter; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取指定函数的测试事件列表。 + */ + listEvents(listEventsRequest?: ListEventsRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/functions/{function_urn}/events", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let functionUrn; + + if (listEventsRequest !== null && listEventsRequest !== undefined) { + if (listEventsRequest instanceof ListEventsRequest) { + functionUrn = listEventsRequest.functionUrn; + } else { + functionUrn = listEventsRequest['function_urn']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling listEvents.'); + } + + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取函数异步配置列表。 + */ + listFunctionAsyncInvokeConfig(listFunctionAsyncInvokeConfigRequest?: ListFunctionAsyncInvokeConfigRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/functions/{function_urn}/async-invoke-configs", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + let functionUrn; + let marker; + let limit; + + if (listFunctionAsyncInvokeConfigRequest !== null && listFunctionAsyncInvokeConfigRequest !== undefined) { + if (listFunctionAsyncInvokeConfigRequest instanceof ListFunctionAsyncInvokeConfigRequest) { + functionUrn = listFunctionAsyncInvokeConfigRequest.functionUrn; + marker = listFunctionAsyncInvokeConfigRequest.marker; + limit = listFunctionAsyncInvokeConfigRequest.limit; + } else { + functionUrn = listFunctionAsyncInvokeConfigRequest['function_urn']; + marker = listFunctionAsyncInvokeConfigRequest['marker']; + limit = listFunctionAsyncInvokeConfigRequest['limit']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling listFunctionAsyncInvokeConfig.'); + } + if (marker !== null && marker !== undefined) { + localVarQueryParameter['marker'] = marker; + } + if (limit !== null && limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + options.queryParams = localVarQueryParameter; + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取指定时间段的函数运行指标。 + */ + listFunctionStatistics(listFunctionStatisticsRequest?: ListFunctionStatisticsRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/functions/{func_urn}/statistics/{period}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let funcUrn; + let period; + + if (listFunctionStatisticsRequest !== null && listFunctionStatisticsRequest !== undefined) { + if (listFunctionStatisticsRequest instanceof ListFunctionStatisticsRequest) { + funcUrn = listFunctionStatisticsRequest.funcUrn; + period = listFunctionStatisticsRequest.period; + } else { + funcUrn = listFunctionStatisticsRequest['func_urn']; + period = listFunctionStatisticsRequest['period']; + } + } + + if (funcUrn === null || funcUrn === undefined) { + throw new RequiredError('funcUrn','Required parameter funcUrn was null or undefined when calling listFunctionStatistics.'); + } + if (period === null || period === undefined) { + throw new RequiredError('period','Required parameter period was null or undefined when calling listFunctionStatistics.'); + } + + options.pathParams = { 'func_urn': funcUrn,'period': period, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取指定函数的版本列表。 + */ + listFunctionVersions(listFunctionVersionsRequest?: ListFunctionVersionsRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/functions/{function_urn}/versions", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + let functionUrn; + let marker; + let maxitems; + + if (listFunctionVersionsRequest !== null && listFunctionVersionsRequest !== undefined) { + if (listFunctionVersionsRequest instanceof ListFunctionVersionsRequest) { + functionUrn = listFunctionVersionsRequest.functionUrn; + marker = listFunctionVersionsRequest.marker; + maxitems = listFunctionVersionsRequest.maxitems; + } else { + functionUrn = listFunctionVersionsRequest['function_urn']; + marker = listFunctionVersionsRequest['marker']; + maxitems = listFunctionVersionsRequest['maxitems']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling listFunctionVersions.'); + } + if (marker !== null && marker !== undefined) { + localVarQueryParameter['marker'] = marker; + } + if (maxitems !== null && maxitems !== undefined) { + localVarQueryParameter['maxitems'] = maxitems; + } + + options.queryParams = localVarQueryParameter; + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取函数列表 + */ + listFunctions(listFunctionsRequest?: ListFunctionsRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/functions", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + let marker; + let maxitems; + let packageName; + + if (listFunctionsRequest !== null && listFunctionsRequest !== undefined) { + if (listFunctionsRequest instanceof ListFunctionsRequest) { + marker = listFunctionsRequest.marker; + maxitems = listFunctionsRequest.maxitems; + packageName = listFunctionsRequest.packageName; + } else { + marker = listFunctionsRequest['marker']; + maxitems = listFunctionsRequest['maxitems']; + packageName = listFunctionsRequest['package_name']; + } + } + + if (marker !== null && marker !== undefined) { + localVarQueryParameter['marker'] = marker; + } + if (maxitems !== null && maxitems !== undefined) { + localVarQueryParameter['maxitems'] = maxitems; + } + if (packageName !== null && packageName !== undefined) { + localVarQueryParameter['package_name'] = packageName; + } + + options.queryParams = localVarQueryParameter; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 查询租户配额 + */ + listQuotas() { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/quotas", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 租户函数统计信息。 返回三类的统计信息,函数格式和大小使用情况包括配额和使用量,流量报告。 通过查询参数filter可以进行过滤,查询参数period可以指定返回的时间段。 + */ + listStatistics(listStatisticsRequest?: ListStatisticsRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/functions/statistics", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + let filter; + let period; + + if (listStatisticsRequest !== null && listStatisticsRequest !== undefined) { + if (listStatisticsRequest instanceof ListStatisticsRequest) { + filter = listStatisticsRequest.filter; + period = listStatisticsRequest.period; + } else { + filter = listStatisticsRequest['filter']; + period = listStatisticsRequest['period']; + } + } + + if (filter === null || filter === undefined) { + throw new RequiredError('filter','Required parameter filter was null or undefined when calling listStatistics.'); + } + if (filter !== null && filter !== undefined) { + localVarQueryParameter['filter'] = filter; + } + if (period !== null && period !== undefined) { + localVarQueryParameter['period'] = period; + } + + options.queryParams = localVarQueryParameter; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取函数版本别名列表。 + */ + listVersionAliases(listVersionAliasesRequest?: ListVersionAliasesRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/functions/{function_urn}/aliases", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let functionUrn; + + if (listVersionAliasesRequest !== null && listVersionAliasesRequest !== undefined) { + if (listVersionAliasesRequest instanceof ListVersionAliasesRequest) { + functionUrn = listVersionAliasesRequest.functionUrn; + } else { + functionUrn = listVersionAliasesRequest['function_urn']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling listVersionAliases.'); + } + + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取指定依赖包。 + */ + showDependency(showDependencyRequest?: ShowDependencyRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/dependencies/{depend_id}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let dependId; + + if (showDependencyRequest !== null && showDependencyRequest !== undefined) { + if (showDependencyRequest instanceof ShowDependencyRequest) { + dependId = showDependencyRequest.dependId; + } else { + dependId = showDependencyRequest['depend_id']; + } + } + + if (dependId === null || dependId === undefined) { + throw new RequiredError('dependId','Required parameter dependId was null or undefined when calling showDependency.'); + } + + options.pathParams = { 'depend_id': dependId, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取测试事件详细信息。 + */ + showEvent(showEventRequest?: ShowEventRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let eventId; + let functionUrn; + + if (showEventRequest !== null && showEventRequest !== undefined) { + if (showEventRequest instanceof ShowEventRequest) { + eventId = showEventRequest.eventId; + functionUrn = showEventRequest.functionUrn; + } else { + eventId = showEventRequest['event_id']; + functionUrn = showEventRequest['function_urn']; + } + } + + if (eventId === null || eventId === undefined) { + throw new RequiredError('eventId','Required parameter eventId was null or undefined when calling showEvent.'); + } + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling showEvent.'); + } + + options.pathParams = { 'event_id': eventId,'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取函数异步配置信息。 + */ + showFunctionAsyncInvokeConfig(showFunctionAsyncInvokeConfigRequest?: ShowFunctionAsyncInvokeConfigRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/functions/{function_urn}/async-invoke-config", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let functionUrn; + + if (showFunctionAsyncInvokeConfigRequest !== null && showFunctionAsyncInvokeConfigRequest !== undefined) { + if (showFunctionAsyncInvokeConfigRequest instanceof ShowFunctionAsyncInvokeConfigRequest) { + functionUrn = showFunctionAsyncInvokeConfigRequest.functionUrn; + } else { + functionUrn = showFunctionAsyncInvokeConfigRequest['function_urn']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling showFunctionAsyncInvokeConfig.'); + } + + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取指定函数的代码。 + */ + showFunctionCode(showFunctionCodeRequest?: ShowFunctionCodeRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/functions/{function_urn}/code", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let functionUrn; + + if (showFunctionCodeRequest !== null && showFunctionCodeRequest !== undefined) { + if (showFunctionCodeRequest instanceof ShowFunctionCodeRequest) { + functionUrn = showFunctionCodeRequest.functionUrn; + } else { + functionUrn = showFunctionCodeRequest['function_urn']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling showFunctionCode.'); + } + + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取指定函数的metadata。 + */ + showFunctionConfig(showFunctionConfigRequest?: ShowFunctionConfigRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/functions/{function_urn}/config", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let functionUrn; + + if (showFunctionConfigRequest !== null && showFunctionConfigRequest !== undefined) { + if (showFunctionConfigRequest instanceof ShowFunctionConfigRequest) { + functionUrn = showFunctionConfigRequest.functionUrn; + } else { + functionUrn = showFunctionConfigRequest['function_urn']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling showFunctionConfig.'); + } + + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取指定函数的lts日志组日志流配置。 + */ + showLtsLogDetails(showLtsLogDetailsRequest?: ShowLtsLogDetailsRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/functions/{function_urn}/lts-log-detail", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let functionUrn; + + if (showLtsLogDetailsRequest !== null && showLtsLogDetailsRequest !== undefined) { + if (showLtsLogDetailsRequest instanceof ShowLtsLogDetailsRequest) { + functionUrn = showLtsLogDetailsRequest.functionUrn; + } else { + functionUrn = showLtsLogDetailsRequest['function_urn']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling showLtsLogDetails.'); + } + + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取函数指定的版本别名信息。 + */ + showVersionAlias(showVersionAliasRequest?: ShowVersionAliasRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let functionUrn; + let aliasName; + + if (showVersionAliasRequest !== null && showVersionAliasRequest !== undefined) { + if (showVersionAliasRequest instanceof ShowVersionAliasRequest) { + functionUrn = showVersionAliasRequest.functionUrn; + aliasName = showVersionAliasRequest.aliasName; + } else { + functionUrn = showVersionAliasRequest['function_urn']; + aliasName = showVersionAliasRequest['alias_name']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling showVersionAlias.'); + } + if (aliasName === null || aliasName === undefined) { + throw new RequiredError('aliasName','Required parameter aliasName was null or undefined when calling showVersionAlias.'); + } + + options.pathParams = { 'function_urn': functionUrn,'alias_name': aliasName, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 更新依赖包指定依赖包。 + */ + updateDependency(updateDependencyRequest?: UpdateDependencyRequest) { + const options = { + method: "PUT", + url: "/v2/{project_id}/fgs/dependencies/{depend_id}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + let dependId; + + if (updateDependencyRequest !== null && updateDependencyRequest !== undefined) { + if (updateDependencyRequest instanceof UpdateDependencyRequest) { + dependId = updateDependencyRequest.dependId; + body = updateDependencyRequest.body + } else { + dependId = updateDependencyRequest['depend_id']; + body = updateDependencyRequest['body']; + } + } + + if (dependId === null || dependId === undefined) { + throw new RequiredError('dependId','Required parameter dependId was null or undefined when calling updateDependency.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'depend_id': dependId, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 更新测试事件。 + */ + updateEvent(updateEventRequest?: UpdateEventRequest) { + const options = { + method: "PUT", + url: "/v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + let eventId; + let functionUrn; + + if (updateEventRequest !== null && updateEventRequest !== undefined) { + if (updateEventRequest instanceof UpdateEventRequest) { + eventId = updateEventRequest.eventId; + functionUrn = updateEventRequest.functionUrn; + body = updateEventRequest.body + } else { + eventId = updateEventRequest['event_id']; + functionUrn = updateEventRequest['function_urn']; + body = updateEventRequest['body']; + } + } + + if (eventId === null || eventId === undefined) { + throw new RequiredError('eventId','Required parameter eventId was null or undefined when calling updateEvent.'); + } + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling updateEvent.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'event_id': eventId,'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 设置函数异步配置信息。 + */ + updateFunctionAsyncInvokeConfig(updateFunctionAsyncInvokeConfigRequest?: UpdateFunctionAsyncInvokeConfigRequest) { + const options = { + method: "PUT", + url: "/v2/{project_id}/fgs/functions/{function_urn}/async-invoke-config", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + let functionUrn; + + if (updateFunctionAsyncInvokeConfigRequest !== null && updateFunctionAsyncInvokeConfigRequest !== undefined) { + if (updateFunctionAsyncInvokeConfigRequest instanceof UpdateFunctionAsyncInvokeConfigRequest) { + functionUrn = updateFunctionAsyncInvokeConfigRequest.functionUrn; + body = updateFunctionAsyncInvokeConfigRequest.body + } else { + functionUrn = updateFunctionAsyncInvokeConfigRequest['function_urn']; + body = updateFunctionAsyncInvokeConfigRequest['body']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling updateFunctionAsyncInvokeConfig.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 修改指定的函数的代码。 + */ + updateFunctionCode(updateFunctionCodeRequest?: UpdateFunctionCodeRequest) { + const options = { + method: "PUT", + url: "/v2/{project_id}/fgs/functions/{function_urn}/code", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + let functionUrn; + + if (updateFunctionCodeRequest !== null && updateFunctionCodeRequest !== undefined) { + if (updateFunctionCodeRequest instanceof UpdateFunctionCodeRequest) { + functionUrn = updateFunctionCodeRequest.functionUrn; + body = updateFunctionCodeRequest.body + } else { + functionUrn = updateFunctionCodeRequest['function_urn']; + body = updateFunctionCodeRequest['body']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling updateFunctionCode.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 修改指定的函数的metadata信息。 + */ + updateFunctionConfig(updateFunctionConfigRequest?: UpdateFunctionConfigRequest) { + const options = { + method: "PUT", + url: "/v2/{project_id}/fgs/functions/{function_urn}/config", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + let functionUrn; + + if (updateFunctionConfigRequest !== null && updateFunctionConfigRequest !== undefined) { + if (updateFunctionConfigRequest instanceof UpdateFunctionConfigRequest) { + functionUrn = updateFunctionConfigRequest.functionUrn; + body = updateFunctionConfigRequest.body + } else { + functionUrn = updateFunctionConfigRequest['function_urn']; + body = updateFunctionConfigRequest['body']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling updateFunctionConfig.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 为函数绑定预留实例 + */ + updateFunctionReservedInstances(updateFunctionReservedInstancesRequest?: UpdateFunctionReservedInstancesRequest) { + const options = { + method: "PUT", + url: "/v2/{project_id}/fgs/functions/{function_urn}/reservedinstances", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + let functionUrn; + + if (updateFunctionReservedInstancesRequest !== null && updateFunctionReservedInstancesRequest !== undefined) { + if (updateFunctionReservedInstancesRequest instanceof UpdateFunctionReservedInstancesRequest) { + functionUrn = updateFunctionReservedInstancesRequest.functionUrn; + body = updateFunctionReservedInstancesRequest.body + } else { + functionUrn = updateFunctionReservedInstancesRequest['function_urn']; + body = updateFunctionReservedInstancesRequest['body']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling updateFunctionReservedInstances.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 修改函数版本别名信息。 + */ + updateVersionAlias(updateVersionAliasRequest?: UpdateVersionAliasRequest) { + const options = { + method: "PUT", + url: "/v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + let functionUrn; + let aliasName; + + if (updateVersionAliasRequest !== null && updateVersionAliasRequest !== undefined) { + if (updateVersionAliasRequest instanceof UpdateVersionAliasRequest) { + functionUrn = updateVersionAliasRequest.functionUrn; + aliasName = updateVersionAliasRequest.aliasName; + body = updateVersionAliasRequest.body + } else { + functionUrn = updateVersionAliasRequest['function_urn']; + aliasName = updateVersionAliasRequest['alias_name']; + body = updateVersionAliasRequest['body']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling updateVersionAlias.'); + } + if (aliasName === null || aliasName === undefined) { + throw new RequiredError('aliasName','Required parameter aliasName was null or undefined when calling updateVersionAlias.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'function_urn': functionUrn,'alias_name': aliasName, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 删除指定函数所有触发器设置。 在提供函数版本且非latest的情况下,删除对应函数版本的触发器。 在提供函数别名的情况下,删除对应函数别名的触发器。 在不提供函数版本(也不提供别名)或版本为latest的情况下,删除该函数所有的触发器(包括所有版本和别名)。 + */ + batchDeleteFunctionTriggers(batchDeleteFunctionTriggersRequest?: BatchDeleteFunctionTriggersRequest) { + const options = { + method: "DELETE", + url: "/v2/{project_id}/fgs/triggers/{function_urn}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let functionUrn; + + if (batchDeleteFunctionTriggersRequest !== null && batchDeleteFunctionTriggersRequest !== undefined) { + if (batchDeleteFunctionTriggersRequest instanceof BatchDeleteFunctionTriggersRequest) { + functionUrn = batchDeleteFunctionTriggersRequest.functionUrn; + } else { + functionUrn = batchDeleteFunctionTriggersRequest['function_urn']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling batchDeleteFunctionTriggers.'); + } + + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 创建触发器。 - 可以创建的触发器类型包括TIMER、APIG、CTS、DDS、DMS、DIS、LTS、OBS、SMN、KAFKA。 - DDS和KAFKA触发器创建时默认为DISABLED状态,其他触发器默认为ACTIVE状态。 - TIMER、DDS、DMS、KAFKA、LTS触发器支持禁用,其他触发器不支持。 + */ + createFunctionTrigger(createFunctionTriggerRequest?: CreateFunctionTriggerRequest) { + const options = { + method: "POST", + url: "/v2/{project_id}/fgs/triggers/{function_urn}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + let functionUrn; + + if (createFunctionTriggerRequest !== null && createFunctionTriggerRequest !== undefined) { + if (createFunctionTriggerRequest instanceof CreateFunctionTriggerRequest) { + functionUrn = createFunctionTriggerRequest.functionUrn; + body = createFunctionTriggerRequest.body + } else { + functionUrn = createFunctionTriggerRequest['function_urn']; + body = createFunctionTriggerRequest['body']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling createFunctionTrigger.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 删除触发器。 + */ + deleteFunctionTrigger(deleteFunctionTriggerRequest?: DeleteFunctionTriggerRequest) { + const options = { + method: "DELETE", + url: "/v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let functionUrn; + let triggerTypeCode; + let triggerId; + + if (deleteFunctionTriggerRequest !== null && deleteFunctionTriggerRequest !== undefined) { + if (deleteFunctionTriggerRequest instanceof DeleteFunctionTriggerRequest) { + functionUrn = deleteFunctionTriggerRequest.functionUrn; + triggerTypeCode = deleteFunctionTriggerRequest.triggerTypeCode; + triggerId = deleteFunctionTriggerRequest.triggerId; + } else { + functionUrn = deleteFunctionTriggerRequest['function_urn']; + triggerTypeCode = deleteFunctionTriggerRequest['trigger_type_code']; + triggerId = deleteFunctionTriggerRequest['trigger_id']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling deleteFunctionTrigger.'); + } + if (triggerTypeCode === null || triggerTypeCode === undefined) { + throw new RequiredError('triggerTypeCode','Required parameter triggerTypeCode was null or undefined when calling deleteFunctionTrigger.'); + } + if (triggerId === null || triggerId === undefined) { + throw new RequiredError('triggerId','Required parameter triggerId was null or undefined when calling deleteFunctionTrigger.'); + } + + options.pathParams = { 'function_urn': functionUrn,'trigger_type_code': triggerTypeCode,'trigger_id': triggerId, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取指定函数的所有触发器设置。 + */ + listFunctionTriggers(listFunctionTriggersRequest?: ListFunctionTriggersRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/triggers/{function_urn}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let functionUrn; + + if (listFunctionTriggersRequest !== null && listFunctionTriggersRequest !== undefined) { + if (listFunctionTriggersRequest instanceof ListFunctionTriggersRequest) { + functionUrn = listFunctionTriggersRequest.functionUrn; + } else { + functionUrn = listFunctionTriggersRequest['function_urn']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling listFunctionTriggers.'); + } + + options.pathParams = { 'function_urn': functionUrn, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取特定触发器的信息。 + */ + showFunctionTrigger(showFunctionTriggerRequest?: ShowFunctionTriggerRequest) { + const options = { + method: "GET", + url: "/v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let functionUrn; + let triggerTypeCode; + let triggerId; + + if (showFunctionTriggerRequest !== null && showFunctionTriggerRequest !== undefined) { + if (showFunctionTriggerRequest instanceof ShowFunctionTriggerRequest) { + functionUrn = showFunctionTriggerRequest.functionUrn; + triggerTypeCode = showFunctionTriggerRequest.triggerTypeCode; + triggerId = showFunctionTriggerRequest.triggerId; + } else { + functionUrn = showFunctionTriggerRequest['function_urn']; + triggerTypeCode = showFunctionTriggerRequest['trigger_type_code']; + triggerId = showFunctionTriggerRequest['trigger_id']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling showFunctionTrigger.'); + } + if (triggerTypeCode === null || triggerTypeCode === undefined) { + throw new RequiredError('triggerTypeCode','Required parameter triggerTypeCode was null or undefined when calling showFunctionTrigger.'); + } + if (triggerId === null || triggerId === undefined) { + throw new RequiredError('triggerId','Required parameter triggerId was null or undefined when calling showFunctionTrigger.'); + } + + options.pathParams = { 'function_urn': functionUrn,'trigger_type_code': triggerTypeCode,'trigger_id': triggerId, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 更新触发器 + */ + updateTrigger(updateTriggerRequest?: UpdateTriggerRequest) { + const options = { + method: "PUT", + url: "/v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + var body: any; + let functionUrn; + let triggerTypeCode; + let triggerId; + + if (updateTriggerRequest !== null && updateTriggerRequest !== undefined) { + if (updateTriggerRequest instanceof UpdateTriggerRequest) { + functionUrn = updateTriggerRequest.functionUrn; + triggerTypeCode = updateTriggerRequest.triggerTypeCode; + triggerId = updateTriggerRequest.triggerId; + body = updateTriggerRequest.body + } else { + functionUrn = updateTriggerRequest['function_urn']; + triggerTypeCode = updateTriggerRequest['trigger_type_code']; + triggerId = updateTriggerRequest['trigger_id']; + body = updateTriggerRequest['body']; + } + } + + if (functionUrn === null || functionUrn === undefined) { + throw new RequiredError('functionUrn','Required parameter functionUrn was null or undefined when calling updateTrigger.'); + } + if (triggerTypeCode === null || triggerTypeCode === undefined) { + throw new RequiredError('triggerTypeCode','Required parameter triggerTypeCode was null or undefined when calling updateTrigger.'); + } + if (triggerId === null || triggerId === undefined) { + throw new RequiredError('triggerId','Required parameter triggerId was null or undefined when calling updateTrigger.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'function_urn': functionUrn,'trigger_type_code': triggerTypeCode,'trigger_id': triggerId, }; + options.headers = localVarHeaderParameter; + return options; + }, + + } +}; + +function newClient(client: HcClient): FunctionGraphClient { + return new FunctionGraphClient(client); +} + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/AsyncInvokeFunctionRequest.ts b/services/functiongraph/v2/model/AsyncInvokeFunctionRequest.ts new file mode 100644 index 000000000..d75422602 --- /dev/null +++ b/services/functiongraph/v2/model/AsyncInvokeFunctionRequest.ts @@ -0,0 +1,23 @@ + + +export class AsyncInvokeFunctionRequest { + private 'function_urn': string | undefined; + public body?: { [key: string]: object; }; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): AsyncInvokeFunctionRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withBody(body: { [key: string]: object; }): AsyncInvokeFunctionRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/AsyncInvokeFunctionResponse.ts b/services/functiongraph/v2/model/AsyncInvokeFunctionResponse.ts new file mode 100644 index 000000000..f8ed772f3 --- /dev/null +++ b/services/functiongraph/v2/model/AsyncInvokeFunctionResponse.ts @@ -0,0 +1,19 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class AsyncInvokeFunctionResponse extends SdkResponse { + private 'request_id'?: string | undefined; + public constructor() { + super(); + } + public withRequestId(requestId: string): AsyncInvokeFunctionResponse { + this['request_id'] = requestId; + return this; + } + public set requestId(requestId: string | undefined) { + this['request_id'] = requestId; + } + public get requestId() { + return this['request_id']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/AsyncInvokeReservedFunctionRequest.ts b/services/functiongraph/v2/model/AsyncInvokeReservedFunctionRequest.ts new file mode 100644 index 000000000..c87fcf655 --- /dev/null +++ b/services/functiongraph/v2/model/AsyncInvokeReservedFunctionRequest.ts @@ -0,0 +1,23 @@ + + +export class AsyncInvokeReservedFunctionRequest { + private 'function_urn': string | undefined; + public body?: { [key: string]: object; }; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): AsyncInvokeReservedFunctionRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withBody(body: { [key: string]: object; }): AsyncInvokeReservedFunctionRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/AsyncInvokeReservedFunctionResponse.ts b/services/functiongraph/v2/model/AsyncInvokeReservedFunctionResponse.ts new file mode 100644 index 000000000..b83d81e68 --- /dev/null +++ b/services/functiongraph/v2/model/AsyncInvokeReservedFunctionResponse.ts @@ -0,0 +1,19 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class AsyncInvokeReservedFunctionResponse extends SdkResponse { + private 'instance_id'?: string | undefined; + public constructor() { + super(); + } + public withInstanceId(instanceId: string): AsyncInvokeReservedFunctionResponse { + this['instance_id'] = instanceId; + return this; + } + public set instanceId(instanceId: string | undefined) { + this['instance_id'] = instanceId; + } + public get instanceId() { + return this['instance_id']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/BatchDeleteFunctionTriggersRequest.ts b/services/functiongraph/v2/model/BatchDeleteFunctionTriggersRequest.ts new file mode 100644 index 000000000..6c9cb0645 --- /dev/null +++ b/services/functiongraph/v2/model/BatchDeleteFunctionTriggersRequest.ts @@ -0,0 +1,18 @@ + + +export class BatchDeleteFunctionTriggersRequest { + private 'function_urn': string | undefined; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): BatchDeleteFunctionTriggersRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/BatchDeleteFunctionTriggersResponse.ts b/services/functiongraph/v2/model/BatchDeleteFunctionTriggersResponse.ts new file mode 100644 index 000000000..7bce9051b --- /dev/null +++ b/services/functiongraph/v2/model/BatchDeleteFunctionTriggersResponse.ts @@ -0,0 +1,8 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class BatchDeleteFunctionTriggersResponse extends SdkResponse { + public constructor() { + super(); + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/CreateDependencyRequest.ts b/services/functiongraph/v2/model/CreateDependencyRequest.ts new file mode 100644 index 000000000..5266fe77c --- /dev/null +++ b/services/functiongraph/v2/model/CreateDependencyRequest.ts @@ -0,0 +1,12 @@ +import { CreateDependencyRequestBody } from './CreateDependencyRequestBody'; + + +export class CreateDependencyRequest { + public body?: CreateDependencyRequestBody; + public constructor() { + } + public withBody(body: CreateDependencyRequestBody): CreateDependencyRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/CreateDependencyRequestBody.ts b/services/functiongraph/v2/model/CreateDependencyRequestBody.ts new file mode 100644 index 000000000..7c68d6ff8 --- /dev/null +++ b/services/functiongraph/v2/model/CreateDependencyRequestBody.ts @@ -0,0 +1,75 @@ + + +export class CreateDependencyRequestBody { + private 'depend_file'?: string | undefined; + private 'depend_link'?: string | undefined; + private 'depend_type': string | undefined; + public runtime: CreateDependencyRequestBodyRuntimeEnum; + public name?: string; + public description?: string; + public constructor(dependType?: any, runtime?: any) { + this['depend_type'] = dependType; + this['runtime'] = runtime; + } + public withDependFile(dependFile: string): CreateDependencyRequestBody { + this['depend_file'] = dependFile; + return this; + } + public set dependFile(dependFile: string | undefined) { + this['depend_file'] = dependFile; + } + public get dependFile() { + return this['depend_file']; + } + public withDependLink(dependLink: string): CreateDependencyRequestBody { + this['depend_link'] = dependLink; + return this; + } + public set dependLink(dependLink: string | undefined) { + this['depend_link'] = dependLink; + } + public get dependLink() { + return this['depend_link']; + } + public withDependType(dependType: string): CreateDependencyRequestBody { + this['depend_type'] = dependType; + return this; + } + public set dependType(dependType: string | undefined) { + this['depend_type'] = dependType; + } + public get dependType() { + return this['depend_type']; + } + public withRuntime(runtime: CreateDependencyRequestBodyRuntimeEnum): CreateDependencyRequestBody { + this['runtime'] = runtime; + return this; + } + public withName(name: string): CreateDependencyRequestBody { + this['name'] = name; + return this; + } + public withDescription(description: string): CreateDependencyRequestBody { + this['description'] = description; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum CreateDependencyRequestBodyRuntimeEnum { + JAVA8 = 'Java8', + NODE_JS6_10 = 'Node.js6.10', + NODE_JS8_10 = 'Node.js8.10', + NODE_JS10_16 = 'Node.js10.16', + NODE_JS12_13 = 'Node.js12.13', + PYTHON2_7 = 'Python2.7', + PYTHON3_6 = 'Python3.6', + GO1_8 = 'Go1.8', + C__NET_CORE_2_0 = 'C#(.NET Core 2.0)', + C__NET_CORE_2_1 = 'C#(.NET Core 2.1)', + C__NET_CORE_3_1 = 'C#(.NET Core 3.1)', + PHP7_3 = 'PHP7.3' +} diff --git a/services/functiongraph/v2/model/CreateDependencyResponse.ts b/services/functiongraph/v2/model/CreateDependencyResponse.ts new file mode 100644 index 000000000..7ed0fb517 --- /dev/null +++ b/services/functiongraph/v2/model/CreateDependencyResponse.ts @@ -0,0 +1,59 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class CreateDependencyResponse extends SdkResponse { + public id?: string; + public owner?: string; + public link?: string; + public runtime?: string; + public etag?: string; + public size?: number; + public name?: string; + public description?: string; + private 'file_name'?: string | undefined; + public constructor() { + super(); + } + public withId(id: string): CreateDependencyResponse { + this['id'] = id; + return this; + } + public withOwner(owner: string): CreateDependencyResponse { + this['owner'] = owner; + return this; + } + public withLink(link: string): CreateDependencyResponse { + this['link'] = link; + return this; + } + public withRuntime(runtime: string): CreateDependencyResponse { + this['runtime'] = runtime; + return this; + } + public withEtag(etag: string): CreateDependencyResponse { + this['etag'] = etag; + return this; + } + public withSize(size: number): CreateDependencyResponse { + this['size'] = size; + return this; + } + public withName(name: string): CreateDependencyResponse { + this['name'] = name; + return this; + } + public withDescription(description: string): CreateDependencyResponse { + this['description'] = description; + return this; + } + public withFileName(fileName: string): CreateDependencyResponse { + this['file_name'] = fileName; + return this; + } + public set fileName(fileName: string | undefined) { + this['file_name'] = fileName; + } + public get fileName() { + return this['file_name']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/CreateEventRequest.ts b/services/functiongraph/v2/model/CreateEventRequest.ts new file mode 100644 index 000000000..f586c8610 --- /dev/null +++ b/services/functiongraph/v2/model/CreateEventRequest.ts @@ -0,0 +1,24 @@ +import { CreateEventRequestBody } from './CreateEventRequestBody'; + + +export class CreateEventRequest { + private 'function_urn': string | undefined; + public body?: CreateEventRequestBody; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): CreateEventRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withBody(body: CreateEventRequestBody): CreateEventRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/CreateEventRequestBody.ts b/services/functiongraph/v2/model/CreateEventRequestBody.ts new file mode 100644 index 000000000..6c754a8a8 --- /dev/null +++ b/services/functiongraph/v2/model/CreateEventRequestBody.ts @@ -0,0 +1,16 @@ + + +export class CreateEventRequestBody { + public name?: string; + public content?: string; + public constructor() { + } + public withName(name: string): CreateEventRequestBody { + this['name'] = name; + return this; + } + public withContent(content: string): CreateEventRequestBody { + this['content'] = content; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/CreateEventResponse.ts b/services/functiongraph/v2/model/CreateEventResponse.ts new file mode 100644 index 000000000..613e0a488 --- /dev/null +++ b/services/functiongraph/v2/model/CreateEventResponse.ts @@ -0,0 +1,34 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class CreateEventResponse extends SdkResponse { + public id?: string; + public name?: string; + public content?: string; + private 'last_modified'?: number | undefined; + public constructor() { + super(); + } + public withId(id: string): CreateEventResponse { + this['id'] = id; + return this; + } + public withName(name: string): CreateEventResponse { + this['name'] = name; + return this; + } + public withContent(content: string): CreateEventResponse { + this['content'] = content; + return this; + } + public withLastModified(lastModified: number): CreateEventResponse { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: number | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/CreateFunctionRequest.ts b/services/functiongraph/v2/model/CreateFunctionRequest.ts new file mode 100644 index 000000000..7d6778e61 --- /dev/null +++ b/services/functiongraph/v2/model/CreateFunctionRequest.ts @@ -0,0 +1,12 @@ +import { CreateFunctionRequestBody } from './CreateFunctionRequestBody'; + + +export class CreateFunctionRequest { + public body?: CreateFunctionRequestBody; + public constructor() { + } + public withBody(body: CreateFunctionRequestBody): CreateFunctionRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/CreateFunctionRequestBody.ts b/services/functiongraph/v2/model/CreateFunctionRequestBody.ts new file mode 100644 index 000000000..9fb6b8951 --- /dev/null +++ b/services/functiongraph/v2/model/CreateFunctionRequestBody.ts @@ -0,0 +1,212 @@ +import { FuncCode } from './FuncCode'; + + +export class CreateFunctionRequestBody { + private 'func_name': string | undefined; + private 'package': string | undefined; + public runtime: CreateFunctionRequestBodyRuntimeEnum; + public timeout: number; + public handler: string; + private 'memory_size': number | undefined; + private 'code_type': CreateFunctionRequestBodyCodeTypeEnum | undefined; + private 'code_url'?: string | undefined; + private 'code_filename'?: string | undefined; + private 'user_data'?: string | undefined; + public xrole?: string; + private 'app_xrole'?: string | undefined; + public description?: string; + private 'func_code'?: FuncCode | undefined; + private 'initializer_handler'?: string | undefined; + private 'initializer_timeout'?: number | undefined; + private 'enterprise_project_id'?: string | undefined; + public type?: CreateFunctionRequestBodyTypeEnum; + public constructor(funcName?: any, _package?: any, runtime?: any, timeout?: any, handler?: any, memorySize?: any, codeType?: any) { + this['func_name'] = funcName; + this['package'] = _package; + this['runtime'] = runtime; + this['timeout'] = timeout; + this['handler'] = handler; + this['memory_size'] = memorySize; + this['code_type'] = codeType; + } + public withFuncName(funcName: string): CreateFunctionRequestBody { + this['func_name'] = funcName; + return this; + } + public set funcName(funcName: string | undefined) { + this['func_name'] = funcName; + } + public get funcName() { + return this['func_name']; + } + public withPackage(_package: string): CreateFunctionRequestBody { + this['package'] = _package; + return this; + } + public set _package(_package: string | undefined) { + this['package'] = _package; + } + public get _package() { + return this['package']; + } + public withRuntime(runtime: CreateFunctionRequestBodyRuntimeEnum): CreateFunctionRequestBody { + this['runtime'] = runtime; + return this; + } + public withTimeout(timeout: number): CreateFunctionRequestBody { + this['timeout'] = timeout; + return this; + } + public withHandler(handler: string): CreateFunctionRequestBody { + this['handler'] = handler; + return this; + } + public withMemorySize(memorySize: number): CreateFunctionRequestBody { + this['memory_size'] = memorySize; + return this; + } + public set memorySize(memorySize: number | undefined) { + this['memory_size'] = memorySize; + } + public get memorySize() { + return this['memory_size']; + } + public withCodeType(codeType: CreateFunctionRequestBodyCodeTypeEnum): CreateFunctionRequestBody { + this['code_type'] = codeType; + return this; + } + public set codeType(codeType: CreateFunctionRequestBodyCodeTypeEnum | undefined) { + this['code_type'] = codeType; + } + public get codeType() { + return this['code_type']; + } + public withCodeUrl(codeUrl: string): CreateFunctionRequestBody { + this['code_url'] = codeUrl; + return this; + } + public set codeUrl(codeUrl: string | undefined) { + this['code_url'] = codeUrl; + } + public get codeUrl() { + return this['code_url']; + } + public withCodeFilename(codeFilename: string): CreateFunctionRequestBody { + this['code_filename'] = codeFilename; + return this; + } + public set codeFilename(codeFilename: string | undefined) { + this['code_filename'] = codeFilename; + } + public get codeFilename() { + return this['code_filename']; + } + public withUserData(userData: string): CreateFunctionRequestBody { + this['user_data'] = userData; + return this; + } + public set userData(userData: string | undefined) { + this['user_data'] = userData; + } + public get userData() { + return this['user_data']; + } + public withXrole(xrole: string): CreateFunctionRequestBody { + this['xrole'] = xrole; + return this; + } + public withAppXrole(appXrole: string): CreateFunctionRequestBody { + this['app_xrole'] = appXrole; + return this; + } + public set appXrole(appXrole: string | undefined) { + this['app_xrole'] = appXrole; + } + public get appXrole() { + return this['app_xrole']; + } + public withDescription(description: string): CreateFunctionRequestBody { + this['description'] = description; + return this; + } + public withFuncCode(funcCode: FuncCode): CreateFunctionRequestBody { + this['func_code'] = funcCode; + return this; + } + public set funcCode(funcCode: FuncCode | undefined) { + this['func_code'] = funcCode; + } + public get funcCode() { + return this['func_code']; + } + public withInitializerHandler(initializerHandler: string): CreateFunctionRequestBody { + this['initializer_handler'] = initializerHandler; + return this; + } + public set initializerHandler(initializerHandler: string | undefined) { + this['initializer_handler'] = initializerHandler; + } + public get initializerHandler() { + return this['initializer_handler']; + } + public withInitializerTimeout(initializerTimeout: number): CreateFunctionRequestBody { + this['initializer_timeout'] = initializerTimeout; + return this; + } + public set initializerTimeout(initializerTimeout: number | undefined) { + this['initializer_timeout'] = initializerTimeout; + } + public get initializerTimeout() { + return this['initializer_timeout']; + } + public withEnterpriseProjectId(enterpriseProjectId: string): CreateFunctionRequestBody { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId() { + return this['enterprise_project_id']; + } + public withType(type: CreateFunctionRequestBodyTypeEnum): CreateFunctionRequestBody { + this['type'] = type; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum CreateFunctionRequestBodyRuntimeEnum { + PYTHON2_7 = 'Python2.7', + PYTHON3_6 = 'Python3.6', + GO1_8 = 'Go1.8', + JAVA8 = 'Java8', + NODE_JS6_10 = 'Node.js6.10', + NODE_JS8_10 = 'Node.js8.10', + C__NET_CORE_2_0 = 'C#(.NET Core 2.0)', + C__NET_CORE_2_1 = 'C#(.NET Core 2.1)', + C__NET_CORE_3_1 = 'C#(.NET Core 3.1)', + CUSTOM = 'Custom', + PHP7_3 = 'PHP7.3' +} +/** + * @export + * @enum {string} + */ +export enum CreateFunctionRequestBodyCodeTypeEnum { + INLINE = 'inline', + ZIP = 'zip', + OBS = 'obs', + JAR = 'jar' +} +/** + * @export + * @enum {string} + */ +export enum CreateFunctionRequestBodyTypeEnum { + V1 = 'v1', + V2 = 'v2' +} diff --git a/services/functiongraph/v2/model/CreateFunctionResponse.ts b/services/functiongraph/v2/model/CreateFunctionResponse.ts new file mode 100644 index 000000000..6aa9ccc50 --- /dev/null +++ b/services/functiongraph/v2/model/CreateFunctionResponse.ts @@ -0,0 +1,337 @@ +import { FuncVpc } from './FuncVpc'; +import { MountConfig } from './MountConfig'; +import { StrategyConfig } from './StrategyConfig'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class CreateFunctionResponse extends SdkResponse { + private 'func_urn'?: string | undefined; + private 'func_name'?: string | undefined; + private 'domain_id'?: string | undefined; + public namespace?: string; + private 'project_name'?: string | undefined; + private 'package'?: string | undefined; + public runtime?: CreateFunctionResponseRuntimeEnum; + public timeout?: number; + public handler?: string; + private 'memory_size'?: number | undefined; + public cpu?: number; + private 'code_type'?: CreateFunctionResponseCodeTypeEnum | undefined; + private 'code_url'?: string | undefined; + private 'code_filename'?: string | undefined; + private 'code_size'?: number | undefined; + private 'user_data'?: string | undefined; + private 'encrypted_user_data'?: string | undefined; + public digest?: string; + public version?: string; + private 'image_name'?: string | undefined; + public xrole?: string; + private 'app_xrole'?: string | undefined; + public description?: string; + private 'last_modified'?: Date | undefined; + private 'func_vpc'?: FuncVpc | undefined; + private 'mount_config'?: MountConfig | undefined; + private 'depend_list'?: Array | undefined; + private 'strategy_config'?: StrategyConfig | undefined; + private 'extend_config'?: string | undefined; + private 'initializer_handler'?: string | undefined; + private 'initializer_timeout'?: number | undefined; + private 'enterprise_project_id'?: string | undefined; + public constructor() { + super(); + } + public withFuncUrn(funcUrn: string): CreateFunctionResponse { + this['func_urn'] = funcUrn; + return this; + } + public set funcUrn(funcUrn: string | undefined) { + this['func_urn'] = funcUrn; + } + public get funcUrn() { + return this['func_urn']; + } + public withFuncName(funcName: string): CreateFunctionResponse { + this['func_name'] = funcName; + return this; + } + public set funcName(funcName: string | undefined) { + this['func_name'] = funcName; + } + public get funcName() { + return this['func_name']; + } + public withDomainId(domainId: string): CreateFunctionResponse { + this['domain_id'] = domainId; + return this; + } + public set domainId(domainId: string | undefined) { + this['domain_id'] = domainId; + } + public get domainId() { + return this['domain_id']; + } + public withNamespace(namespace: string): CreateFunctionResponse { + this['namespace'] = namespace; + return this; + } + public withProjectName(projectName: string): CreateFunctionResponse { + this['project_name'] = projectName; + return this; + } + public set projectName(projectName: string | undefined) { + this['project_name'] = projectName; + } + public get projectName() { + return this['project_name']; + } + public withPackage(_package: string): CreateFunctionResponse { + this['package'] = _package; + return this; + } + public set _package(_package: string | undefined) { + this['package'] = _package; + } + public get _package() { + return this['package']; + } + public withRuntime(runtime: CreateFunctionResponseRuntimeEnum): CreateFunctionResponse { + this['runtime'] = runtime; + return this; + } + public withTimeout(timeout: number): CreateFunctionResponse { + this['timeout'] = timeout; + return this; + } + public withHandler(handler: string): CreateFunctionResponse { + this['handler'] = handler; + return this; + } + public withMemorySize(memorySize: number): CreateFunctionResponse { + this['memory_size'] = memorySize; + return this; + } + public set memorySize(memorySize: number | undefined) { + this['memory_size'] = memorySize; + } + public get memorySize() { + return this['memory_size']; + } + public withCpu(cpu: number): CreateFunctionResponse { + this['cpu'] = cpu; + return this; + } + public withCodeType(codeType: CreateFunctionResponseCodeTypeEnum): CreateFunctionResponse { + this['code_type'] = codeType; + return this; + } + public set codeType(codeType: CreateFunctionResponseCodeTypeEnum | undefined) { + this['code_type'] = codeType; + } + public get codeType() { + return this['code_type']; + } + public withCodeUrl(codeUrl: string): CreateFunctionResponse { + this['code_url'] = codeUrl; + return this; + } + public set codeUrl(codeUrl: string | undefined) { + this['code_url'] = codeUrl; + } + public get codeUrl() { + return this['code_url']; + } + public withCodeFilename(codeFilename: string): CreateFunctionResponse { + this['code_filename'] = codeFilename; + return this; + } + public set codeFilename(codeFilename: string | undefined) { + this['code_filename'] = codeFilename; + } + public get codeFilename() { + return this['code_filename']; + } + public withCodeSize(codeSize: number): CreateFunctionResponse { + this['code_size'] = codeSize; + return this; + } + public set codeSize(codeSize: number | undefined) { + this['code_size'] = codeSize; + } + public get codeSize() { + return this['code_size']; + } + public withUserData(userData: string): CreateFunctionResponse { + this['user_data'] = userData; + return this; + } + public set userData(userData: string | undefined) { + this['user_data'] = userData; + } + public get userData() { + return this['user_data']; + } + public withEncryptedUserData(encryptedUserData: string): CreateFunctionResponse { + this['encrypted_user_data'] = encryptedUserData; + return this; + } + public set encryptedUserData(encryptedUserData: string | undefined) { + this['encrypted_user_data'] = encryptedUserData; + } + public get encryptedUserData() { + return this['encrypted_user_data']; + } + public withDigest(digest: string): CreateFunctionResponse { + this['digest'] = digest; + return this; + } + public withVersion(version: string): CreateFunctionResponse { + this['version'] = version; + return this; + } + public withImageName(imageName: string): CreateFunctionResponse { + this['image_name'] = imageName; + return this; + } + public set imageName(imageName: string | undefined) { + this['image_name'] = imageName; + } + public get imageName() { + return this['image_name']; + } + public withXrole(xrole: string): CreateFunctionResponse { + this['xrole'] = xrole; + return this; + } + public withAppXrole(appXrole: string): CreateFunctionResponse { + this['app_xrole'] = appXrole; + return this; + } + public set appXrole(appXrole: string | undefined) { + this['app_xrole'] = appXrole; + } + public get appXrole() { + return this['app_xrole']; + } + public withDescription(description: string): CreateFunctionResponse { + this['description'] = description; + return this; + } + public withLastModified(lastModified: Date): CreateFunctionResponse { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: Date | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } + public withFuncVpc(funcVpc: FuncVpc): CreateFunctionResponse { + this['func_vpc'] = funcVpc; + return this; + } + public set funcVpc(funcVpc: FuncVpc | undefined) { + this['func_vpc'] = funcVpc; + } + public get funcVpc() { + return this['func_vpc']; + } + public withMountConfig(mountConfig: MountConfig): CreateFunctionResponse { + this['mount_config'] = mountConfig; + return this; + } + public set mountConfig(mountConfig: MountConfig | undefined) { + this['mount_config'] = mountConfig; + } + public get mountConfig() { + return this['mount_config']; + } + public withDependList(dependList: Array): CreateFunctionResponse { + this['depend_list'] = dependList; + return this; + } + public set dependList(dependList: Array | undefined) { + this['depend_list'] = dependList; + } + public get dependList() { + return this['depend_list']; + } + public withStrategyConfig(strategyConfig: StrategyConfig): CreateFunctionResponse { + this['strategy_config'] = strategyConfig; + return this; + } + public set strategyConfig(strategyConfig: StrategyConfig | undefined) { + this['strategy_config'] = strategyConfig; + } + public get strategyConfig() { + return this['strategy_config']; + } + public withExtendConfig(extendConfig: string): CreateFunctionResponse { + this['extend_config'] = extendConfig; + return this; + } + public set extendConfig(extendConfig: string | undefined) { + this['extend_config'] = extendConfig; + } + public get extendConfig() { + return this['extend_config']; + } + public withInitializerHandler(initializerHandler: string): CreateFunctionResponse { + this['initializer_handler'] = initializerHandler; + return this; + } + public set initializerHandler(initializerHandler: string | undefined) { + this['initializer_handler'] = initializerHandler; + } + public get initializerHandler() { + return this['initializer_handler']; + } + public withInitializerTimeout(initializerTimeout: number): CreateFunctionResponse { + this['initializer_timeout'] = initializerTimeout; + return this; + } + public set initializerTimeout(initializerTimeout: number | undefined) { + this['initializer_timeout'] = initializerTimeout; + } + public get initializerTimeout() { + return this['initializer_timeout']; + } + public withEnterpriseProjectId(enterpriseProjectId: string): CreateFunctionResponse { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId() { + return this['enterprise_project_id']; + } +} + +/** + * @export + * @enum {string} + */ +export enum CreateFunctionResponseRuntimeEnum { + PYTHON2_7 = 'Python2.7', + PYTHON3_6 = 'Python3.6', + GO1_8 = 'Go1.8', + JAVA8 = 'Java8', + NODE_JS6_10 = 'Node.js6.10', + NODE_JS8_10 = 'Node.js8.10', + C__NET_CORE_2_0 = 'C#(.NET Core 2.0)', + C__NET_CORE_2_1 = 'C#(.NET Core 2.1)', + C__NET_CORE_3_1 = 'C#(.NET Core 3.1)', + CUSTOM = 'Custom', + PHP7_3 = 'PHP7.3' +} +/** + * @export + * @enum {string} + */ +export enum CreateFunctionResponseCodeTypeEnum { + INLINE = 'inline', + ZIP = 'zip', + OBS = 'obs', + JAR = 'jar' +} diff --git a/services/functiongraph/v2/model/CreateFunctionTriggerRequest.ts b/services/functiongraph/v2/model/CreateFunctionTriggerRequest.ts new file mode 100644 index 000000000..e5e05b359 --- /dev/null +++ b/services/functiongraph/v2/model/CreateFunctionTriggerRequest.ts @@ -0,0 +1,24 @@ +import { CreateFunctionTriggerRequestBody } from './CreateFunctionTriggerRequestBody'; + + +export class CreateFunctionTriggerRequest { + private 'function_urn': string | undefined; + public body?: CreateFunctionTriggerRequestBody; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): CreateFunctionTriggerRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withBody(body: CreateFunctionTriggerRequestBody): CreateFunctionTriggerRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/CreateFunctionTriggerRequestBody.ts b/services/functiongraph/v2/model/CreateFunctionTriggerRequestBody.ts new file mode 100644 index 000000000..dba1ed512 --- /dev/null +++ b/services/functiongraph/v2/model/CreateFunctionTriggerRequestBody.ts @@ -0,0 +1,76 @@ + + +export class CreateFunctionTriggerRequestBody { + private 'trigger_type_code': CreateFunctionTriggerRequestBodyTriggerTypeCodeEnum | undefined; + private 'trigger_status'?: CreateFunctionTriggerRequestBodyTriggerStatusEnum | undefined; + private 'event_type_code'?: string | undefined; + private 'event_data': object | undefined; + public constructor(triggerTypeCode?: any, eventData?: any) { + this['trigger_type_code'] = triggerTypeCode; + this['event_data'] = eventData; + } + public withTriggerTypeCode(triggerTypeCode: CreateFunctionTriggerRequestBodyTriggerTypeCodeEnum): CreateFunctionTriggerRequestBody { + this['trigger_type_code'] = triggerTypeCode; + return this; + } + public set triggerTypeCode(triggerTypeCode: CreateFunctionTriggerRequestBodyTriggerTypeCodeEnum | undefined) { + this['trigger_type_code'] = triggerTypeCode; + } + public get triggerTypeCode() { + return this['trigger_type_code']; + } + public withTriggerStatus(triggerStatus: CreateFunctionTriggerRequestBodyTriggerStatusEnum): CreateFunctionTriggerRequestBody { + this['trigger_status'] = triggerStatus; + return this; + } + public set triggerStatus(triggerStatus: CreateFunctionTriggerRequestBodyTriggerStatusEnum | undefined) { + this['trigger_status'] = triggerStatus; + } + public get triggerStatus() { + return this['trigger_status']; + } + public withEventTypeCode(eventTypeCode: string): CreateFunctionTriggerRequestBody { + this['event_type_code'] = eventTypeCode; + return this; + } + public set eventTypeCode(eventTypeCode: string | undefined) { + this['event_type_code'] = eventTypeCode; + } + public get eventTypeCode() { + return this['event_type_code']; + } + public withEventData(eventData: object): CreateFunctionTriggerRequestBody { + this['event_data'] = eventData; + return this; + } + public set eventData(eventData: object | undefined) { + this['event_data'] = eventData; + } + public get eventData() { + return this['event_data']; + } +} + +/** + * @export + * @enum {string} + */ +export enum CreateFunctionTriggerRequestBodyTriggerTypeCodeEnum { + TIMER = 'TIMER', + APIG = 'APIG', + CTS = 'CTS', + DDS = 'DDS', + DMS = 'DMS', + DIS = 'DIS', + LTS = 'LTS', + OBS = 'OBS', + KAFKA = 'KAFKA' +} +/** + * @export + * @enum {string} + */ +export enum CreateFunctionTriggerRequestBodyTriggerStatusEnum { + ACTIVE = 'ACTIVE', + DISABLED = 'DISABLED' +} diff --git a/services/functiongraph/v2/model/CreateFunctionTriggerResponse.ts b/services/functiongraph/v2/model/CreateFunctionTriggerResponse.ts new file mode 100644 index 000000000..83a21484a --- /dev/null +++ b/services/functiongraph/v2/model/CreateFunctionTriggerResponse.ts @@ -0,0 +1,99 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class CreateFunctionTriggerResponse extends SdkResponse { + private 'trigger_id'?: string | undefined; + private 'trigger_type_code'?: CreateFunctionTriggerResponseTriggerTypeCodeEnum | undefined; + private 'trigger_status'?: CreateFunctionTriggerResponseTriggerStatusEnum | undefined; + private 'event_data'?: object | undefined; + private 'last_updated_time'?: Date | undefined; + private 'created_time'?: Date | undefined; + public constructor() { + super(); + } + public withTriggerId(triggerId: string): CreateFunctionTriggerResponse { + this['trigger_id'] = triggerId; + return this; + } + public set triggerId(triggerId: string | undefined) { + this['trigger_id'] = triggerId; + } + public get triggerId() { + return this['trigger_id']; + } + public withTriggerTypeCode(triggerTypeCode: CreateFunctionTriggerResponseTriggerTypeCodeEnum): CreateFunctionTriggerResponse { + this['trigger_type_code'] = triggerTypeCode; + return this; + } + public set triggerTypeCode(triggerTypeCode: CreateFunctionTriggerResponseTriggerTypeCodeEnum | undefined) { + this['trigger_type_code'] = triggerTypeCode; + } + public get triggerTypeCode() { + return this['trigger_type_code']; + } + public withTriggerStatus(triggerStatus: CreateFunctionTriggerResponseTriggerStatusEnum): CreateFunctionTriggerResponse { + this['trigger_status'] = triggerStatus; + return this; + } + public set triggerStatus(triggerStatus: CreateFunctionTriggerResponseTriggerStatusEnum | undefined) { + this['trigger_status'] = triggerStatus; + } + public get triggerStatus() { + return this['trigger_status']; + } + public withEventData(eventData: object): CreateFunctionTriggerResponse { + this['event_data'] = eventData; + return this; + } + public set eventData(eventData: object | undefined) { + this['event_data'] = eventData; + } + public get eventData() { + return this['event_data']; + } + public withLastUpdatedTime(lastUpdatedTime: Date): CreateFunctionTriggerResponse { + this['last_updated_time'] = lastUpdatedTime; + return this; + } + public set lastUpdatedTime(lastUpdatedTime: Date | undefined) { + this['last_updated_time'] = lastUpdatedTime; + } + public get lastUpdatedTime() { + return this['last_updated_time']; + } + public withCreatedTime(createdTime: Date): CreateFunctionTriggerResponse { + this['created_time'] = createdTime; + return this; + } + public set createdTime(createdTime: Date | undefined) { + this['created_time'] = createdTime; + } + public get createdTime() { + return this['created_time']; + } +} + +/** + * @export + * @enum {string} + */ +export enum CreateFunctionTriggerResponseTriggerTypeCodeEnum { + TIMER = 'TIMER', + APIG = 'APIG', + CTS = 'CTS', + DDS = 'DDS', + DMS = 'DMS', + DIS = 'DIS', + LTS = 'LTS', + OBS = 'OBS', + SMN = 'SMN', + KAFKA = 'KAFKA' +} +/** + * @export + * @enum {string} + */ +export enum CreateFunctionTriggerResponseTriggerStatusEnum { + ACTIVE = 'ACTIVE', + DISABLED = 'DISABLED' +} diff --git a/services/functiongraph/v2/model/CreateFunctionVersionRequest.ts b/services/functiongraph/v2/model/CreateFunctionVersionRequest.ts new file mode 100644 index 000000000..32804ddcb --- /dev/null +++ b/services/functiongraph/v2/model/CreateFunctionVersionRequest.ts @@ -0,0 +1,24 @@ +import { CreateFunctionVersionRequestBody } from './CreateFunctionVersionRequestBody'; + + +export class CreateFunctionVersionRequest { + private 'function_urn': string | undefined; + public body?: CreateFunctionVersionRequestBody; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): CreateFunctionVersionRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withBody(body: CreateFunctionVersionRequestBody): CreateFunctionVersionRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/CreateFunctionVersionRequestBody.ts b/services/functiongraph/v2/model/CreateFunctionVersionRequestBody.ts new file mode 100644 index 000000000..11a35abb4 --- /dev/null +++ b/services/functiongraph/v2/model/CreateFunctionVersionRequestBody.ts @@ -0,0 +1,21 @@ + + +export class CreateFunctionVersionRequestBody { + public digest?: string; + public version?: string; + public description?: string; + public constructor() { + } + public withDigest(digest: string): CreateFunctionVersionRequestBody { + this['digest'] = digest; + return this; + } + public withVersion(version: string): CreateFunctionVersionRequestBody { + this['version'] = version; + return this; + } + public withDescription(description: string): CreateFunctionVersionRequestBody { + this['description'] = description; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/CreateFunctionVersionResponse.ts b/services/functiongraph/v2/model/CreateFunctionVersionResponse.ts new file mode 100644 index 000000000..e882904e7 --- /dev/null +++ b/services/functiongraph/v2/model/CreateFunctionVersionResponse.ts @@ -0,0 +1,400 @@ +import { Dependency } from './Dependency'; +import { FuncVpc } from './FuncVpc'; +import { MountConfig } from './MountConfig'; +import { StrategyConfig } from './StrategyConfig'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class CreateFunctionVersionResponse extends SdkResponse { + private 'func_urn'?: string | undefined; + private 'func_name'?: string | undefined; + private 'domain_id'?: string | undefined; + public namespace?: string; + private 'project_name'?: string | undefined; + private 'package'?: string | undefined; + public runtime?: CreateFunctionVersionResponseRuntimeEnum; + public timeout?: number; + public handler?: string; + private 'memory_size'?: number | undefined; + public cpu?: number; + private 'code_type'?: CreateFunctionVersionResponseCodeTypeEnum | undefined; + private 'code_url'?: string | undefined; + private 'code_filename'?: string | undefined; + private 'code_size'?: number | undefined; + private 'user_data'?: string | undefined; + private 'encrypted_user_data'?: string | undefined; + public digest?: string; + public version?: string; + private 'image_name'?: string | undefined; + public xrole?: string; + private 'app_xrole'?: string | undefined; + public description?: string; + private 'version_description'?: string | undefined; + private 'last_modified'?: Date | undefined; + private 'func_vpc'?: FuncVpc | undefined; + private 'mount_config'?: MountConfig | undefined; + private 'depend_list'?: Array | undefined; + private 'strategy_config'?: StrategyConfig | undefined; + private 'extend_config'?: string | undefined; + public dependencies?: Array; + private 'initializer_handler'?: string | undefined; + private 'initializer_timeout'?: number | undefined; + private 'enterprise_project_id'?: string | undefined; + private 'long_time'?: boolean | undefined; + private 'log_group_id'?: string | undefined; + private 'log_stream_id'?: string | undefined; + public type?: CreateFunctionVersionResponseTypeEnum; + public constructor() { + super(); + } + public withFuncUrn(funcUrn: string): CreateFunctionVersionResponse { + this['func_urn'] = funcUrn; + return this; + } + public set funcUrn(funcUrn: string | undefined) { + this['func_urn'] = funcUrn; + } + public get funcUrn() { + return this['func_urn']; + } + public withFuncName(funcName: string): CreateFunctionVersionResponse { + this['func_name'] = funcName; + return this; + } + public set funcName(funcName: string | undefined) { + this['func_name'] = funcName; + } + public get funcName() { + return this['func_name']; + } + public withDomainId(domainId: string): CreateFunctionVersionResponse { + this['domain_id'] = domainId; + return this; + } + public set domainId(domainId: string | undefined) { + this['domain_id'] = domainId; + } + public get domainId() { + return this['domain_id']; + } + public withNamespace(namespace: string): CreateFunctionVersionResponse { + this['namespace'] = namespace; + return this; + } + public withProjectName(projectName: string): CreateFunctionVersionResponse { + this['project_name'] = projectName; + return this; + } + public set projectName(projectName: string | undefined) { + this['project_name'] = projectName; + } + public get projectName() { + return this['project_name']; + } + public withPackage(_package: string): CreateFunctionVersionResponse { + this['package'] = _package; + return this; + } + public set _package(_package: string | undefined) { + this['package'] = _package; + } + public get _package() { + return this['package']; + } + public withRuntime(runtime: CreateFunctionVersionResponseRuntimeEnum): CreateFunctionVersionResponse { + this['runtime'] = runtime; + return this; + } + public withTimeout(timeout: number): CreateFunctionVersionResponse { + this['timeout'] = timeout; + return this; + } + public withHandler(handler: string): CreateFunctionVersionResponse { + this['handler'] = handler; + return this; + } + public withMemorySize(memorySize: number): CreateFunctionVersionResponse { + this['memory_size'] = memorySize; + return this; + } + public set memorySize(memorySize: number | undefined) { + this['memory_size'] = memorySize; + } + public get memorySize() { + return this['memory_size']; + } + public withCpu(cpu: number): CreateFunctionVersionResponse { + this['cpu'] = cpu; + return this; + } + public withCodeType(codeType: CreateFunctionVersionResponseCodeTypeEnum): CreateFunctionVersionResponse { + this['code_type'] = codeType; + return this; + } + public set codeType(codeType: CreateFunctionVersionResponseCodeTypeEnum | undefined) { + this['code_type'] = codeType; + } + public get codeType() { + return this['code_type']; + } + public withCodeUrl(codeUrl: string): CreateFunctionVersionResponse { + this['code_url'] = codeUrl; + return this; + } + public set codeUrl(codeUrl: string | undefined) { + this['code_url'] = codeUrl; + } + public get codeUrl() { + return this['code_url']; + } + public withCodeFilename(codeFilename: string): CreateFunctionVersionResponse { + this['code_filename'] = codeFilename; + return this; + } + public set codeFilename(codeFilename: string | undefined) { + this['code_filename'] = codeFilename; + } + public get codeFilename() { + return this['code_filename']; + } + public withCodeSize(codeSize: number): CreateFunctionVersionResponse { + this['code_size'] = codeSize; + return this; + } + public set codeSize(codeSize: number | undefined) { + this['code_size'] = codeSize; + } + public get codeSize() { + return this['code_size']; + } + public withUserData(userData: string): CreateFunctionVersionResponse { + this['user_data'] = userData; + return this; + } + public set userData(userData: string | undefined) { + this['user_data'] = userData; + } + public get userData() { + return this['user_data']; + } + public withEncryptedUserData(encryptedUserData: string): CreateFunctionVersionResponse { + this['encrypted_user_data'] = encryptedUserData; + return this; + } + public set encryptedUserData(encryptedUserData: string | undefined) { + this['encrypted_user_data'] = encryptedUserData; + } + public get encryptedUserData() { + return this['encrypted_user_data']; + } + public withDigest(digest: string): CreateFunctionVersionResponse { + this['digest'] = digest; + return this; + } + public withVersion(version: string): CreateFunctionVersionResponse { + this['version'] = version; + return this; + } + public withImageName(imageName: string): CreateFunctionVersionResponse { + this['image_name'] = imageName; + return this; + } + public set imageName(imageName: string | undefined) { + this['image_name'] = imageName; + } + public get imageName() { + return this['image_name']; + } + public withXrole(xrole: string): CreateFunctionVersionResponse { + this['xrole'] = xrole; + return this; + } + public withAppXrole(appXrole: string): CreateFunctionVersionResponse { + this['app_xrole'] = appXrole; + return this; + } + public set appXrole(appXrole: string | undefined) { + this['app_xrole'] = appXrole; + } + public get appXrole() { + return this['app_xrole']; + } + public withDescription(description: string): CreateFunctionVersionResponse { + this['description'] = description; + return this; + } + public withVersionDescription(versionDescription: string): CreateFunctionVersionResponse { + this['version_description'] = versionDescription; + return this; + } + public set versionDescription(versionDescription: string | undefined) { + this['version_description'] = versionDescription; + } + public get versionDescription() { + return this['version_description']; + } + public withLastModified(lastModified: Date): CreateFunctionVersionResponse { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: Date | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } + public withFuncVpc(funcVpc: FuncVpc): CreateFunctionVersionResponse { + this['func_vpc'] = funcVpc; + return this; + } + public set funcVpc(funcVpc: FuncVpc | undefined) { + this['func_vpc'] = funcVpc; + } + public get funcVpc() { + return this['func_vpc']; + } + public withMountConfig(mountConfig: MountConfig): CreateFunctionVersionResponse { + this['mount_config'] = mountConfig; + return this; + } + public set mountConfig(mountConfig: MountConfig | undefined) { + this['mount_config'] = mountConfig; + } + public get mountConfig() { + return this['mount_config']; + } + public withDependList(dependList: Array): CreateFunctionVersionResponse { + this['depend_list'] = dependList; + return this; + } + public set dependList(dependList: Array | undefined) { + this['depend_list'] = dependList; + } + public get dependList() { + return this['depend_list']; + } + public withStrategyConfig(strategyConfig: StrategyConfig): CreateFunctionVersionResponse { + this['strategy_config'] = strategyConfig; + return this; + } + public set strategyConfig(strategyConfig: StrategyConfig | undefined) { + this['strategy_config'] = strategyConfig; + } + public get strategyConfig() { + return this['strategy_config']; + } + public withExtendConfig(extendConfig: string): CreateFunctionVersionResponse { + this['extend_config'] = extendConfig; + return this; + } + public set extendConfig(extendConfig: string | undefined) { + this['extend_config'] = extendConfig; + } + public get extendConfig() { + return this['extend_config']; + } + public withDependencies(dependencies: Array): CreateFunctionVersionResponse { + this['dependencies'] = dependencies; + return this; + } + public withInitializerHandler(initializerHandler: string): CreateFunctionVersionResponse { + this['initializer_handler'] = initializerHandler; + return this; + } + public set initializerHandler(initializerHandler: string | undefined) { + this['initializer_handler'] = initializerHandler; + } + public get initializerHandler() { + return this['initializer_handler']; + } + public withInitializerTimeout(initializerTimeout: number): CreateFunctionVersionResponse { + this['initializer_timeout'] = initializerTimeout; + return this; + } + public set initializerTimeout(initializerTimeout: number | undefined) { + this['initializer_timeout'] = initializerTimeout; + } + public get initializerTimeout() { + return this['initializer_timeout']; + } + public withEnterpriseProjectId(enterpriseProjectId: string): CreateFunctionVersionResponse { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId() { + return this['enterprise_project_id']; + } + public withLongTime(longTime: boolean): CreateFunctionVersionResponse { + this['long_time'] = longTime; + return this; + } + public set longTime(longTime: boolean | undefined) { + this['long_time'] = longTime; + } + public get longTime() { + return this['long_time']; + } + public withLogGroupId(logGroupId: string): CreateFunctionVersionResponse { + this['log_group_id'] = logGroupId; + return this; + } + public set logGroupId(logGroupId: string | undefined) { + this['log_group_id'] = logGroupId; + } + public get logGroupId() { + return this['log_group_id']; + } + public withLogStreamId(logStreamId: string): CreateFunctionVersionResponse { + this['log_stream_id'] = logStreamId; + return this; + } + public set logStreamId(logStreamId: string | undefined) { + this['log_stream_id'] = logStreamId; + } + public get logStreamId() { + return this['log_stream_id']; + } + public withType(type: CreateFunctionVersionResponseTypeEnum): CreateFunctionVersionResponse { + this['type'] = type; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum CreateFunctionVersionResponseRuntimeEnum { + PYTHON2_7 = 'Python2.7', + PYTHON3_6 = 'Python3.6', + GO1_8 = 'Go1.8', + JAVA8 = 'Java8', + NODE_JS6_10 = 'Node.js6.10', + NODE_JS8_10 = 'Node.js8.10', + C__NET_CORE_2_0 = 'C#(.NET Core 2.0)', + C__NET_CORE_2_1 = 'C#(.NET Core 2.1)', + C__NET_CORE_3_1 = 'C#(.NET Core 3.1)', + CUSTOM = 'Custom', + PHP7_3 = 'PHP7.3' +} +/** + * @export + * @enum {string} + */ +export enum CreateFunctionVersionResponseCodeTypeEnum { + INLINE = 'inline', + ZIP = 'zip', + OBS = 'obs', + JAR = 'jar' +} +/** + * @export + * @enum {string} + */ +export enum CreateFunctionVersionResponseTypeEnum { + V1 = 'v1', + V2 = 'v2' +} diff --git a/services/functiongraph/v2/model/CreateVersionAliasRequest.ts b/services/functiongraph/v2/model/CreateVersionAliasRequest.ts new file mode 100644 index 000000000..f3f6de42f --- /dev/null +++ b/services/functiongraph/v2/model/CreateVersionAliasRequest.ts @@ -0,0 +1,24 @@ +import { CreateVersionAliasRequestBody } from './CreateVersionAliasRequestBody'; + + +export class CreateVersionAliasRequest { + private 'function_urn': string | undefined; + public body?: CreateVersionAliasRequestBody; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): CreateVersionAliasRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withBody(body: CreateVersionAliasRequestBody): CreateVersionAliasRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/CreateVersionAliasRequestBody.ts b/services/functiongraph/v2/model/CreateVersionAliasRequestBody.ts new file mode 100644 index 000000000..e8b6fc15f --- /dev/null +++ b/services/functiongraph/v2/model/CreateVersionAliasRequestBody.ts @@ -0,0 +1,34 @@ + + +export class CreateVersionAliasRequestBody { + public name: string; + public version: string; + public description?: string; + private 'additional_version_weights'?: { [key: string]: number; } | undefined; + public constructor(name?: any, version?: any) { + this['name'] = name; + this['version'] = version; + } + public withName(name: string): CreateVersionAliasRequestBody { + this['name'] = name; + return this; + } + public withVersion(version: string): CreateVersionAliasRequestBody { + this['version'] = version; + return this; + } + public withDescription(description: string): CreateVersionAliasRequestBody { + this['description'] = description; + return this; + } + public withAdditionalVersionWeights(additionalVersionWeights: { [key: string]: number; }): CreateVersionAliasRequestBody { + this['additional_version_weights'] = additionalVersionWeights; + return this; + } + public set additionalVersionWeights(additionalVersionWeights: { [key: string]: number; } | undefined) { + this['additional_version_weights'] = additionalVersionWeights; + } + public get additionalVersionWeights() { + return this['additional_version_weights']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/CreateVersionAliasResponse.ts b/services/functiongraph/v2/model/CreateVersionAliasResponse.ts new file mode 100644 index 000000000..49cc8474f --- /dev/null +++ b/services/functiongraph/v2/model/CreateVersionAliasResponse.ts @@ -0,0 +1,56 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class CreateVersionAliasResponse extends SdkResponse { + public name?: string; + public version?: string; + public description?: string; + private 'last_modified'?: Date | undefined; + private 'alias_urn'?: string | undefined; + private 'additional_version_weights'?: { [key: string]: number; } | undefined; + public constructor() { + super(); + } + public withName(name: string): CreateVersionAliasResponse { + this['name'] = name; + return this; + } + public withVersion(version: string): CreateVersionAliasResponse { + this['version'] = version; + return this; + } + public withDescription(description: string): CreateVersionAliasResponse { + this['description'] = description; + return this; + } + public withLastModified(lastModified: Date): CreateVersionAliasResponse { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: Date | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } + public withAliasUrn(aliasUrn: string): CreateVersionAliasResponse { + this['alias_urn'] = aliasUrn; + return this; + } + public set aliasUrn(aliasUrn: string | undefined) { + this['alias_urn'] = aliasUrn; + } + public get aliasUrn() { + return this['alias_urn']; + } + public withAdditionalVersionWeights(additionalVersionWeights: { [key: string]: number; }): CreateVersionAliasResponse { + this['additional_version_weights'] = additionalVersionWeights; + return this; + } + public set additionalVersionWeights(additionalVersionWeights: { [key: string]: number; } | undefined) { + this['additional_version_weights'] = additionalVersionWeights; + } + public get additionalVersionWeights() { + return this['additional_version_weights']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/DeleteDependencyRequest.ts b/services/functiongraph/v2/model/DeleteDependencyRequest.ts new file mode 100644 index 000000000..e303ee69d --- /dev/null +++ b/services/functiongraph/v2/model/DeleteDependencyRequest.ts @@ -0,0 +1,18 @@ + + +export class DeleteDependencyRequest { + private 'depend_id': string | undefined; + public constructor(dependId?: any) { + this['depend_id'] = dependId; + } + public withDependId(dependId: string): DeleteDependencyRequest { + this['depend_id'] = dependId; + return this; + } + public set dependId(dependId: string | undefined) { + this['depend_id'] = dependId; + } + public get dependId() { + return this['depend_id']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/DeleteDependencyResponse.ts b/services/functiongraph/v2/model/DeleteDependencyResponse.ts new file mode 100644 index 000000000..20fde9c98 --- /dev/null +++ b/services/functiongraph/v2/model/DeleteDependencyResponse.ts @@ -0,0 +1,8 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class DeleteDependencyResponse extends SdkResponse { + public constructor() { + super(); + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/DeleteEventRequest.ts b/services/functiongraph/v2/model/DeleteEventRequest.ts new file mode 100644 index 000000000..b85ec25e9 --- /dev/null +++ b/services/functiongraph/v2/model/DeleteEventRequest.ts @@ -0,0 +1,30 @@ + + +export class DeleteEventRequest { + private 'event_id': string | undefined; + private 'function_urn': string | undefined; + public constructor(eventId?: any, functionUrn?: any) { + this['event_id'] = eventId; + this['function_urn'] = functionUrn; + } + public withEventId(eventId: string): DeleteEventRequest { + this['event_id'] = eventId; + return this; + } + public set eventId(eventId: string | undefined) { + this['event_id'] = eventId; + } + public get eventId() { + return this['event_id']; + } + public withFunctionUrn(functionUrn: string): DeleteEventRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/DeleteEventResponse.ts b/services/functiongraph/v2/model/DeleteEventResponse.ts new file mode 100644 index 000000000..3f67f1452 --- /dev/null +++ b/services/functiongraph/v2/model/DeleteEventResponse.ts @@ -0,0 +1,8 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class DeleteEventResponse extends SdkResponse { + public constructor() { + super(); + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/DeleteFunctionAsyncInvokeConfigRequest.ts b/services/functiongraph/v2/model/DeleteFunctionAsyncInvokeConfigRequest.ts new file mode 100644 index 000000000..edb687d33 --- /dev/null +++ b/services/functiongraph/v2/model/DeleteFunctionAsyncInvokeConfigRequest.ts @@ -0,0 +1,18 @@ + + +export class DeleteFunctionAsyncInvokeConfigRequest { + private 'function_urn': string | undefined; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): DeleteFunctionAsyncInvokeConfigRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/DeleteFunctionAsyncInvokeConfigResponse.ts b/services/functiongraph/v2/model/DeleteFunctionAsyncInvokeConfigResponse.ts new file mode 100644 index 000000000..883c22040 --- /dev/null +++ b/services/functiongraph/v2/model/DeleteFunctionAsyncInvokeConfigResponse.ts @@ -0,0 +1,8 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class DeleteFunctionAsyncInvokeConfigResponse extends SdkResponse { + public constructor() { + super(); + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/DeleteFunctionRequest.ts b/services/functiongraph/v2/model/DeleteFunctionRequest.ts new file mode 100644 index 000000000..f1bb9b087 --- /dev/null +++ b/services/functiongraph/v2/model/DeleteFunctionRequest.ts @@ -0,0 +1,18 @@ + + +export class DeleteFunctionRequest { + private 'function_urn': string | undefined; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): DeleteFunctionRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/DeleteFunctionResponse.ts b/services/functiongraph/v2/model/DeleteFunctionResponse.ts new file mode 100644 index 000000000..5554c674a --- /dev/null +++ b/services/functiongraph/v2/model/DeleteFunctionResponse.ts @@ -0,0 +1,8 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class DeleteFunctionResponse extends SdkResponse { + public constructor() { + super(); + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/DeleteFunctionTriggerRequest.ts b/services/functiongraph/v2/model/DeleteFunctionTriggerRequest.ts new file mode 100644 index 000000000..7bee812d0 --- /dev/null +++ b/services/functiongraph/v2/model/DeleteFunctionTriggerRequest.ts @@ -0,0 +1,59 @@ + + +export class DeleteFunctionTriggerRequest { + private 'function_urn': string | undefined; + private 'trigger_type_code': DeleteFunctionTriggerRequestTriggerTypeCodeEnum | undefined; + private 'trigger_id': string | undefined; + public constructor(functionUrn?: any, triggerTypeCode?: any, triggerId?: any) { + this['function_urn'] = functionUrn; + this['trigger_type_code'] = triggerTypeCode; + this['trigger_id'] = triggerId; + } + public withFunctionUrn(functionUrn: string): DeleteFunctionTriggerRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withTriggerTypeCode(triggerTypeCode: DeleteFunctionTriggerRequestTriggerTypeCodeEnum): DeleteFunctionTriggerRequest { + this['trigger_type_code'] = triggerTypeCode; + return this; + } + public set triggerTypeCode(triggerTypeCode: DeleteFunctionTriggerRequestTriggerTypeCodeEnum | undefined) { + this['trigger_type_code'] = triggerTypeCode; + } + public get triggerTypeCode() { + return this['trigger_type_code']; + } + public withTriggerId(triggerId: string): DeleteFunctionTriggerRequest { + this['trigger_id'] = triggerId; + return this; + } + public set triggerId(triggerId: string | undefined) { + this['trigger_id'] = triggerId; + } + public get triggerId() { + return this['trigger_id']; + } +} + +/** + * @export + * @enum {string} + */ +export enum DeleteFunctionTriggerRequestTriggerTypeCodeEnum { + TIMER = 'TIMER', + APIG = 'APIG', + CTS = 'CTS', + DDS = 'DDS', + DMS = 'DMS', + DIS = 'DIS', + LTS = 'LTS', + OBS = 'OBS', + SMN = 'SMN', + KAFKA = 'KAFKA' +} diff --git a/services/functiongraph/v2/model/DeleteFunctionTriggerResponse.ts b/services/functiongraph/v2/model/DeleteFunctionTriggerResponse.ts new file mode 100644 index 000000000..88fd4cbc8 --- /dev/null +++ b/services/functiongraph/v2/model/DeleteFunctionTriggerResponse.ts @@ -0,0 +1,8 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class DeleteFunctionTriggerResponse extends SdkResponse { + public constructor() { + super(); + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/DeleteReservedInstanceByIdRequest.ts b/services/functiongraph/v2/model/DeleteReservedInstanceByIdRequest.ts new file mode 100644 index 000000000..0cdf3ee1d --- /dev/null +++ b/services/functiongraph/v2/model/DeleteReservedInstanceByIdRequest.ts @@ -0,0 +1,30 @@ + + +export class DeleteReservedInstanceByIdRequest { + private 'function_urn': string | undefined; + private 'instance_id': string | undefined; + public constructor(functionUrn?: any, instanceId?: any) { + this['function_urn'] = functionUrn; + this['instance_id'] = instanceId; + } + public withFunctionUrn(functionUrn: string): DeleteReservedInstanceByIdRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withInstanceId(instanceId: string): DeleteReservedInstanceByIdRequest { + this['instance_id'] = instanceId; + return this; + } + public set instanceId(instanceId: string | undefined) { + this['instance_id'] = instanceId; + } + public get instanceId() { + return this['instance_id']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/DeleteReservedInstanceByIdResponse.ts b/services/functiongraph/v2/model/DeleteReservedInstanceByIdResponse.ts new file mode 100644 index 000000000..ea0b9fc2b --- /dev/null +++ b/services/functiongraph/v2/model/DeleteReservedInstanceByIdResponse.ts @@ -0,0 +1,8 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class DeleteReservedInstanceByIdResponse extends SdkResponse { + public constructor() { + super(); + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/DeleteVersionAliasRequest.ts b/services/functiongraph/v2/model/DeleteVersionAliasRequest.ts new file mode 100644 index 000000000..ceca47b84 --- /dev/null +++ b/services/functiongraph/v2/model/DeleteVersionAliasRequest.ts @@ -0,0 +1,30 @@ + + +export class DeleteVersionAliasRequest { + private 'function_urn': string | undefined; + private 'alias_name': string | undefined; + public constructor(functionUrn?: any, aliasName?: any) { + this['function_urn'] = functionUrn; + this['alias_name'] = aliasName; + } + public withFunctionUrn(functionUrn: string): DeleteVersionAliasRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withAliasName(aliasName: string): DeleteVersionAliasRequest { + this['alias_name'] = aliasName; + return this; + } + public set aliasName(aliasName: string | undefined) { + this['alias_name'] = aliasName; + } + public get aliasName() { + return this['alias_name']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/DeleteVersionAliasResponse.ts b/services/functiongraph/v2/model/DeleteVersionAliasResponse.ts new file mode 100644 index 000000000..bbdf9554f --- /dev/null +++ b/services/functiongraph/v2/model/DeleteVersionAliasResponse.ts @@ -0,0 +1,8 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class DeleteVersionAliasResponse extends SdkResponse { + public constructor() { + super(); + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/Dependency.ts b/services/functiongraph/v2/model/Dependency.ts new file mode 100644 index 000000000..3ac878c95 --- /dev/null +++ b/services/functiongraph/v2/model/Dependency.ts @@ -0,0 +1,65 @@ + + +export class Dependency { + public id: string; + public owner: string; + public link: string; + public runtime: string; + public etag: string; + public size: number; + public name: string; + public description: string; + private 'file_name'?: string | undefined; + public constructor(id?: any, owner?: any, link?: any, runtime?: any, etag?: any, size?: any, name?: any, description?: any) { + this['id'] = id; + this['owner'] = owner; + this['link'] = link; + this['runtime'] = runtime; + this['etag'] = etag; + this['size'] = size; + this['name'] = name; + this['description'] = description; + } + public withId(id: string): Dependency { + this['id'] = id; + return this; + } + public withOwner(owner: string): Dependency { + this['owner'] = owner; + return this; + } + public withLink(link: string): Dependency { + this['link'] = link; + return this; + } + public withRuntime(runtime: string): Dependency { + this['runtime'] = runtime; + return this; + } + public withEtag(etag: string): Dependency { + this['etag'] = etag; + return this; + } + public withSize(size: number): Dependency { + this['size'] = size; + return this; + } + public withName(name: string): Dependency { + this['name'] = name; + return this; + } + public withDescription(description: string): Dependency { + this['description'] = description; + return this; + } + public withFileName(fileName: string): Dependency { + this['file_name'] = fileName; + return this; + } + public set fileName(fileName: string | undefined) { + this['file_name'] = fileName; + } + public get fileName() { + return this['file_name']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/EnableLtsLogsRequest.ts b/services/functiongraph/v2/model/EnableLtsLogsRequest.ts new file mode 100644 index 000000000..e3b3de9bf --- /dev/null +++ b/services/functiongraph/v2/model/EnableLtsLogsRequest.ts @@ -0,0 +1,6 @@ + + +export class EnableLtsLogsRequest { + public constructor() { + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/EnableLtsLogsResponse.ts b/services/functiongraph/v2/model/EnableLtsLogsResponse.ts new file mode 100644 index 000000000..43bd19f6a --- /dev/null +++ b/services/functiongraph/v2/model/EnableLtsLogsResponse.ts @@ -0,0 +1,8 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class EnableLtsLogsResponse extends SdkResponse { + public constructor() { + super(); + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ExportFunctionRequest.ts b/services/functiongraph/v2/model/ExportFunctionRequest.ts new file mode 100644 index 000000000..aaf05bb81 --- /dev/null +++ b/services/functiongraph/v2/model/ExportFunctionRequest.ts @@ -0,0 +1,42 @@ + + +export class ExportFunctionRequest { + private 'function_urn': string | undefined; + public config?: boolean; + public code?: boolean; + public type?: ExportFunctionRequestTypeEnum; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): ExportFunctionRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withConfig(config: boolean): ExportFunctionRequest { + this['config'] = config; + return this; + } + public withCode(code: boolean): ExportFunctionRequest { + this['code'] = code; + return this; + } + public withType(type: ExportFunctionRequestTypeEnum): ExportFunctionRequest { + this['type'] = type; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ExportFunctionRequestTypeEnum { + TYPE = 'type', + CODE = 'code' +} diff --git a/services/functiongraph/v2/model/ExportFunctionResponse.ts b/services/functiongraph/v2/model/ExportFunctionResponse.ts new file mode 100644 index 000000000..ed6f8f1a6 --- /dev/null +++ b/services/functiongraph/v2/model/ExportFunctionResponse.ts @@ -0,0 +1,8 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ExportFunctionResponse extends SdkResponse { + public constructor() { + super(); + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/FuncAsyncDestinationConfig.ts b/services/functiongraph/v2/model/FuncAsyncDestinationConfig.ts new file mode 100644 index 000000000..be49de8be --- /dev/null +++ b/services/functiongraph/v2/model/FuncAsyncDestinationConfig.ts @@ -0,0 +1,29 @@ +import { FuncDestinationConfig } from './FuncDestinationConfig'; + + +export class FuncAsyncDestinationConfig { + private 'on_success'?: FuncDestinationConfig | undefined; + private 'on_failure'?: FuncDestinationConfig | undefined; + public constructor() { + } + public withOnSuccess(onSuccess: FuncDestinationConfig): FuncAsyncDestinationConfig { + this['on_success'] = onSuccess; + return this; + } + public set onSuccess(onSuccess: FuncDestinationConfig | undefined) { + this['on_success'] = onSuccess; + } + public get onSuccess() { + return this['on_success']; + } + public withOnFailure(onFailure: FuncDestinationConfig): FuncAsyncDestinationConfig { + this['on_failure'] = onFailure; + return this; + } + public set onFailure(onFailure: FuncDestinationConfig | undefined) { + this['on_failure'] = onFailure; + } + public get onFailure() { + return this['on_failure']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/FuncCode.ts b/services/functiongraph/v2/model/FuncCode.ts new file mode 100644 index 000000000..74def0ef5 --- /dev/null +++ b/services/functiongraph/v2/model/FuncCode.ts @@ -0,0 +1,16 @@ + + +export class FuncCode { + public file?: string; + public link?: string; + public constructor() { + } + public withFile(file: string): FuncCode { + this['file'] = file; + return this; + } + public withLink(link: string): FuncCode { + this['link'] = link; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/FuncDestinationConfig.ts b/services/functiongraph/v2/model/FuncDestinationConfig.ts new file mode 100644 index 000000000..9ab02180e --- /dev/null +++ b/services/functiongraph/v2/model/FuncDestinationConfig.ts @@ -0,0 +1,27 @@ + + +export class FuncDestinationConfig { + public destination?: FuncDestinationConfigDestinationEnum; + public param?: string; + public constructor() { + } + public withDestination(destination: FuncDestinationConfigDestinationEnum): FuncDestinationConfig { + this['destination'] = destination; + return this; + } + public withParam(param: string): FuncDestinationConfig { + this['param'] = param; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum FuncDestinationConfigDestinationEnum { + OBS = 'OBS', + SMN = 'SMN', + DIS = 'DIS', + FUNCTIONGRAPH = 'FunctionGraph' +} diff --git a/services/functiongraph/v2/model/FuncMount.ts b/services/functiongraph/v2/model/FuncMount.ts new file mode 100644 index 000000000..6fc1ffa2f --- /dev/null +++ b/services/functiongraph/v2/model/FuncMount.ts @@ -0,0 +1,53 @@ + + +export class FuncMount { + private 'mount_type': string | undefined; + private 'mount_resource': string | undefined; + private 'mount_share_path'?: string | undefined; + private 'local_mount_path': string | undefined; + public constructor(mountType?: any, mountResource?: any, localMountPath?: any) { + this['mount_type'] = mountType; + this['mount_resource'] = mountResource; + this['local_mount_path'] = localMountPath; + } + public withMountType(mountType: string): FuncMount { + this['mount_type'] = mountType; + return this; + } + public set mountType(mountType: string | undefined) { + this['mount_type'] = mountType; + } + public get mountType() { + return this['mount_type']; + } + public withMountResource(mountResource: string): FuncMount { + this['mount_resource'] = mountResource; + return this; + } + public set mountResource(mountResource: string | undefined) { + this['mount_resource'] = mountResource; + } + public get mountResource() { + return this['mount_resource']; + } + public withMountSharePath(mountSharePath: string): FuncMount { + this['mount_share_path'] = mountSharePath; + return this; + } + public set mountSharePath(mountSharePath: string | undefined) { + this['mount_share_path'] = mountSharePath; + } + public get mountSharePath() { + return this['mount_share_path']; + } + public withLocalMountPath(localMountPath: string): FuncMount { + this['local_mount_path'] = localMountPath; + return this; + } + public set localMountPath(localMountPath: string | undefined) { + this['local_mount_path'] = localMountPath; + } + public get localMountPath() { + return this['local_mount_path']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/FuncVpc.ts b/services/functiongraph/v2/model/FuncVpc.ts new file mode 100644 index 000000000..e13bd6b2c --- /dev/null +++ b/services/functiongraph/v2/model/FuncVpc.ts @@ -0,0 +1,66 @@ + + +export class FuncVpc { + private 'vpc_name': string | undefined; + private 'vpc_id': string | undefined; + private 'subnet_name': string | undefined; + private 'subnet_id': string | undefined; + public cidr: string; + public gateway: string; + public constructor(vpcName?: any, vpcId?: any, subnetName?: any, subnetId?: any, cidr?: any, gateway?: any) { + this['vpc_name'] = vpcName; + this['vpc_id'] = vpcId; + this['subnet_name'] = subnetName; + this['subnet_id'] = subnetId; + this['cidr'] = cidr; + this['gateway'] = gateway; + } + public withVpcName(vpcName: string): FuncVpc { + this['vpc_name'] = vpcName; + return this; + } + public set vpcName(vpcName: string | undefined) { + this['vpc_name'] = vpcName; + } + public get vpcName() { + return this['vpc_name']; + } + public withVpcId(vpcId: string): FuncVpc { + this['vpc_id'] = vpcId; + return this; + } + public set vpcId(vpcId: string | undefined) { + this['vpc_id'] = vpcId; + } + public get vpcId() { + return this['vpc_id']; + } + public withSubnetName(subnetName: string): FuncVpc { + this['subnet_name'] = subnetName; + return this; + } + public set subnetName(subnetName: string | undefined) { + this['subnet_name'] = subnetName; + } + public get subnetName() { + return this['subnet_name']; + } + public withSubnetId(subnetId: string): FuncVpc { + this['subnet_id'] = subnetId; + return this; + } + public set subnetId(subnetId: string | undefined) { + this['subnet_id'] = subnetId; + } + public get subnetId() { + return this['subnet_id']; + } + public withCidr(cidr: string): FuncVpc { + this['cidr'] = cidr; + return this; + } + public withGateway(gateway: string): FuncVpc { + this['gateway'] = gateway; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ImportFunctionRequest.ts b/services/functiongraph/v2/model/ImportFunctionRequest.ts new file mode 100644 index 000000000..1acc115a3 --- /dev/null +++ b/services/functiongraph/v2/model/ImportFunctionRequest.ts @@ -0,0 +1,12 @@ +import { ImportFunctionRequestBody } from './ImportFunctionRequestBody'; + + +export class ImportFunctionRequest { + public body?: ImportFunctionRequestBody; + public constructor() { + } + public withBody(body: ImportFunctionRequestBody): ImportFunctionRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ImportFunctionRequestBody.ts b/services/functiongraph/v2/model/ImportFunctionRequestBody.ts new file mode 100644 index 000000000..0467f70c3 --- /dev/null +++ b/services/functiongraph/v2/model/ImportFunctionRequestBody.ts @@ -0,0 +1,54 @@ + + +export class ImportFunctionRequestBody { + private 'func_name': string | undefined; + private 'file_name': string | undefined; + private 'file_type': string | undefined; + private 'file_code': string | undefined; + public constructor(funcName?: any, fileName?: any, fileType?: any, fileCode?: any) { + this['func_name'] = funcName; + this['file_name'] = fileName; + this['file_type'] = fileType; + this['file_code'] = fileCode; + } + public withFuncName(funcName: string): ImportFunctionRequestBody { + this['func_name'] = funcName; + return this; + } + public set funcName(funcName: string | undefined) { + this['func_name'] = funcName; + } + public get funcName() { + return this['func_name']; + } + public withFileName(fileName: string): ImportFunctionRequestBody { + this['file_name'] = fileName; + return this; + } + public set fileName(fileName: string | undefined) { + this['file_name'] = fileName; + } + public get fileName() { + return this['file_name']; + } + public withFileType(fileType: string): ImportFunctionRequestBody { + this['file_type'] = fileType; + return this; + } + public set fileType(fileType: string | undefined) { + this['file_type'] = fileType; + } + public get fileType() { + return this['file_type']; + } + public withFileCode(fileCode: string): ImportFunctionRequestBody { + this['file_code'] = fileCode; + return this; + } + public set fileCode(fileCode: string | undefined) { + this['file_code'] = fileCode; + } + public get fileCode() { + return this['file_code']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ImportFunctionResponse.ts b/services/functiongraph/v2/model/ImportFunctionResponse.ts new file mode 100644 index 000000000..ee6bf002f --- /dev/null +++ b/services/functiongraph/v2/model/ImportFunctionResponse.ts @@ -0,0 +1,325 @@ +import { FuncVpc } from './FuncVpc'; +import { StrategyConfig } from './StrategyConfig'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ImportFunctionResponse extends SdkResponse { + private 'func_urn'?: string | undefined; + private 'func_name'?: string | undefined; + private 'domain_id'?: string | undefined; + public namespace?: string; + private 'project_name'?: string | undefined; + private 'package'?: string | undefined; + public runtime?: ImportFunctionResponseRuntimeEnum; + public timeout?: number; + public handler?: string; + private 'memory_size'?: number | undefined; + public cpu?: number; + private 'code_type'?: ImportFunctionResponseCodeTypeEnum | undefined; + private 'code_url'?: string | undefined; + private 'code_filename'?: string | undefined; + private 'code_size'?: number | undefined; + private 'user_data'?: string | undefined; + public digest?: string; + public version?: string; + private 'image_name'?: string | undefined; + public xrole?: string; + private 'app_xrole'?: string | undefined; + public description?: string; + private 'version_description'?: string | undefined; + private 'last_modified'?: Date | undefined; + private 'func_vpc'?: FuncVpc | undefined; + private 'depend_list'?: Array | undefined; + private 'strategy_config'?: StrategyConfig | undefined; + private 'extend_config'?: string | undefined; + private 'initializer_handler'?: string | undefined; + private 'initializer_timeout'?: number | undefined; + private 'enterprise_project_id'?: string | undefined; + public constructor() { + super(); + } + public withFuncUrn(funcUrn: string): ImportFunctionResponse { + this['func_urn'] = funcUrn; + return this; + } + public set funcUrn(funcUrn: string | undefined) { + this['func_urn'] = funcUrn; + } + public get funcUrn() { + return this['func_urn']; + } + public withFuncName(funcName: string): ImportFunctionResponse { + this['func_name'] = funcName; + return this; + } + public set funcName(funcName: string | undefined) { + this['func_name'] = funcName; + } + public get funcName() { + return this['func_name']; + } + public withDomainId(domainId: string): ImportFunctionResponse { + this['domain_id'] = domainId; + return this; + } + public set domainId(domainId: string | undefined) { + this['domain_id'] = domainId; + } + public get domainId() { + return this['domain_id']; + } + public withNamespace(namespace: string): ImportFunctionResponse { + this['namespace'] = namespace; + return this; + } + public withProjectName(projectName: string): ImportFunctionResponse { + this['project_name'] = projectName; + return this; + } + public set projectName(projectName: string | undefined) { + this['project_name'] = projectName; + } + public get projectName() { + return this['project_name']; + } + public withPackage(_package: string): ImportFunctionResponse { + this['package'] = _package; + return this; + } + public set _package(_package: string | undefined) { + this['package'] = _package; + } + public get _package() { + return this['package']; + } + public withRuntime(runtime: ImportFunctionResponseRuntimeEnum): ImportFunctionResponse { + this['runtime'] = runtime; + return this; + } + public withTimeout(timeout: number): ImportFunctionResponse { + this['timeout'] = timeout; + return this; + } + public withHandler(handler: string): ImportFunctionResponse { + this['handler'] = handler; + return this; + } + public withMemorySize(memorySize: number): ImportFunctionResponse { + this['memory_size'] = memorySize; + return this; + } + public set memorySize(memorySize: number | undefined) { + this['memory_size'] = memorySize; + } + public get memorySize() { + return this['memory_size']; + } + public withCpu(cpu: number): ImportFunctionResponse { + this['cpu'] = cpu; + return this; + } + public withCodeType(codeType: ImportFunctionResponseCodeTypeEnum): ImportFunctionResponse { + this['code_type'] = codeType; + return this; + } + public set codeType(codeType: ImportFunctionResponseCodeTypeEnum | undefined) { + this['code_type'] = codeType; + } + public get codeType() { + return this['code_type']; + } + public withCodeUrl(codeUrl: string): ImportFunctionResponse { + this['code_url'] = codeUrl; + return this; + } + public set codeUrl(codeUrl: string | undefined) { + this['code_url'] = codeUrl; + } + public get codeUrl() { + return this['code_url']; + } + public withCodeFilename(codeFilename: string): ImportFunctionResponse { + this['code_filename'] = codeFilename; + return this; + } + public set codeFilename(codeFilename: string | undefined) { + this['code_filename'] = codeFilename; + } + public get codeFilename() { + return this['code_filename']; + } + public withCodeSize(codeSize: number): ImportFunctionResponse { + this['code_size'] = codeSize; + return this; + } + public set codeSize(codeSize: number | undefined) { + this['code_size'] = codeSize; + } + public get codeSize() { + return this['code_size']; + } + public withUserData(userData: string): ImportFunctionResponse { + this['user_data'] = userData; + return this; + } + public set userData(userData: string | undefined) { + this['user_data'] = userData; + } + public get userData() { + return this['user_data']; + } + public withDigest(digest: string): ImportFunctionResponse { + this['digest'] = digest; + return this; + } + public withVersion(version: string): ImportFunctionResponse { + this['version'] = version; + return this; + } + public withImageName(imageName: string): ImportFunctionResponse { + this['image_name'] = imageName; + return this; + } + public set imageName(imageName: string | undefined) { + this['image_name'] = imageName; + } + public get imageName() { + return this['image_name']; + } + public withXrole(xrole: string): ImportFunctionResponse { + this['xrole'] = xrole; + return this; + } + public withAppXrole(appXrole: string): ImportFunctionResponse { + this['app_xrole'] = appXrole; + return this; + } + public set appXrole(appXrole: string | undefined) { + this['app_xrole'] = appXrole; + } + public get appXrole() { + return this['app_xrole']; + } + public withDescription(description: string): ImportFunctionResponse { + this['description'] = description; + return this; + } + public withVersionDescription(versionDescription: string): ImportFunctionResponse { + this['version_description'] = versionDescription; + return this; + } + public set versionDescription(versionDescription: string | undefined) { + this['version_description'] = versionDescription; + } + public get versionDescription() { + return this['version_description']; + } + public withLastModified(lastModified: Date): ImportFunctionResponse { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: Date | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } + public withFuncVpc(funcVpc: FuncVpc): ImportFunctionResponse { + this['func_vpc'] = funcVpc; + return this; + } + public set funcVpc(funcVpc: FuncVpc | undefined) { + this['func_vpc'] = funcVpc; + } + public get funcVpc() { + return this['func_vpc']; + } + public withDependList(dependList: Array): ImportFunctionResponse { + this['depend_list'] = dependList; + return this; + } + public set dependList(dependList: Array | undefined) { + this['depend_list'] = dependList; + } + public get dependList() { + return this['depend_list']; + } + public withStrategyConfig(strategyConfig: StrategyConfig): ImportFunctionResponse { + this['strategy_config'] = strategyConfig; + return this; + } + public set strategyConfig(strategyConfig: StrategyConfig | undefined) { + this['strategy_config'] = strategyConfig; + } + public get strategyConfig() { + return this['strategy_config']; + } + public withExtendConfig(extendConfig: string): ImportFunctionResponse { + this['extend_config'] = extendConfig; + return this; + } + public set extendConfig(extendConfig: string | undefined) { + this['extend_config'] = extendConfig; + } + public get extendConfig() { + return this['extend_config']; + } + public withInitializerHandler(initializerHandler: string): ImportFunctionResponse { + this['initializer_handler'] = initializerHandler; + return this; + } + public set initializerHandler(initializerHandler: string | undefined) { + this['initializer_handler'] = initializerHandler; + } + public get initializerHandler() { + return this['initializer_handler']; + } + public withInitializerTimeout(initializerTimeout: number): ImportFunctionResponse { + this['initializer_timeout'] = initializerTimeout; + return this; + } + public set initializerTimeout(initializerTimeout: number | undefined) { + this['initializer_timeout'] = initializerTimeout; + } + public get initializerTimeout() { + return this['initializer_timeout']; + } + public withEnterpriseProjectId(enterpriseProjectId: string): ImportFunctionResponse { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId() { + return this['enterprise_project_id']; + } +} + +/** + * @export + * @enum {string} + */ +export enum ImportFunctionResponseRuntimeEnum { + PYTHON2_7 = 'Python2.7', + PYTHON3_6 = 'Python3.6', + GO1_8 = 'Go1.8', + JAVA8 = 'Java8', + NODE_JS6_10 = 'Node.js6.10', + NODE_JS8_10 = 'Node.js8.10', + C__NET_CORE_2_0 = 'C#(.NET Core 2.0)', + C__NET_CORE_2_1 = 'C#(.NET Core 2.1)', + C__NET_CORE_3_1 = 'C#(.NET Core 3.1)', + CUSTOM = 'Custom', + PHP7_3 = 'PHP7.3' +} +/** + * @export + * @enum {string} + */ +export enum ImportFunctionResponseCodeTypeEnum { + INLINE = 'inline', + ZIP = 'zip', + OBS = 'obs', + JAR = 'jar' +} diff --git a/services/functiongraph/v2/model/InvokeFunctionRequest.ts b/services/functiongraph/v2/model/InvokeFunctionRequest.ts new file mode 100644 index 000000000..a3ff63338 --- /dev/null +++ b/services/functiongraph/v2/model/InvokeFunctionRequest.ts @@ -0,0 +1,45 @@ + + +export class InvokeFunctionRequest { + private 'function_urn': string | undefined; + private 'X-Cff-Log-Type'?: string | undefined; + private 'X-CFF-Request-Version'?: string | undefined; + public body?: { [key: string]: object; }; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): InvokeFunctionRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withXCffLogType(xCffLogType: string): InvokeFunctionRequest { + this['X-Cff-Log-Type'] = xCffLogType; + return this; + } + public set xCffLogType(xCffLogType: string | undefined) { + this['X-Cff-Log-Type'] = xCffLogType; + } + public get xCffLogType() { + return this['X-Cff-Log-Type']; + } + public withXCFFRequestVersion(xCFFRequestVersion: string): InvokeFunctionRequest { + this['X-CFF-Request-Version'] = xCFFRequestVersion; + return this; + } + public set xCFFRequestVersion(xCFFRequestVersion: string | undefined) { + this['X-CFF-Request-Version'] = xCFFRequestVersion; + } + public get xCFFRequestVersion() { + return this['X-CFF-Request-Version']; + } + public withBody(body: { [key: string]: object; }): InvokeFunctionRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/InvokeFunctionResponse.ts b/services/functiongraph/v2/model/InvokeFunctionResponse.ts new file mode 100644 index 000000000..c81fca994 --- /dev/null +++ b/services/functiongraph/v2/model/InvokeFunctionResponse.ts @@ -0,0 +1,34 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class InvokeFunctionResponse extends SdkResponse { + private 'request_id'?: string | undefined; + public result?: string; + public log?: string; + public status?: number; + public constructor() { + super(); + } + public withRequestId(requestId: string): InvokeFunctionResponse { + this['request_id'] = requestId; + return this; + } + public set requestId(requestId: string | undefined) { + this['request_id'] = requestId; + } + public get requestId() { + return this['request_id']; + } + public withResult(result: string): InvokeFunctionResponse { + this['result'] = result; + return this; + } + public withLog(log: string): InvokeFunctionResponse { + this['log'] = log; + return this; + } + public withStatus(status: number): InvokeFunctionResponse { + this['status'] = status; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListDependenciesRequest.ts b/services/functiongraph/v2/model/ListDependenciesRequest.ts new file mode 100644 index 000000000..b6ac4ad0c --- /dev/null +++ b/services/functiongraph/v2/model/ListDependenciesRequest.ts @@ -0,0 +1,65 @@ + + +export class ListDependenciesRequest { + private 'dependency_type'?: ListDependenciesRequestDependencyTypeEnum | undefined; + public runtime?: ListDependenciesRequestRuntimeEnum; + public name?: string; + public marker?: string; + public limit?: string; + public constructor() { + } + public withDependencyType(dependencyType: ListDependenciesRequestDependencyTypeEnum): ListDependenciesRequest { + this['dependency_type'] = dependencyType; + return this; + } + public set dependencyType(dependencyType: ListDependenciesRequestDependencyTypeEnum | undefined) { + this['dependency_type'] = dependencyType; + } + public get dependencyType() { + return this['dependency_type']; + } + public withRuntime(runtime: ListDependenciesRequestRuntimeEnum): ListDependenciesRequest { + this['runtime'] = runtime; + return this; + } + public withName(name: string): ListDependenciesRequest { + this['name'] = name; + return this; + } + public withMarker(marker: string): ListDependenciesRequest { + this['marker'] = marker; + return this; + } + public withLimit(limit: string): ListDependenciesRequest { + this['limit'] = limit; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ListDependenciesRequestDependencyTypeEnum { + PUBLIC = 'public', + PRIVATE = 'private', + ALL = 'all' +} +/** + * @export + * @enum {string} + */ +export enum ListDependenciesRequestRuntimeEnum { + JAVA_8 = 'Java 8', + NODE_JS_6_10 = 'Node.js 6.10', + NODE_JS_8_10 = 'Node.js 8.10', + NODE_JS_10_16 = 'Node.js 10.16', + NODE_JS_12_13 = 'Node.js 12.13', + PYTHON_2_7 = 'Python 2.7', + PYTHON_3_6 = 'Python 3.6', + GO_1_8 = 'Go 1.8', + C__NET_CORE_2_0 = 'C#(.NET Core 2.0)', + C__NET_CORE_2_1 = 'C#(.NET Core 2.1)', + C__NET_CORE_3_1 = 'C#(.NET Core 3.1)', + PHP_7_3 = 'PHP 7.3' +} diff --git a/services/functiongraph/v2/model/ListDependenciesResponse.ts b/services/functiongraph/v2/model/ListDependenciesResponse.ts new file mode 100644 index 000000000..629e02d37 --- /dev/null +++ b/services/functiongraph/v2/model/ListDependenciesResponse.ts @@ -0,0 +1,30 @@ +import { ListDependenciesResult } from './ListDependenciesResult'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListDependenciesResponse extends SdkResponse { + public count?: number; + public dependencies?: Array; + private 'next_marker'?: number | undefined; + public constructor() { + super(); + } + public withCount(count: number): ListDependenciesResponse { + this['count'] = count; + return this; + } + public withDependencies(dependencies: Array): ListDependenciesResponse { + this['dependencies'] = dependencies; + return this; + } + public withNextMarker(nextMarker: number): ListDependenciesResponse { + this['next_marker'] = nextMarker; + return this; + } + public set nextMarker(nextMarker: number | undefined) { + this['next_marker'] = nextMarker; + } + public get nextMarker() { + return this['next_marker']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListDependenciesResult.ts b/services/functiongraph/v2/model/ListDependenciesResult.ts new file mode 100644 index 000000000..abe215785 --- /dev/null +++ b/services/functiongraph/v2/model/ListDependenciesResult.ts @@ -0,0 +1,64 @@ + + +export class ListDependenciesResult { + public id: string; + public owner: string; + public link: string; + public runtime: string; + public etag: string; + public size: number; + public name: string; + public description?: string; + private 'file_name'?: string | undefined; + public constructor(id?: any, owner?: any, link?: any, runtime?: any, etag?: any, size?: any, name?: any) { + this['id'] = id; + this['owner'] = owner; + this['link'] = link; + this['runtime'] = runtime; + this['etag'] = etag; + this['size'] = size; + this['name'] = name; + } + public withId(id: string): ListDependenciesResult { + this['id'] = id; + return this; + } + public withOwner(owner: string): ListDependenciesResult { + this['owner'] = owner; + return this; + } + public withLink(link: string): ListDependenciesResult { + this['link'] = link; + return this; + } + public withRuntime(runtime: string): ListDependenciesResult { + this['runtime'] = runtime; + return this; + } + public withEtag(etag: string): ListDependenciesResult { + this['etag'] = etag; + return this; + } + public withSize(size: number): ListDependenciesResult { + this['size'] = size; + return this; + } + public withName(name: string): ListDependenciesResult { + this['name'] = name; + return this; + } + public withDescription(description: string): ListDependenciesResult { + this['description'] = description; + return this; + } + public withFileName(fileName: string): ListDependenciesResult { + this['file_name'] = fileName; + return this; + } + public set fileName(fileName: string | undefined) { + this['file_name'] = fileName; + } + public get fileName() { + return this['file_name']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListEventsRequest.ts b/services/functiongraph/v2/model/ListEventsRequest.ts new file mode 100644 index 000000000..6466f49e8 --- /dev/null +++ b/services/functiongraph/v2/model/ListEventsRequest.ts @@ -0,0 +1,18 @@ + + +export class ListEventsRequest { + private 'function_urn': string | undefined; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): ListEventsRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListEventsResponse.ts b/services/functiongraph/v2/model/ListEventsResponse.ts new file mode 100644 index 000000000..aecb44620 --- /dev/null +++ b/services/functiongraph/v2/model/ListEventsResponse.ts @@ -0,0 +1,30 @@ +import { ListEventsResult } from './ListEventsResult'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListEventsResponse extends SdkResponse { + public count?: number; + public events?: Array; + private 'next_marker'?: number | undefined; + public constructor() { + super(); + } + public withCount(count: number): ListEventsResponse { + this['count'] = count; + return this; + } + public withEvents(events: Array): ListEventsResponse { + this['events'] = events; + return this; + } + public withNextMarker(nextMarker: number): ListEventsResponse { + this['next_marker'] = nextMarker; + return this; + } + public set nextMarker(nextMarker: number | undefined) { + this['next_marker'] = nextMarker; + } + public get nextMarker() { + return this['next_marker']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListEventsResult.ts b/services/functiongraph/v2/model/ListEventsResult.ts new file mode 100644 index 000000000..30b6b81f9 --- /dev/null +++ b/services/functiongraph/v2/model/ListEventsResult.ts @@ -0,0 +1,27 @@ + + +export class ListEventsResult { + public id?: string; + private 'last_modified'?: number | undefined; + public name?: string; + public constructor() { + } + public withId(id: string): ListEventsResult { + this['id'] = id; + return this; + } + public withLastModified(lastModified: number): ListEventsResult { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: number | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } + public withName(name: string): ListEventsResult { + this['name'] = name; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListFunctionAsyncInvokeConfigRequest.ts b/services/functiongraph/v2/model/ListFunctionAsyncInvokeConfigRequest.ts new file mode 100644 index 000000000..2877f2228 --- /dev/null +++ b/services/functiongraph/v2/model/ListFunctionAsyncInvokeConfigRequest.ts @@ -0,0 +1,28 @@ + + +export class ListFunctionAsyncInvokeConfigRequest { + private 'function_urn': string | undefined; + public marker?: string; + public limit?: string; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): ListFunctionAsyncInvokeConfigRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withMarker(marker: string): ListFunctionAsyncInvokeConfigRequest { + this['marker'] = marker; + return this; + } + public withLimit(limit: string): ListFunctionAsyncInvokeConfigRequest { + this['limit'] = limit; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListFunctionAsyncInvokeConfigResponse.ts b/services/functiongraph/v2/model/ListFunctionAsyncInvokeConfigResponse.ts new file mode 100644 index 000000000..fa3430838 --- /dev/null +++ b/services/functiongraph/v2/model/ListFunctionAsyncInvokeConfigResponse.ts @@ -0,0 +1,37 @@ +import { ListFunctionAsyncInvokeConfigResult } from './ListFunctionAsyncInvokeConfigResult'; +import { PageInfo } from './PageInfo'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListFunctionAsyncInvokeConfigResponse extends SdkResponse { + private 'async_invoke_configs'?: Array | undefined; + public count?: number; + private 'page_info'?: PageInfo | undefined; + public constructor() { + super(); + } + public withAsyncInvokeConfigs(asyncInvokeConfigs: Array): ListFunctionAsyncInvokeConfigResponse { + this['async_invoke_configs'] = asyncInvokeConfigs; + return this; + } + public set asyncInvokeConfigs(asyncInvokeConfigs: Array | undefined) { + this['async_invoke_configs'] = asyncInvokeConfigs; + } + public get asyncInvokeConfigs() { + return this['async_invoke_configs']; + } + public withCount(count: number): ListFunctionAsyncInvokeConfigResponse { + this['count'] = count; + return this; + } + public withPageInfo(pageInfo: PageInfo): ListFunctionAsyncInvokeConfigResponse { + this['page_info'] = pageInfo; + return this; + } + public set pageInfo(pageInfo: PageInfo | undefined) { + this['page_info'] = pageInfo; + } + public get pageInfo() { + return this['page_info']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListFunctionAsyncInvokeConfigResult.ts b/services/functiongraph/v2/model/ListFunctionAsyncInvokeConfigResult.ts new file mode 100644 index 000000000..345932615 --- /dev/null +++ b/services/functiongraph/v2/model/ListFunctionAsyncInvokeConfigResult.ts @@ -0,0 +1,77 @@ +import { FuncAsyncDestinationConfig } from './FuncAsyncDestinationConfig'; + + +export class ListFunctionAsyncInvokeConfigResult { + private 'func_urn': string | undefined; + private 'max_async_event_age_in_seconds': number | undefined; + private 'max_async_retry_attempts': number | undefined; + private 'destination_config': FuncAsyncDestinationConfig | undefined; + private 'created_time'?: string | undefined; + private 'last_modified'?: string | undefined; + public constructor(funcUrn?: any, maxAsyncEventAgeInSeconds?: any, maxAsyncRetryAttempts?: any, destinationConfig?: any) { + this['func_urn'] = funcUrn; + this['max_async_event_age_in_seconds'] = maxAsyncEventAgeInSeconds; + this['max_async_retry_attempts'] = maxAsyncRetryAttempts; + this['destination_config'] = destinationConfig; + } + public withFuncUrn(funcUrn: string): ListFunctionAsyncInvokeConfigResult { + this['func_urn'] = funcUrn; + return this; + } + public set funcUrn(funcUrn: string | undefined) { + this['func_urn'] = funcUrn; + } + public get funcUrn() { + return this['func_urn']; + } + public withMaxAsyncEventAgeInSeconds(maxAsyncEventAgeInSeconds: number): ListFunctionAsyncInvokeConfigResult { + this['max_async_event_age_in_seconds'] = maxAsyncEventAgeInSeconds; + return this; + } + public set maxAsyncEventAgeInSeconds(maxAsyncEventAgeInSeconds: number | undefined) { + this['max_async_event_age_in_seconds'] = maxAsyncEventAgeInSeconds; + } + public get maxAsyncEventAgeInSeconds() { + return this['max_async_event_age_in_seconds']; + } + public withMaxAsyncRetryAttempts(maxAsyncRetryAttempts: number): ListFunctionAsyncInvokeConfigResult { + this['max_async_retry_attempts'] = maxAsyncRetryAttempts; + return this; + } + public set maxAsyncRetryAttempts(maxAsyncRetryAttempts: number | undefined) { + this['max_async_retry_attempts'] = maxAsyncRetryAttempts; + } + public get maxAsyncRetryAttempts() { + return this['max_async_retry_attempts']; + } + public withDestinationConfig(destinationConfig: FuncAsyncDestinationConfig): ListFunctionAsyncInvokeConfigResult { + this['destination_config'] = destinationConfig; + return this; + } + public set destinationConfig(destinationConfig: FuncAsyncDestinationConfig | undefined) { + this['destination_config'] = destinationConfig; + } + public get destinationConfig() { + return this['destination_config']; + } + public withCreatedTime(createdTime: string): ListFunctionAsyncInvokeConfigResult { + this['created_time'] = createdTime; + return this; + } + public set createdTime(createdTime: string | undefined) { + this['created_time'] = createdTime; + } + public get createdTime() { + return this['created_time']; + } + public withLastModified(lastModified: string): ListFunctionAsyncInvokeConfigResult { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: string | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListFunctionResult.ts b/services/functiongraph/v2/model/ListFunctionResult.ts new file mode 100644 index 000000000..716ae18e6 --- /dev/null +++ b/services/functiongraph/v2/model/ListFunctionResult.ts @@ -0,0 +1,374 @@ +import { StrategyConfig } from './StrategyConfig'; + + +export class ListFunctionResult { + private 'func_urn': string | undefined; + private 'func_name': string | undefined; + private 'domain_id': string | undefined; + public namespace: string; + private 'project_name': string | undefined; + private 'package': string | undefined; + public runtime: ListFunctionResultRuntimeEnum; + public timeout: number; + public handler: string; + private 'memory_size': number | undefined; + public cpu: number; + private 'code_type': ListFunctionResultCodeTypeEnum | undefined; + private 'code_url'?: string | undefined; + private 'code_filename'?: string | undefined; + private 'code_size': number | undefined; + private 'user_data'?: string | undefined; + private 'encrypted_user_data'?: string | undefined; + public digest: string; + public version: string; + private 'image_name': string | undefined; + public xrole?: string; + private 'app_xrole'?: string | undefined; + public description?: string; + private 'last_modified': Date | undefined; + private 'func_vpc_id'?: string | undefined; + private 'strategy_config'?: StrategyConfig | undefined; + private 'extend_config'?: string | undefined; + private 'initializer_handler'?: string | undefined; + private 'initializer_timeout'?: number | undefined; + private 'enterprise_project_id'?: string | undefined; + private 'long_time'?: boolean | undefined; + private 'log_group_id'?: string | undefined; + private 'log_stream_id'?: string | undefined; + public type?: ListFunctionResultTypeEnum; + public constructor(funcUrn?: any, funcName?: any, domainId?: any, namespace?: any, projectName?: any, _package?: any, runtime?: any, timeout?: any, handler?: any, memorySize?: any, cpu?: any, codeType?: any, codeSize?: any, digest?: any, version?: any, imageName?: any, lastModified?: any) { + this['func_urn'] = funcUrn; + this['func_name'] = funcName; + this['domain_id'] = domainId; + this['namespace'] = namespace; + this['project_name'] = projectName; + this['package'] = _package; + this['runtime'] = runtime; + this['timeout'] = timeout; + this['handler'] = handler; + this['memory_size'] = memorySize; + this['cpu'] = cpu; + this['code_type'] = codeType; + this['code_size'] = codeSize; + this['digest'] = digest; + this['version'] = version; + this['image_name'] = imageName; + this['last_modified'] = lastModified; + } + public withFuncUrn(funcUrn: string): ListFunctionResult { + this['func_urn'] = funcUrn; + return this; + } + public set funcUrn(funcUrn: string | undefined) { + this['func_urn'] = funcUrn; + } + public get funcUrn() { + return this['func_urn']; + } + public withFuncName(funcName: string): ListFunctionResult { + this['func_name'] = funcName; + return this; + } + public set funcName(funcName: string | undefined) { + this['func_name'] = funcName; + } + public get funcName() { + return this['func_name']; + } + public withDomainId(domainId: string): ListFunctionResult { + this['domain_id'] = domainId; + return this; + } + public set domainId(domainId: string | undefined) { + this['domain_id'] = domainId; + } + public get domainId() { + return this['domain_id']; + } + public withNamespace(namespace: string): ListFunctionResult { + this['namespace'] = namespace; + return this; + } + public withProjectName(projectName: string): ListFunctionResult { + this['project_name'] = projectName; + return this; + } + public set projectName(projectName: string | undefined) { + this['project_name'] = projectName; + } + public get projectName() { + return this['project_name']; + } + public withPackage(_package: string): ListFunctionResult { + this['package'] = _package; + return this; + } + public set _package(_package: string | undefined) { + this['package'] = _package; + } + public get _package() { + return this['package']; + } + public withRuntime(runtime: ListFunctionResultRuntimeEnum): ListFunctionResult { + this['runtime'] = runtime; + return this; + } + public withTimeout(timeout: number): ListFunctionResult { + this['timeout'] = timeout; + return this; + } + public withHandler(handler: string): ListFunctionResult { + this['handler'] = handler; + return this; + } + public withMemorySize(memorySize: number): ListFunctionResult { + this['memory_size'] = memorySize; + return this; + } + public set memorySize(memorySize: number | undefined) { + this['memory_size'] = memorySize; + } + public get memorySize() { + return this['memory_size']; + } + public withCpu(cpu: number): ListFunctionResult { + this['cpu'] = cpu; + return this; + } + public withCodeType(codeType: ListFunctionResultCodeTypeEnum): ListFunctionResult { + this['code_type'] = codeType; + return this; + } + public set codeType(codeType: ListFunctionResultCodeTypeEnum | undefined) { + this['code_type'] = codeType; + } + public get codeType() { + return this['code_type']; + } + public withCodeUrl(codeUrl: string): ListFunctionResult { + this['code_url'] = codeUrl; + return this; + } + public set codeUrl(codeUrl: string | undefined) { + this['code_url'] = codeUrl; + } + public get codeUrl() { + return this['code_url']; + } + public withCodeFilename(codeFilename: string): ListFunctionResult { + this['code_filename'] = codeFilename; + return this; + } + public set codeFilename(codeFilename: string | undefined) { + this['code_filename'] = codeFilename; + } + public get codeFilename() { + return this['code_filename']; + } + public withCodeSize(codeSize: number): ListFunctionResult { + this['code_size'] = codeSize; + return this; + } + public set codeSize(codeSize: number | undefined) { + this['code_size'] = codeSize; + } + public get codeSize() { + return this['code_size']; + } + public withUserData(userData: string): ListFunctionResult { + this['user_data'] = userData; + return this; + } + public set userData(userData: string | undefined) { + this['user_data'] = userData; + } + public get userData() { + return this['user_data']; + } + public withEncryptedUserData(encryptedUserData: string): ListFunctionResult { + this['encrypted_user_data'] = encryptedUserData; + return this; + } + public set encryptedUserData(encryptedUserData: string | undefined) { + this['encrypted_user_data'] = encryptedUserData; + } + public get encryptedUserData() { + return this['encrypted_user_data']; + } + public withDigest(digest: string): ListFunctionResult { + this['digest'] = digest; + return this; + } + public withVersion(version: string): ListFunctionResult { + this['version'] = version; + return this; + } + public withImageName(imageName: string): ListFunctionResult { + this['image_name'] = imageName; + return this; + } + public set imageName(imageName: string | undefined) { + this['image_name'] = imageName; + } + public get imageName() { + return this['image_name']; + } + public withXrole(xrole: string): ListFunctionResult { + this['xrole'] = xrole; + return this; + } + public withAppXrole(appXrole: string): ListFunctionResult { + this['app_xrole'] = appXrole; + return this; + } + public set appXrole(appXrole: string | undefined) { + this['app_xrole'] = appXrole; + } + public get appXrole() { + return this['app_xrole']; + } + public withDescription(description: string): ListFunctionResult { + this['description'] = description; + return this; + } + public withLastModified(lastModified: Date): ListFunctionResult { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: Date | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } + public withFuncVpcId(funcVpcId: string): ListFunctionResult { + this['func_vpc_id'] = funcVpcId; + return this; + } + public set funcVpcId(funcVpcId: string | undefined) { + this['func_vpc_id'] = funcVpcId; + } + public get funcVpcId() { + return this['func_vpc_id']; + } + public withStrategyConfig(strategyConfig: StrategyConfig): ListFunctionResult { + this['strategy_config'] = strategyConfig; + return this; + } + public set strategyConfig(strategyConfig: StrategyConfig | undefined) { + this['strategy_config'] = strategyConfig; + } + public get strategyConfig() { + return this['strategy_config']; + } + public withExtendConfig(extendConfig: string): ListFunctionResult { + this['extend_config'] = extendConfig; + return this; + } + public set extendConfig(extendConfig: string | undefined) { + this['extend_config'] = extendConfig; + } + public get extendConfig() { + return this['extend_config']; + } + public withInitializerHandler(initializerHandler: string): ListFunctionResult { + this['initializer_handler'] = initializerHandler; + return this; + } + public set initializerHandler(initializerHandler: string | undefined) { + this['initializer_handler'] = initializerHandler; + } + public get initializerHandler() { + return this['initializer_handler']; + } + public withInitializerTimeout(initializerTimeout: number): ListFunctionResult { + this['initializer_timeout'] = initializerTimeout; + return this; + } + public set initializerTimeout(initializerTimeout: number | undefined) { + this['initializer_timeout'] = initializerTimeout; + } + public get initializerTimeout() { + return this['initializer_timeout']; + } + public withEnterpriseProjectId(enterpriseProjectId: string): ListFunctionResult { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId() { + return this['enterprise_project_id']; + } + public withLongTime(longTime: boolean): ListFunctionResult { + this['long_time'] = longTime; + return this; + } + public set longTime(longTime: boolean | undefined) { + this['long_time'] = longTime; + } + public get longTime() { + return this['long_time']; + } + public withLogGroupId(logGroupId: string): ListFunctionResult { + this['log_group_id'] = logGroupId; + return this; + } + public set logGroupId(logGroupId: string | undefined) { + this['log_group_id'] = logGroupId; + } + public get logGroupId() { + return this['log_group_id']; + } + public withLogStreamId(logStreamId: string): ListFunctionResult { + this['log_stream_id'] = logStreamId; + return this; + } + public set logStreamId(logStreamId: string | undefined) { + this['log_stream_id'] = logStreamId; + } + public get logStreamId() { + return this['log_stream_id']; + } + public withType(type: ListFunctionResultTypeEnum): ListFunctionResult { + this['type'] = type; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ListFunctionResultRuntimeEnum { + PYTHON2_7 = 'Python2.7', + PYTHON3_6 = 'Python3.6', + GO1_8 = 'Go1.8', + JAVA8 = 'Java8', + NODE_JS6_10 = 'Node.js6.10', + NODE_JS8_10 = 'Node.js8.10', + C__NET_CORE_2_0 = 'C#(.NET Core 2.0)', + C__NET_CORE_2_1 = 'C#(.NET Core 2.1)', + C__NET_CORE_3_1 = 'C#(.NET Core 3.1)', + CUSTOM = 'Custom', + PHP7_3 = 'PHP7.3' +} +/** + * @export + * @enum {string} + */ +export enum ListFunctionResultCodeTypeEnum { + INLINE = 'inline', + ZIP = 'zip', + OBS = 'obs', + JAR = 'jar' +} +/** + * @export + * @enum {string} + */ +export enum ListFunctionResultTypeEnum { + V1 = 'v1', + V2 = 'v2' +} diff --git a/services/functiongraph/v2/model/ListFunctionStatisticsRequest.ts b/services/functiongraph/v2/model/ListFunctionStatisticsRequest.ts new file mode 100644 index 000000000..90d07bc0b --- /dev/null +++ b/services/functiongraph/v2/model/ListFunctionStatisticsRequest.ts @@ -0,0 +1,24 @@ + + +export class ListFunctionStatisticsRequest { + private 'func_urn': string | undefined; + public period: string; + public constructor(funcUrn?: any, period?: any) { + this['func_urn'] = funcUrn; + this['period'] = period; + } + public withFuncUrn(funcUrn: string): ListFunctionStatisticsRequest { + this['func_urn'] = funcUrn; + return this; + } + public set funcUrn(funcUrn: string | undefined) { + this['func_urn'] = funcUrn; + } + public get funcUrn() { + return this['func_urn']; + } + public withPeriod(period: string): ListFunctionStatisticsRequest { + this['period'] = period; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListFunctionStatisticsResponse.ts b/services/functiongraph/v2/model/ListFunctionStatisticsResponse.ts new file mode 100644 index 000000000..c2aa4652c --- /dev/null +++ b/services/functiongraph/v2/model/ListFunctionStatisticsResponse.ts @@ -0,0 +1,63 @@ +import { SlaReportsValue } from './SlaReportsValue'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListFunctionStatisticsResponse extends SdkResponse { + public count?: Array; + public duration?: Array; + private 'fail_count'?: Array | undefined; + private 'max_duration'?: Array | undefined; + private 'min_duration'?: Array | undefined; + private 'reject_count'?: Array | undefined; + public constructor() { + super(); + } + public withCount(count: Array): ListFunctionStatisticsResponse { + this['count'] = count; + return this; + } + public withDuration(duration: Array): ListFunctionStatisticsResponse { + this['duration'] = duration; + return this; + } + public withFailCount(failCount: Array): ListFunctionStatisticsResponse { + this['fail_count'] = failCount; + return this; + } + public set failCount(failCount: Array | undefined) { + this['fail_count'] = failCount; + } + public get failCount() { + return this['fail_count']; + } + public withMaxDuration(maxDuration: Array): ListFunctionStatisticsResponse { + this['max_duration'] = maxDuration; + return this; + } + public set maxDuration(maxDuration: Array | undefined) { + this['max_duration'] = maxDuration; + } + public get maxDuration() { + return this['max_duration']; + } + public withMinDuration(minDuration: Array): ListFunctionStatisticsResponse { + this['min_duration'] = minDuration; + return this; + } + public set minDuration(minDuration: Array | undefined) { + this['min_duration'] = minDuration; + } + public get minDuration() { + return this['min_duration']; + } + public withRejectCount(rejectCount: Array): ListFunctionStatisticsResponse { + this['reject_count'] = rejectCount; + return this; + } + public set rejectCount(rejectCount: Array | undefined) { + this['reject_count'] = rejectCount; + } + public get rejectCount() { + return this['reject_count']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListFunctionStatisticsResponseBody.ts b/services/functiongraph/v2/model/ListFunctionStatisticsResponseBody.ts new file mode 100644 index 000000000..958be9c6d --- /dev/null +++ b/services/functiongraph/v2/model/ListFunctionStatisticsResponseBody.ts @@ -0,0 +1,61 @@ +import { SlaReportsValue } from './SlaReportsValue'; + + +export class ListFunctionStatisticsResponseBody { + public count?: Array; + public duration?: Array; + private 'fail_count'?: Array | undefined; + private 'max_duration'?: Array | undefined; + private 'min_duration'?: Array | undefined; + private 'reject_count'?: Array | undefined; + public constructor() { + } + public withCount(count: Array): ListFunctionStatisticsResponseBody { + this['count'] = count; + return this; + } + public withDuration(duration: Array): ListFunctionStatisticsResponseBody { + this['duration'] = duration; + return this; + } + public withFailCount(failCount: Array): ListFunctionStatisticsResponseBody { + this['fail_count'] = failCount; + return this; + } + public set failCount(failCount: Array | undefined) { + this['fail_count'] = failCount; + } + public get failCount() { + return this['fail_count']; + } + public withMaxDuration(maxDuration: Array): ListFunctionStatisticsResponseBody { + this['max_duration'] = maxDuration; + return this; + } + public set maxDuration(maxDuration: Array | undefined) { + this['max_duration'] = maxDuration; + } + public get maxDuration() { + return this['max_duration']; + } + public withMinDuration(minDuration: Array): ListFunctionStatisticsResponseBody { + this['min_duration'] = minDuration; + return this; + } + public set minDuration(minDuration: Array | undefined) { + this['min_duration'] = minDuration; + } + public get minDuration() { + return this['min_duration']; + } + public withRejectCount(rejectCount: Array): ListFunctionStatisticsResponseBody { + this['reject_count'] = rejectCount; + return this; + } + public set rejectCount(rejectCount: Array | undefined) { + this['reject_count'] = rejectCount; + } + public get rejectCount() { + return this['reject_count']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListFunctionTriggerResult.ts b/services/functiongraph/v2/model/ListFunctionTriggerResult.ts new file mode 100644 index 000000000..8118cd6a6 --- /dev/null +++ b/services/functiongraph/v2/model/ListFunctionTriggerResult.ts @@ -0,0 +1,103 @@ + + +export class ListFunctionTriggerResult { + private 'trigger_id': string | undefined; + private 'trigger_type_code': ListFunctionTriggerResultTriggerTypeCodeEnum | undefined; + private 'trigger_status': ListFunctionTriggerResultTriggerStatusEnum | undefined; + private 'event_data': object | undefined; + private 'last_updated_time': Date | undefined; + private 'created_time': Date | undefined; + public constructor(triggerId?: any, triggerTypeCode?: any, triggerStatus?: any, eventData?: any, lastUpdatedTime?: any, createdTime?: any) { + this['trigger_id'] = triggerId; + this['trigger_type_code'] = triggerTypeCode; + this['trigger_status'] = triggerStatus; + this['event_data'] = eventData; + this['last_updated_time'] = lastUpdatedTime; + this['created_time'] = createdTime; + } + public withTriggerId(triggerId: string): ListFunctionTriggerResult { + this['trigger_id'] = triggerId; + return this; + } + public set triggerId(triggerId: string | undefined) { + this['trigger_id'] = triggerId; + } + public get triggerId() { + return this['trigger_id']; + } + public withTriggerTypeCode(triggerTypeCode: ListFunctionTriggerResultTriggerTypeCodeEnum): ListFunctionTriggerResult { + this['trigger_type_code'] = triggerTypeCode; + return this; + } + public set triggerTypeCode(triggerTypeCode: ListFunctionTriggerResultTriggerTypeCodeEnum | undefined) { + this['trigger_type_code'] = triggerTypeCode; + } + public get triggerTypeCode() { + return this['trigger_type_code']; + } + public withTriggerStatus(triggerStatus: ListFunctionTriggerResultTriggerStatusEnum): ListFunctionTriggerResult { + this['trigger_status'] = triggerStatus; + return this; + } + public set triggerStatus(triggerStatus: ListFunctionTriggerResultTriggerStatusEnum | undefined) { + this['trigger_status'] = triggerStatus; + } + public get triggerStatus() { + return this['trigger_status']; + } + public withEventData(eventData: object): ListFunctionTriggerResult { + this['event_data'] = eventData; + return this; + } + public set eventData(eventData: object | undefined) { + this['event_data'] = eventData; + } + public get eventData() { + return this['event_data']; + } + public withLastUpdatedTime(lastUpdatedTime: Date): ListFunctionTriggerResult { + this['last_updated_time'] = lastUpdatedTime; + return this; + } + public set lastUpdatedTime(lastUpdatedTime: Date | undefined) { + this['last_updated_time'] = lastUpdatedTime; + } + public get lastUpdatedTime() { + return this['last_updated_time']; + } + public withCreatedTime(createdTime: Date): ListFunctionTriggerResult { + this['created_time'] = createdTime; + return this; + } + public set createdTime(createdTime: Date | undefined) { + this['created_time'] = createdTime; + } + public get createdTime() { + return this['created_time']; + } +} + +/** + * @export + * @enum {string} + */ +export enum ListFunctionTriggerResultTriggerTypeCodeEnum { + TIMER = 'TIMER', + APIG = 'APIG', + CTS = 'CTS', + DDS = 'DDS', + DMS = 'DMS', + DIS = 'DIS', + LTS = 'LTS', + OBS = 'OBS', + SMN = 'SMN', + KAFKA = 'KAFKA' +} +/** + * @export + * @enum {string} + */ +export enum ListFunctionTriggerResultTriggerStatusEnum { + ACTIVE = 'ACTIVE', + DISABLED = 'DISABLED' +} diff --git a/services/functiongraph/v2/model/ListFunctionTriggersRequest.ts b/services/functiongraph/v2/model/ListFunctionTriggersRequest.ts new file mode 100644 index 000000000..3d3bdd49b --- /dev/null +++ b/services/functiongraph/v2/model/ListFunctionTriggersRequest.ts @@ -0,0 +1,18 @@ + + +export class ListFunctionTriggersRequest { + private 'function_urn': string | undefined; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): ListFunctionTriggersRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListFunctionTriggersResponse.ts b/services/functiongraph/v2/model/ListFunctionTriggersResponse.ts new file mode 100644 index 000000000..7da2d85e6 --- /dev/null +++ b/services/functiongraph/v2/model/ListFunctionTriggersResponse.ts @@ -0,0 +1,14 @@ +import { ListFunctionTriggerResult } from './ListFunctionTriggerResult'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListFunctionTriggersResponse extends SdkResponse { + public body?: Array; + public constructor() { + super(); + } + public withBody(body: Array): ListFunctionTriggersResponse { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListFunctionVersionResult.ts b/services/functiongraph/v2/model/ListFunctionVersionResult.ts new file mode 100644 index 000000000..91662ba7d --- /dev/null +++ b/services/functiongraph/v2/model/ListFunctionVersionResult.ts @@ -0,0 +1,363 @@ +import { Dependency } from './Dependency'; +import { FuncVpc } from './FuncVpc'; +import { MountConfig } from './MountConfig'; +import { StrategyConfig } from './StrategyConfig'; + + +export class ListFunctionVersionResult { + private 'func_urn': string | undefined; + private 'func_name': string | undefined; + private 'domain_id': string | undefined; + public namespace: string; + private 'project_name': string | undefined; + private 'package': string | undefined; + public runtime: ListFunctionVersionResultRuntimeEnum; + public timeout: number; + public handler: string; + private 'memory_size': number | undefined; + public cpu: number; + private 'code_type': ListFunctionVersionResultCodeTypeEnum | undefined; + private 'code_url'?: string | undefined; + private 'code_filename'?: string | undefined; + private 'code_size': number | undefined; + private 'user_data'?: string | undefined; + public digest: string; + public version: string; + private 'image_name': string | undefined; + public xrole?: string; + private 'app_xrole'?: string | undefined; + public description?: string; + private 'version_description'?: string | undefined; + private 'last_modified': Date | undefined; + private 'func_vpc'?: FuncVpc | undefined; + private 'mount_config'?: MountConfig | undefined; + public concurrency?: number; + private 'depend_list'?: Array | undefined; + private 'strategy_config'?: StrategyConfig | undefined; + private 'extend_config'?: string | undefined; + public dependencies?: Array; + private 'initializer_handler'?: string | undefined; + private 'initializer_timeout'?: number | undefined; + private 'enterprise_project_id'?: string | undefined; + public constructor(funcUrn?: any, funcName?: any, domainId?: any, namespace?: any, projectName?: any, _package?: any, runtime?: any, timeout?: any, handler?: any, memorySize?: any, cpu?: any, codeType?: any, codeSize?: any, digest?: any, version?: any, imageName?: any, lastModified?: any) { + this['func_urn'] = funcUrn; + this['func_name'] = funcName; + this['domain_id'] = domainId; + this['namespace'] = namespace; + this['project_name'] = projectName; + this['package'] = _package; + this['runtime'] = runtime; + this['timeout'] = timeout; + this['handler'] = handler; + this['memory_size'] = memorySize; + this['cpu'] = cpu; + this['code_type'] = codeType; + this['code_size'] = codeSize; + this['digest'] = digest; + this['version'] = version; + this['image_name'] = imageName; + this['last_modified'] = lastModified; + } + public withFuncUrn(funcUrn: string): ListFunctionVersionResult { + this['func_urn'] = funcUrn; + return this; + } + public set funcUrn(funcUrn: string | undefined) { + this['func_urn'] = funcUrn; + } + public get funcUrn() { + return this['func_urn']; + } + public withFuncName(funcName: string): ListFunctionVersionResult { + this['func_name'] = funcName; + return this; + } + public set funcName(funcName: string | undefined) { + this['func_name'] = funcName; + } + public get funcName() { + return this['func_name']; + } + public withDomainId(domainId: string): ListFunctionVersionResult { + this['domain_id'] = domainId; + return this; + } + public set domainId(domainId: string | undefined) { + this['domain_id'] = domainId; + } + public get domainId() { + return this['domain_id']; + } + public withNamespace(namespace: string): ListFunctionVersionResult { + this['namespace'] = namespace; + return this; + } + public withProjectName(projectName: string): ListFunctionVersionResult { + this['project_name'] = projectName; + return this; + } + public set projectName(projectName: string | undefined) { + this['project_name'] = projectName; + } + public get projectName() { + return this['project_name']; + } + public withPackage(_package: string): ListFunctionVersionResult { + this['package'] = _package; + return this; + } + public set _package(_package: string | undefined) { + this['package'] = _package; + } + public get _package() { + return this['package']; + } + public withRuntime(runtime: ListFunctionVersionResultRuntimeEnum): ListFunctionVersionResult { + this['runtime'] = runtime; + return this; + } + public withTimeout(timeout: number): ListFunctionVersionResult { + this['timeout'] = timeout; + return this; + } + public withHandler(handler: string): ListFunctionVersionResult { + this['handler'] = handler; + return this; + } + public withMemorySize(memorySize: number): ListFunctionVersionResult { + this['memory_size'] = memorySize; + return this; + } + public set memorySize(memorySize: number | undefined) { + this['memory_size'] = memorySize; + } + public get memorySize() { + return this['memory_size']; + } + public withCpu(cpu: number): ListFunctionVersionResult { + this['cpu'] = cpu; + return this; + } + public withCodeType(codeType: ListFunctionVersionResultCodeTypeEnum): ListFunctionVersionResult { + this['code_type'] = codeType; + return this; + } + public set codeType(codeType: ListFunctionVersionResultCodeTypeEnum | undefined) { + this['code_type'] = codeType; + } + public get codeType() { + return this['code_type']; + } + public withCodeUrl(codeUrl: string): ListFunctionVersionResult { + this['code_url'] = codeUrl; + return this; + } + public set codeUrl(codeUrl: string | undefined) { + this['code_url'] = codeUrl; + } + public get codeUrl() { + return this['code_url']; + } + public withCodeFilename(codeFilename: string): ListFunctionVersionResult { + this['code_filename'] = codeFilename; + return this; + } + public set codeFilename(codeFilename: string | undefined) { + this['code_filename'] = codeFilename; + } + public get codeFilename() { + return this['code_filename']; + } + public withCodeSize(codeSize: number): ListFunctionVersionResult { + this['code_size'] = codeSize; + return this; + } + public set codeSize(codeSize: number | undefined) { + this['code_size'] = codeSize; + } + public get codeSize() { + return this['code_size']; + } + public withUserData(userData: string): ListFunctionVersionResult { + this['user_data'] = userData; + return this; + } + public set userData(userData: string | undefined) { + this['user_data'] = userData; + } + public get userData() { + return this['user_data']; + } + public withDigest(digest: string): ListFunctionVersionResult { + this['digest'] = digest; + return this; + } + public withVersion(version: string): ListFunctionVersionResult { + this['version'] = version; + return this; + } + public withImageName(imageName: string): ListFunctionVersionResult { + this['image_name'] = imageName; + return this; + } + public set imageName(imageName: string | undefined) { + this['image_name'] = imageName; + } + public get imageName() { + return this['image_name']; + } + public withXrole(xrole: string): ListFunctionVersionResult { + this['xrole'] = xrole; + return this; + } + public withAppXrole(appXrole: string): ListFunctionVersionResult { + this['app_xrole'] = appXrole; + return this; + } + public set appXrole(appXrole: string | undefined) { + this['app_xrole'] = appXrole; + } + public get appXrole() { + return this['app_xrole']; + } + public withDescription(description: string): ListFunctionVersionResult { + this['description'] = description; + return this; + } + public withVersionDescription(versionDescription: string): ListFunctionVersionResult { + this['version_description'] = versionDescription; + return this; + } + public set versionDescription(versionDescription: string | undefined) { + this['version_description'] = versionDescription; + } + public get versionDescription() { + return this['version_description']; + } + public withLastModified(lastModified: Date): ListFunctionVersionResult { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: Date | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } + public withFuncVpc(funcVpc: FuncVpc): ListFunctionVersionResult { + this['func_vpc'] = funcVpc; + return this; + } + public set funcVpc(funcVpc: FuncVpc | undefined) { + this['func_vpc'] = funcVpc; + } + public get funcVpc() { + return this['func_vpc']; + } + public withMountConfig(mountConfig: MountConfig): ListFunctionVersionResult { + this['mount_config'] = mountConfig; + return this; + } + public set mountConfig(mountConfig: MountConfig | undefined) { + this['mount_config'] = mountConfig; + } + public get mountConfig() { + return this['mount_config']; + } + public withConcurrency(concurrency: number): ListFunctionVersionResult { + this['concurrency'] = concurrency; + return this; + } + public withDependList(dependList: Array): ListFunctionVersionResult { + this['depend_list'] = dependList; + return this; + } + public set dependList(dependList: Array | undefined) { + this['depend_list'] = dependList; + } + public get dependList() { + return this['depend_list']; + } + public withStrategyConfig(strategyConfig: StrategyConfig): ListFunctionVersionResult { + this['strategy_config'] = strategyConfig; + return this; + } + public set strategyConfig(strategyConfig: StrategyConfig | undefined) { + this['strategy_config'] = strategyConfig; + } + public get strategyConfig() { + return this['strategy_config']; + } + public withExtendConfig(extendConfig: string): ListFunctionVersionResult { + this['extend_config'] = extendConfig; + return this; + } + public set extendConfig(extendConfig: string | undefined) { + this['extend_config'] = extendConfig; + } + public get extendConfig() { + return this['extend_config']; + } + public withDependencies(dependencies: Array): ListFunctionVersionResult { + this['dependencies'] = dependencies; + return this; + } + public withInitializerHandler(initializerHandler: string): ListFunctionVersionResult { + this['initializer_handler'] = initializerHandler; + return this; + } + public set initializerHandler(initializerHandler: string | undefined) { + this['initializer_handler'] = initializerHandler; + } + public get initializerHandler() { + return this['initializer_handler']; + } + public withInitializerTimeout(initializerTimeout: number): ListFunctionVersionResult { + this['initializer_timeout'] = initializerTimeout; + return this; + } + public set initializerTimeout(initializerTimeout: number | undefined) { + this['initializer_timeout'] = initializerTimeout; + } + public get initializerTimeout() { + return this['initializer_timeout']; + } + public withEnterpriseProjectId(enterpriseProjectId: string): ListFunctionVersionResult { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId() { + return this['enterprise_project_id']; + } +} + +/** + * @export + * @enum {string} + */ +export enum ListFunctionVersionResultRuntimeEnum { + PYTHON2_7 = 'Python2.7', + PYTHON3_6 = 'Python3.6', + GO1_8 = 'Go1.8', + JAVA8 = 'Java8', + NODE_JS6_10 = 'Node.js6.10', + NODE_JS8_10 = 'Node.js8.10', + C__NET_CORE_2_0 = 'C#(.NET Core 2.0)', + C__NET_CORE_2_1 = 'C#(.NET Core 2.1)', + C__NET_CORE_3_1 = 'C#(.NET Core 3.1)', + CUSTOM = 'Custom', + PHP7_3 = 'PHP7.3' +} +/** + * @export + * @enum {string} + */ +export enum ListFunctionVersionResultCodeTypeEnum { + INLINE = 'inline', + ZIP = 'zip', + OBS = 'obs', + JAR = 'jar' +} diff --git a/services/functiongraph/v2/model/ListFunctionVersionsRequest.ts b/services/functiongraph/v2/model/ListFunctionVersionsRequest.ts new file mode 100644 index 000000000..208dad471 --- /dev/null +++ b/services/functiongraph/v2/model/ListFunctionVersionsRequest.ts @@ -0,0 +1,28 @@ + + +export class ListFunctionVersionsRequest { + private 'function_urn': string | undefined; + public marker?: string; + public maxitems?: string; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): ListFunctionVersionsRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withMarker(marker: string): ListFunctionVersionsRequest { + this['marker'] = marker; + return this; + } + public withMaxitems(maxitems: string): ListFunctionVersionsRequest { + this['maxitems'] = maxitems; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListFunctionVersionsResponse.ts b/services/functiongraph/v2/model/ListFunctionVersionsResponse.ts new file mode 100644 index 000000000..c76bdbb48 --- /dev/null +++ b/services/functiongraph/v2/model/ListFunctionVersionsResponse.ts @@ -0,0 +1,30 @@ +import { ListFunctionVersionResult } from './ListFunctionVersionResult'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListFunctionVersionsResponse extends SdkResponse { + public versions?: Array; + private 'next_marker'?: number | undefined; + public count?: number; + public constructor() { + super(); + } + public withVersions(versions: Array): ListFunctionVersionsResponse { + this['versions'] = versions; + return this; + } + public withNextMarker(nextMarker: number): ListFunctionVersionsResponse { + this['next_marker'] = nextMarker; + return this; + } + public set nextMarker(nextMarker: number | undefined) { + this['next_marker'] = nextMarker; + } + public get nextMarker() { + return this['next_marker']; + } + public withCount(count: number): ListFunctionVersionsResponse { + this['count'] = count; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListFunctionsRequest.ts b/services/functiongraph/v2/model/ListFunctionsRequest.ts new file mode 100644 index 000000000..d5d93c2da --- /dev/null +++ b/services/functiongraph/v2/model/ListFunctionsRequest.ts @@ -0,0 +1,27 @@ + + +export class ListFunctionsRequest { + public marker?: string; + public maxitems?: string; + private 'package_name'?: string | undefined; + public constructor() { + } + public withMarker(marker: string): ListFunctionsRequest { + this['marker'] = marker; + return this; + } + public withMaxitems(maxitems: string): ListFunctionsRequest { + this['maxitems'] = maxitems; + return this; + } + public withPackageName(packageName: string): ListFunctionsRequest { + this['package_name'] = packageName; + return this; + } + public set packageName(packageName: string | undefined) { + this['package_name'] = packageName; + } + public get packageName() { + return this['package_name']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListFunctionsResponse.ts b/services/functiongraph/v2/model/ListFunctionsResponse.ts new file mode 100644 index 000000000..95a3fba99 --- /dev/null +++ b/services/functiongraph/v2/model/ListFunctionsResponse.ts @@ -0,0 +1,30 @@ +import { ListFunctionResult } from './ListFunctionResult'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListFunctionsResponse extends SdkResponse { + public functions?: Array; + private 'next_marker'?: number | undefined; + public count?: number; + public constructor() { + super(); + } + public withFunctions(functions: Array): ListFunctionsResponse { + this['functions'] = functions; + return this; + } + public withNextMarker(nextMarker: number): ListFunctionsResponse { + this['next_marker'] = nextMarker; + return this; + } + public set nextMarker(nextMarker: number | undefined) { + this['next_marker'] = nextMarker; + } + public get nextMarker() { + return this['next_marker']; + } + public withCount(count: number): ListFunctionsResponse { + this['count'] = count; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListQuotasRequest.ts b/services/functiongraph/v2/model/ListQuotasRequest.ts new file mode 100644 index 000000000..642eb8fa6 --- /dev/null +++ b/services/functiongraph/v2/model/ListQuotasRequest.ts @@ -0,0 +1,6 @@ + + +export class ListQuotasRequest { + public constructor() { + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListQuotasResponse.ts b/services/functiongraph/v2/model/ListQuotasResponse.ts new file mode 100644 index 000000000..62fd3cf0d --- /dev/null +++ b/services/functiongraph/v2/model/ListQuotasResponse.ts @@ -0,0 +1,14 @@ +import { ListQuotasResult } from './ListQuotasResult'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListQuotasResponse extends SdkResponse { + public quotas?: ListQuotasResult; + public constructor() { + super(); + } + public withQuotas(quotas: ListQuotasResult): ListQuotasResponse { + this['quotas'] = quotas; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListQuotasResult.ts b/services/functiongraph/v2/model/ListQuotasResult.ts new file mode 100644 index 000000000..4bf00a6b2 --- /dev/null +++ b/services/functiongraph/v2/model/ListQuotasResult.ts @@ -0,0 +1,13 @@ +import { Resources } from './Resources'; + + +export class ListQuotasResult { + public resources: Array; + public constructor(resources?: any) { + this['resources'] = resources; + } + public withResources(resources: Array): ListQuotasResult { + this['resources'] = resources; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListStatisticsRequest.ts b/services/functiongraph/v2/model/ListStatisticsRequest.ts new file mode 100644 index 000000000..26a905887 --- /dev/null +++ b/services/functiongraph/v2/model/ListStatisticsRequest.ts @@ -0,0 +1,26 @@ + + +export class ListStatisticsRequest { + public filter: ListStatisticsRequestFilterEnum; + public period?: string; + public constructor(filter?: any) { + this['filter'] = filter; + } + public withFilter(filter: ListStatisticsRequestFilterEnum): ListStatisticsRequest { + this['filter'] = filter; + return this; + } + public withPeriod(period: string): ListStatisticsRequest { + this['period'] = period; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ListStatisticsRequestFilterEnum { + MONITOR_DATA = 'monitor_data', + MONTHLY_REPORT = 'monthly_report' +} diff --git a/services/functiongraph/v2/model/ListStatisticsResponse.ts b/services/functiongraph/v2/model/ListStatisticsResponse.ts new file mode 100644 index 000000000..efd79ded0 --- /dev/null +++ b/services/functiongraph/v2/model/ListStatisticsResponse.ts @@ -0,0 +1,25 @@ +import { ListFunctionStatisticsResponseBody } from './ListFunctionStatisticsResponseBody'; +import { MonthUsed } from './MonthUsed'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListStatisticsResponse extends SdkResponse { + public count?: Array; + public gbs?: Array; + public statistics?: ListFunctionStatisticsResponseBody; + public constructor() { + super(); + } + public withCount(count: Array): ListStatisticsResponse { + this['count'] = count; + return this; + } + public withGbs(gbs: Array): ListStatisticsResponse { + this['gbs'] = gbs; + return this; + } + public withStatistics(statistics: ListFunctionStatisticsResponseBody): ListStatisticsResponse { + this['statistics'] = statistics; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListVersionAliasResult.ts b/services/functiongraph/v2/model/ListVersionAliasResult.ts new file mode 100644 index 000000000..3ec4f53da --- /dev/null +++ b/services/functiongraph/v2/model/ListVersionAliasResult.ts @@ -0,0 +1,47 @@ + + +export class ListVersionAliasResult { + public name: string; + public version: string; + public description?: string; + private 'last_modified': Date | undefined; + private 'alias_urn': string | undefined; + public constructor(name?: any, version?: any, lastModified?: any, aliasUrn?: any) { + this['name'] = name; + this['version'] = version; + this['last_modified'] = lastModified; + this['alias_urn'] = aliasUrn; + } + public withName(name: string): ListVersionAliasResult { + this['name'] = name; + return this; + } + public withVersion(version: string): ListVersionAliasResult { + this['version'] = version; + return this; + } + public withDescription(description: string): ListVersionAliasResult { + this['description'] = description; + return this; + } + public withLastModified(lastModified: Date): ListVersionAliasResult { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: Date | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } + public withAliasUrn(aliasUrn: string): ListVersionAliasResult { + this['alias_urn'] = aliasUrn; + return this; + } + public set aliasUrn(aliasUrn: string | undefined) { + this['alias_urn'] = aliasUrn; + } + public get aliasUrn() { + return this['alias_urn']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListVersionAliasesRequest.ts b/services/functiongraph/v2/model/ListVersionAliasesRequest.ts new file mode 100644 index 000000000..e77194bbf --- /dev/null +++ b/services/functiongraph/v2/model/ListVersionAliasesRequest.ts @@ -0,0 +1,18 @@ + + +export class ListVersionAliasesRequest { + private 'function_urn': string | undefined; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): ListVersionAliasesRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ListVersionAliasesResponse.ts b/services/functiongraph/v2/model/ListVersionAliasesResponse.ts new file mode 100644 index 000000000..91f17bc67 --- /dev/null +++ b/services/functiongraph/v2/model/ListVersionAliasesResponse.ts @@ -0,0 +1,14 @@ +import { ListVersionAliasResult } from './ListVersionAliasResult'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListVersionAliasesResponse extends SdkResponse { + public body?: Array; + public constructor() { + super(); + } + public withBody(body: Array): ListVersionAliasesResponse { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/MonthUsed.ts b/services/functiongraph/v2/model/MonthUsed.ts new file mode 100644 index 000000000..eb0f09b18 --- /dev/null +++ b/services/functiongraph/v2/model/MonthUsed.ts @@ -0,0 +1,16 @@ + + +export class MonthUsed { + public date?: string; + public value?: number; + public constructor() { + } + public withDate(date: string): MonthUsed { + this['date'] = date; + return this; + } + public withValue(value: number): MonthUsed { + this['value'] = value; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/MountConfig.ts b/services/functiongraph/v2/model/MountConfig.ts new file mode 100644 index 000000000..d90043a5d --- /dev/null +++ b/services/functiongraph/v2/model/MountConfig.ts @@ -0,0 +1,32 @@ +import { FuncMount } from './FuncMount'; +import { MountUser } from './MountUser'; + + +export class MountConfig { + private 'mount_user': MountUser | undefined; + private 'func_mounts': Array | undefined; + public constructor(mountUser?: any, funcMounts?: any) { + this['mount_user'] = mountUser; + this['func_mounts'] = funcMounts; + } + public withMountUser(mountUser: MountUser): MountConfig { + this['mount_user'] = mountUser; + return this; + } + public set mountUser(mountUser: MountUser | undefined) { + this['mount_user'] = mountUser; + } + public get mountUser() { + return this['mount_user']; + } + public withFuncMounts(funcMounts: Array): MountConfig { + this['func_mounts'] = funcMounts; + return this; + } + public set funcMounts(funcMounts: Array | undefined) { + this['func_mounts'] = funcMounts; + } + public get funcMounts() { + return this['func_mounts']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/MountUser.ts b/services/functiongraph/v2/model/MountUser.ts new file mode 100644 index 000000000..eb38d8e9e --- /dev/null +++ b/services/functiongraph/v2/model/MountUser.ts @@ -0,0 +1,30 @@ + + +export class MountUser { + private 'user_id': number | undefined; + private 'user_group_id': number | undefined; + public constructor(userId?: any, userGroupId?: any) { + this['user_id'] = userId; + this['user_group_id'] = userGroupId; + } + public withUserId(userId: number): MountUser { + this['user_id'] = userId; + return this; + } + public set userId(userId: number | undefined) { + this['user_id'] = userId; + } + public get userId() { + return this['user_id']; + } + public withUserGroupId(userGroupId: number): MountUser { + this['user_group_id'] = userGroupId; + return this; + } + public set userGroupId(userGroupId: number | undefined) { + this['user_group_id'] = userGroupId; + } + public get userGroupId() { + return this['user_group_id']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/PageInfo.ts b/services/functiongraph/v2/model/PageInfo.ts new file mode 100644 index 000000000..37c544623 --- /dev/null +++ b/services/functiongraph/v2/model/PageInfo.ts @@ -0,0 +1,42 @@ + + +export class PageInfo { + private 'next_marker': number | undefined; + private 'previous_marker': number | undefined; + private 'current_count': number | undefined; + public constructor(nextMarker?: any, previousMarker?: any, currentCount?: any) { + this['next_marker'] = nextMarker; + this['previous_marker'] = previousMarker; + this['current_count'] = currentCount; + } + public withNextMarker(nextMarker: number): PageInfo { + this['next_marker'] = nextMarker; + return this; + } + public set nextMarker(nextMarker: number | undefined) { + this['next_marker'] = nextMarker; + } + public get nextMarker() { + return this['next_marker']; + } + public withPreviousMarker(previousMarker: number): PageInfo { + this['previous_marker'] = previousMarker; + return this; + } + public set previousMarker(previousMarker: number | undefined) { + this['previous_marker'] = previousMarker; + } + public get previousMarker() { + return this['previous_marker']; + } + public withCurrentCount(currentCount: number): PageInfo { + this['current_count'] = currentCount; + return this; + } + public set currentCount(currentCount: number | undefined) { + this['current_count'] = currentCount; + } + public get currentCount() { + return this['current_count']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/Resources.ts b/services/functiongraph/v2/model/Resources.ts new file mode 100644 index 000000000..995cfa928 --- /dev/null +++ b/services/functiongraph/v2/model/Resources.ts @@ -0,0 +1,39 @@ + + +export class Resources { + public quota?: number; + public used?: number; + public type?: ResourcesTypeEnum; + public unit?: string; + public constructor() { + } + public withQuota(quota: number): Resources { + this['quota'] = quota; + return this; + } + public withUsed(used: number): Resources { + this['used'] = used; + return this; + } + public withType(type: ResourcesTypeEnum): Resources { + this['type'] = type; + return this; + } + public withUnit(unit: string): Resources { + this['unit'] = unit; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ResourcesTypeEnum { + FGS_FUNC_SCALE_DOWN_TIMEOUT = 'fgs_func_scale_down_timeout', + FGS_FUNC_OCCURS = 'fgs_func_occurs', + FGS_FUNC_PAT_IDLE_TIME = 'fgs_func_pat_idle_time', + FGS_FUNC_NUM = 'fgs_func_num', + FGS_FUNC_CODE_SIZE = 'fgs_func_code_size', + FGS_WORKFLOW_NUM = 'fgs_workflow_num' +} diff --git a/services/functiongraph/v2/model/ShowDependencyRequest.ts b/services/functiongraph/v2/model/ShowDependencyRequest.ts new file mode 100644 index 000000000..f3e901a8f --- /dev/null +++ b/services/functiongraph/v2/model/ShowDependencyRequest.ts @@ -0,0 +1,18 @@ + + +export class ShowDependencyRequest { + private 'depend_id': string | undefined; + public constructor(dependId?: any) { + this['depend_id'] = dependId; + } + public withDependId(dependId: string): ShowDependencyRequest { + this['depend_id'] = dependId; + return this; + } + public set dependId(dependId: string | undefined) { + this['depend_id'] = dependId; + } + public get dependId() { + return this['depend_id']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ShowDependencyResponse.ts b/services/functiongraph/v2/model/ShowDependencyResponse.ts new file mode 100644 index 000000000..2a085dd10 --- /dev/null +++ b/services/functiongraph/v2/model/ShowDependencyResponse.ts @@ -0,0 +1,59 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowDependencyResponse extends SdkResponse { + public id?: string; + public owner?: string; + public link?: string; + public runtime?: string; + public etag?: string; + public size?: number; + public name?: string; + public description?: string; + private 'file_name'?: string | undefined; + public constructor() { + super(); + } + public withId(id: string): ShowDependencyResponse { + this['id'] = id; + return this; + } + public withOwner(owner: string): ShowDependencyResponse { + this['owner'] = owner; + return this; + } + public withLink(link: string): ShowDependencyResponse { + this['link'] = link; + return this; + } + public withRuntime(runtime: string): ShowDependencyResponse { + this['runtime'] = runtime; + return this; + } + public withEtag(etag: string): ShowDependencyResponse { + this['etag'] = etag; + return this; + } + public withSize(size: number): ShowDependencyResponse { + this['size'] = size; + return this; + } + public withName(name: string): ShowDependencyResponse { + this['name'] = name; + return this; + } + public withDescription(description: string): ShowDependencyResponse { + this['description'] = description; + return this; + } + public withFileName(fileName: string): ShowDependencyResponse { + this['file_name'] = fileName; + return this; + } + public set fileName(fileName: string | undefined) { + this['file_name'] = fileName; + } + public get fileName() { + return this['file_name']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ShowEventRequest.ts b/services/functiongraph/v2/model/ShowEventRequest.ts new file mode 100644 index 000000000..f9d74d118 --- /dev/null +++ b/services/functiongraph/v2/model/ShowEventRequest.ts @@ -0,0 +1,30 @@ + + +export class ShowEventRequest { + private 'event_id': string | undefined; + private 'function_urn': string | undefined; + public constructor(eventId?: any, functionUrn?: any) { + this['event_id'] = eventId; + this['function_urn'] = functionUrn; + } + public withEventId(eventId: string): ShowEventRequest { + this['event_id'] = eventId; + return this; + } + public set eventId(eventId: string | undefined) { + this['event_id'] = eventId; + } + public get eventId() { + return this['event_id']; + } + public withFunctionUrn(functionUrn: string): ShowEventRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ShowEventResponse.ts b/services/functiongraph/v2/model/ShowEventResponse.ts new file mode 100644 index 000000000..0082f1630 --- /dev/null +++ b/services/functiongraph/v2/model/ShowEventResponse.ts @@ -0,0 +1,34 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowEventResponse extends SdkResponse { + public id?: string; + public name?: string; + public content?: string; + private 'last_modified'?: number | undefined; + public constructor() { + super(); + } + public withId(id: string): ShowEventResponse { + this['id'] = id; + return this; + } + public withName(name: string): ShowEventResponse { + this['name'] = name; + return this; + } + public withContent(content: string): ShowEventResponse { + this['content'] = content; + return this; + } + public withLastModified(lastModified: number): ShowEventResponse { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: number | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ShowFunctionAsyncInvokeConfigRequest.ts b/services/functiongraph/v2/model/ShowFunctionAsyncInvokeConfigRequest.ts new file mode 100644 index 000000000..3f86a5263 --- /dev/null +++ b/services/functiongraph/v2/model/ShowFunctionAsyncInvokeConfigRequest.ts @@ -0,0 +1,18 @@ + + +export class ShowFunctionAsyncInvokeConfigRequest { + private 'function_urn': string | undefined; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): ShowFunctionAsyncInvokeConfigRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ShowFunctionAsyncInvokeConfigResponse.ts b/services/functiongraph/v2/model/ShowFunctionAsyncInvokeConfigResponse.ts new file mode 100644 index 000000000..7440d0752 --- /dev/null +++ b/services/functiongraph/v2/model/ShowFunctionAsyncInvokeConfigResponse.ts @@ -0,0 +1,75 @@ +import { FuncAsyncDestinationConfig } from './FuncAsyncDestinationConfig'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowFunctionAsyncInvokeConfigResponse extends SdkResponse { + private 'func_urn'?: string | undefined; + private 'max_async_event_age_in_seconds'?: number | undefined; + private 'max_async_retry_attempts'?: number | undefined; + private 'destination_config'?: FuncAsyncDestinationConfig | undefined; + private 'created_time'?: string | undefined; + private 'last_modified'?: string | undefined; + public constructor() { + super(); + } + public withFuncUrn(funcUrn: string): ShowFunctionAsyncInvokeConfigResponse { + this['func_urn'] = funcUrn; + return this; + } + public set funcUrn(funcUrn: string | undefined) { + this['func_urn'] = funcUrn; + } + public get funcUrn() { + return this['func_urn']; + } + public withMaxAsyncEventAgeInSeconds(maxAsyncEventAgeInSeconds: number): ShowFunctionAsyncInvokeConfigResponse { + this['max_async_event_age_in_seconds'] = maxAsyncEventAgeInSeconds; + return this; + } + public set maxAsyncEventAgeInSeconds(maxAsyncEventAgeInSeconds: number | undefined) { + this['max_async_event_age_in_seconds'] = maxAsyncEventAgeInSeconds; + } + public get maxAsyncEventAgeInSeconds() { + return this['max_async_event_age_in_seconds']; + } + public withMaxAsyncRetryAttempts(maxAsyncRetryAttempts: number): ShowFunctionAsyncInvokeConfigResponse { + this['max_async_retry_attempts'] = maxAsyncRetryAttempts; + return this; + } + public set maxAsyncRetryAttempts(maxAsyncRetryAttempts: number | undefined) { + this['max_async_retry_attempts'] = maxAsyncRetryAttempts; + } + public get maxAsyncRetryAttempts() { + return this['max_async_retry_attempts']; + } + public withDestinationConfig(destinationConfig: FuncAsyncDestinationConfig): ShowFunctionAsyncInvokeConfigResponse { + this['destination_config'] = destinationConfig; + return this; + } + public set destinationConfig(destinationConfig: FuncAsyncDestinationConfig | undefined) { + this['destination_config'] = destinationConfig; + } + public get destinationConfig() { + return this['destination_config']; + } + public withCreatedTime(createdTime: string): ShowFunctionAsyncInvokeConfigResponse { + this['created_time'] = createdTime; + return this; + } + public set createdTime(createdTime: string | undefined) { + this['created_time'] = createdTime; + } + public get createdTime() { + return this['created_time']; + } + public withLastModified(lastModified: string): ShowFunctionAsyncInvokeConfigResponse { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: string | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ShowFunctionCodeRequest.ts b/services/functiongraph/v2/model/ShowFunctionCodeRequest.ts new file mode 100644 index 000000000..434d85830 --- /dev/null +++ b/services/functiongraph/v2/model/ShowFunctionCodeRequest.ts @@ -0,0 +1,18 @@ + + +export class ShowFunctionCodeRequest { + private 'function_urn': string | undefined; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): ShowFunctionCodeRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ShowFunctionCodeResponse.ts b/services/functiongraph/v2/model/ShowFunctionCodeResponse.ts new file mode 100644 index 000000000..4f452928c --- /dev/null +++ b/services/functiongraph/v2/model/ShowFunctionCodeResponse.ts @@ -0,0 +1,175 @@ +import { Dependency } from './Dependency'; +import { FuncCode } from './FuncCode'; +import { StrategyConfig } from './StrategyConfig'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowFunctionCodeResponse extends SdkResponse { + private 'func_urn'?: string | undefined; + private 'func_name'?: string | undefined; + private 'domain_id'?: string | undefined; + public runtime?: ShowFunctionCodeResponseRuntimeEnum; + private 'code_type'?: ShowFunctionCodeResponseCodeTypeEnum | undefined; + private 'code_url'?: string | undefined; + private 'code_filename'?: string | undefined; + private 'code_size'?: number | undefined; + public digest?: string; + private 'last_modified'?: Date | undefined; + private 'func_code'?: FuncCode | undefined; + private 'depend_list'?: Array | undefined; + private 'strategy_config'?: StrategyConfig | undefined; + public dependencies?: Array; + public constructor() { + super(); + } + public withFuncUrn(funcUrn: string): ShowFunctionCodeResponse { + this['func_urn'] = funcUrn; + return this; + } + public set funcUrn(funcUrn: string | undefined) { + this['func_urn'] = funcUrn; + } + public get funcUrn() { + return this['func_urn']; + } + public withFuncName(funcName: string): ShowFunctionCodeResponse { + this['func_name'] = funcName; + return this; + } + public set funcName(funcName: string | undefined) { + this['func_name'] = funcName; + } + public get funcName() { + return this['func_name']; + } + public withDomainId(domainId: string): ShowFunctionCodeResponse { + this['domain_id'] = domainId; + return this; + } + public set domainId(domainId: string | undefined) { + this['domain_id'] = domainId; + } + public get domainId() { + return this['domain_id']; + } + public withRuntime(runtime: ShowFunctionCodeResponseRuntimeEnum): ShowFunctionCodeResponse { + this['runtime'] = runtime; + return this; + } + public withCodeType(codeType: ShowFunctionCodeResponseCodeTypeEnum): ShowFunctionCodeResponse { + this['code_type'] = codeType; + return this; + } + public set codeType(codeType: ShowFunctionCodeResponseCodeTypeEnum | undefined) { + this['code_type'] = codeType; + } + public get codeType() { + return this['code_type']; + } + public withCodeUrl(codeUrl: string): ShowFunctionCodeResponse { + this['code_url'] = codeUrl; + return this; + } + public set codeUrl(codeUrl: string | undefined) { + this['code_url'] = codeUrl; + } + public get codeUrl() { + return this['code_url']; + } + public withCodeFilename(codeFilename: string): ShowFunctionCodeResponse { + this['code_filename'] = codeFilename; + return this; + } + public set codeFilename(codeFilename: string | undefined) { + this['code_filename'] = codeFilename; + } + public get codeFilename() { + return this['code_filename']; + } + public withCodeSize(codeSize: number): ShowFunctionCodeResponse { + this['code_size'] = codeSize; + return this; + } + public set codeSize(codeSize: number | undefined) { + this['code_size'] = codeSize; + } + public get codeSize() { + return this['code_size']; + } + public withDigest(digest: string): ShowFunctionCodeResponse { + this['digest'] = digest; + return this; + } + public withLastModified(lastModified: Date): ShowFunctionCodeResponse { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: Date | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } + public withFuncCode(funcCode: FuncCode): ShowFunctionCodeResponse { + this['func_code'] = funcCode; + return this; + } + public set funcCode(funcCode: FuncCode | undefined) { + this['func_code'] = funcCode; + } + public get funcCode() { + return this['func_code']; + } + public withDependList(dependList: Array): ShowFunctionCodeResponse { + this['depend_list'] = dependList; + return this; + } + public set dependList(dependList: Array | undefined) { + this['depend_list'] = dependList; + } + public get dependList() { + return this['depend_list']; + } + public withStrategyConfig(strategyConfig: StrategyConfig): ShowFunctionCodeResponse { + this['strategy_config'] = strategyConfig; + return this; + } + public set strategyConfig(strategyConfig: StrategyConfig | undefined) { + this['strategy_config'] = strategyConfig; + } + public get strategyConfig() { + return this['strategy_config']; + } + public withDependencies(dependencies: Array): ShowFunctionCodeResponse { + this['dependencies'] = dependencies; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ShowFunctionCodeResponseRuntimeEnum { + PYTHON2_7 = 'Python2.7', + PYTHON3_6 = 'Python3.6', + GO1_8 = 'Go1.8', + JAVA8 = 'Java8', + NODE_JS6_10 = 'Node.js6.10', + NODE_JS8_10 = 'Node.js8.10', + C__NET_CORE_2_0 = 'C#(.NET Core 2.0)', + C__NET_CORE_2_1 = 'C#(.NET Core 2.1)', + C__NET_CORE_3_1 = 'C#(.NET Core 3.1)', + CUSTOM = 'Custom', + PHP7_3 = 'PHP7.3' +} +/** + * @export + * @enum {string} + */ +export enum ShowFunctionCodeResponseCodeTypeEnum { + INLINE = 'inline', + ZIP = 'zip', + OBS = 'obs', + JAR = 'jar' +} diff --git a/services/functiongraph/v2/model/ShowFunctionConfigRequest.ts b/services/functiongraph/v2/model/ShowFunctionConfigRequest.ts new file mode 100644 index 000000000..ef78ad47c --- /dev/null +++ b/services/functiongraph/v2/model/ShowFunctionConfigRequest.ts @@ -0,0 +1,18 @@ + + +export class ShowFunctionConfigRequest { + private 'function_urn': string | undefined; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): ShowFunctionConfigRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ShowFunctionConfigResponse.ts b/services/functiongraph/v2/model/ShowFunctionConfigResponse.ts new file mode 100644 index 000000000..5095d4e32 --- /dev/null +++ b/services/functiongraph/v2/model/ShowFunctionConfigResponse.ts @@ -0,0 +1,389 @@ +import { Dependency } from './Dependency'; +import { FuncVpc } from './FuncVpc'; +import { MountConfig } from './MountConfig'; +import { StrategyConfig } from './StrategyConfig'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowFunctionConfigResponse extends SdkResponse { + private 'func_urn'?: string | undefined; + private 'func_name'?: string | undefined; + private 'domain_id'?: string | undefined; + public namespace?: string; + private 'project_name'?: string | undefined; + private 'package'?: string | undefined; + public runtime?: ShowFunctionConfigResponseRuntimeEnum; + public timeout?: number; + public handler?: string; + private 'memory_size'?: number | undefined; + public cpu?: number; + private 'code_type'?: ShowFunctionConfigResponseCodeTypeEnum | undefined; + private 'code_url'?: string | undefined; + private 'code_filename'?: string | undefined; + private 'code_size'?: number | undefined; + private 'user_data'?: string | undefined; + private 'encrypted_user_data'?: string | undefined; + public digest?: string; + public version?: string; + private 'image_name'?: string | undefined; + public xrole?: string; + private 'app_xrole'?: string | undefined; + public description?: string; + private 'last_modified'?: Date | undefined; + private 'func_vpc'?: FuncVpc | undefined; + private 'mount_config'?: MountConfig | undefined; + private 'depend_list'?: Array | undefined; + private 'strategy_config'?: StrategyConfig | undefined; + private 'extend_config'?: string | undefined; + public dependencies?: Array; + private 'initializer_handler'?: string | undefined; + private 'initializer_timeout'?: number | undefined; + private 'enterprise_project_id'?: string | undefined; + private 'long_time'?: boolean | undefined; + private 'log_group_id'?: string | undefined; + private 'log_stream_id'?: string | undefined; + public type?: ShowFunctionConfigResponseTypeEnum; + public constructor() { + super(); + } + public withFuncUrn(funcUrn: string): ShowFunctionConfigResponse { + this['func_urn'] = funcUrn; + return this; + } + public set funcUrn(funcUrn: string | undefined) { + this['func_urn'] = funcUrn; + } + public get funcUrn() { + return this['func_urn']; + } + public withFuncName(funcName: string): ShowFunctionConfigResponse { + this['func_name'] = funcName; + return this; + } + public set funcName(funcName: string | undefined) { + this['func_name'] = funcName; + } + public get funcName() { + return this['func_name']; + } + public withDomainId(domainId: string): ShowFunctionConfigResponse { + this['domain_id'] = domainId; + return this; + } + public set domainId(domainId: string | undefined) { + this['domain_id'] = domainId; + } + public get domainId() { + return this['domain_id']; + } + public withNamespace(namespace: string): ShowFunctionConfigResponse { + this['namespace'] = namespace; + return this; + } + public withProjectName(projectName: string): ShowFunctionConfigResponse { + this['project_name'] = projectName; + return this; + } + public set projectName(projectName: string | undefined) { + this['project_name'] = projectName; + } + public get projectName() { + return this['project_name']; + } + public withPackage(_package: string): ShowFunctionConfigResponse { + this['package'] = _package; + return this; + } + public set _package(_package: string | undefined) { + this['package'] = _package; + } + public get _package() { + return this['package']; + } + public withRuntime(runtime: ShowFunctionConfigResponseRuntimeEnum): ShowFunctionConfigResponse { + this['runtime'] = runtime; + return this; + } + public withTimeout(timeout: number): ShowFunctionConfigResponse { + this['timeout'] = timeout; + return this; + } + public withHandler(handler: string): ShowFunctionConfigResponse { + this['handler'] = handler; + return this; + } + public withMemorySize(memorySize: number): ShowFunctionConfigResponse { + this['memory_size'] = memorySize; + return this; + } + public set memorySize(memorySize: number | undefined) { + this['memory_size'] = memorySize; + } + public get memorySize() { + return this['memory_size']; + } + public withCpu(cpu: number): ShowFunctionConfigResponse { + this['cpu'] = cpu; + return this; + } + public withCodeType(codeType: ShowFunctionConfigResponseCodeTypeEnum): ShowFunctionConfigResponse { + this['code_type'] = codeType; + return this; + } + public set codeType(codeType: ShowFunctionConfigResponseCodeTypeEnum | undefined) { + this['code_type'] = codeType; + } + public get codeType() { + return this['code_type']; + } + public withCodeUrl(codeUrl: string): ShowFunctionConfigResponse { + this['code_url'] = codeUrl; + return this; + } + public set codeUrl(codeUrl: string | undefined) { + this['code_url'] = codeUrl; + } + public get codeUrl() { + return this['code_url']; + } + public withCodeFilename(codeFilename: string): ShowFunctionConfigResponse { + this['code_filename'] = codeFilename; + return this; + } + public set codeFilename(codeFilename: string | undefined) { + this['code_filename'] = codeFilename; + } + public get codeFilename() { + return this['code_filename']; + } + public withCodeSize(codeSize: number): ShowFunctionConfigResponse { + this['code_size'] = codeSize; + return this; + } + public set codeSize(codeSize: number | undefined) { + this['code_size'] = codeSize; + } + public get codeSize() { + return this['code_size']; + } + public withUserData(userData: string): ShowFunctionConfigResponse { + this['user_data'] = userData; + return this; + } + public set userData(userData: string | undefined) { + this['user_data'] = userData; + } + public get userData() { + return this['user_data']; + } + public withEncryptedUserData(encryptedUserData: string): ShowFunctionConfigResponse { + this['encrypted_user_data'] = encryptedUserData; + return this; + } + public set encryptedUserData(encryptedUserData: string | undefined) { + this['encrypted_user_data'] = encryptedUserData; + } + public get encryptedUserData() { + return this['encrypted_user_data']; + } + public withDigest(digest: string): ShowFunctionConfigResponse { + this['digest'] = digest; + return this; + } + public withVersion(version: string): ShowFunctionConfigResponse { + this['version'] = version; + return this; + } + public withImageName(imageName: string): ShowFunctionConfigResponse { + this['image_name'] = imageName; + return this; + } + public set imageName(imageName: string | undefined) { + this['image_name'] = imageName; + } + public get imageName() { + return this['image_name']; + } + public withXrole(xrole: string): ShowFunctionConfigResponse { + this['xrole'] = xrole; + return this; + } + public withAppXrole(appXrole: string): ShowFunctionConfigResponse { + this['app_xrole'] = appXrole; + return this; + } + public set appXrole(appXrole: string | undefined) { + this['app_xrole'] = appXrole; + } + public get appXrole() { + return this['app_xrole']; + } + public withDescription(description: string): ShowFunctionConfigResponse { + this['description'] = description; + return this; + } + public withLastModified(lastModified: Date): ShowFunctionConfigResponse { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: Date | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } + public withFuncVpc(funcVpc: FuncVpc): ShowFunctionConfigResponse { + this['func_vpc'] = funcVpc; + return this; + } + public set funcVpc(funcVpc: FuncVpc | undefined) { + this['func_vpc'] = funcVpc; + } + public get funcVpc() { + return this['func_vpc']; + } + public withMountConfig(mountConfig: MountConfig): ShowFunctionConfigResponse { + this['mount_config'] = mountConfig; + return this; + } + public set mountConfig(mountConfig: MountConfig | undefined) { + this['mount_config'] = mountConfig; + } + public get mountConfig() { + return this['mount_config']; + } + public withDependList(dependList: Array): ShowFunctionConfigResponse { + this['depend_list'] = dependList; + return this; + } + public set dependList(dependList: Array | undefined) { + this['depend_list'] = dependList; + } + public get dependList() { + return this['depend_list']; + } + public withStrategyConfig(strategyConfig: StrategyConfig): ShowFunctionConfigResponse { + this['strategy_config'] = strategyConfig; + return this; + } + public set strategyConfig(strategyConfig: StrategyConfig | undefined) { + this['strategy_config'] = strategyConfig; + } + public get strategyConfig() { + return this['strategy_config']; + } + public withExtendConfig(extendConfig: string): ShowFunctionConfigResponse { + this['extend_config'] = extendConfig; + return this; + } + public set extendConfig(extendConfig: string | undefined) { + this['extend_config'] = extendConfig; + } + public get extendConfig() { + return this['extend_config']; + } + public withDependencies(dependencies: Array): ShowFunctionConfigResponse { + this['dependencies'] = dependencies; + return this; + } + public withInitializerHandler(initializerHandler: string): ShowFunctionConfigResponse { + this['initializer_handler'] = initializerHandler; + return this; + } + public set initializerHandler(initializerHandler: string | undefined) { + this['initializer_handler'] = initializerHandler; + } + public get initializerHandler() { + return this['initializer_handler']; + } + public withInitializerTimeout(initializerTimeout: number): ShowFunctionConfigResponse { + this['initializer_timeout'] = initializerTimeout; + return this; + } + public set initializerTimeout(initializerTimeout: number | undefined) { + this['initializer_timeout'] = initializerTimeout; + } + public get initializerTimeout() { + return this['initializer_timeout']; + } + public withEnterpriseProjectId(enterpriseProjectId: string): ShowFunctionConfigResponse { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId() { + return this['enterprise_project_id']; + } + public withLongTime(longTime: boolean): ShowFunctionConfigResponse { + this['long_time'] = longTime; + return this; + } + public set longTime(longTime: boolean | undefined) { + this['long_time'] = longTime; + } + public get longTime() { + return this['long_time']; + } + public withLogGroupId(logGroupId: string): ShowFunctionConfigResponse { + this['log_group_id'] = logGroupId; + return this; + } + public set logGroupId(logGroupId: string | undefined) { + this['log_group_id'] = logGroupId; + } + public get logGroupId() { + return this['log_group_id']; + } + public withLogStreamId(logStreamId: string): ShowFunctionConfigResponse { + this['log_stream_id'] = logStreamId; + return this; + } + public set logStreamId(logStreamId: string | undefined) { + this['log_stream_id'] = logStreamId; + } + public get logStreamId() { + return this['log_stream_id']; + } + public withType(type: ShowFunctionConfigResponseTypeEnum): ShowFunctionConfigResponse { + this['type'] = type; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ShowFunctionConfigResponseRuntimeEnum { + PYTHON2_7 = 'Python2.7', + PYTHON3_6 = 'Python3.6', + GO1_8 = 'Go1.8', + JAVA8 = 'Java8', + NODE_JS6_10 = 'Node.js6.10', + NODE_JS8_10 = 'Node.js8.10', + C__NET_CORE_2_0 = 'C#(.NET Core 2.0)', + C__NET_CORE_2_1 = 'C#(.NET Core 2.1)', + C__NET_CORE_3_1 = 'C#(.NET Core 3.1)', + CUSTOM = 'Custom', + PHP7_3 = 'PHP7.3' +} +/** + * @export + * @enum {string} + */ +export enum ShowFunctionConfigResponseCodeTypeEnum { + INLINE = 'inline', + ZIP = 'zip', + OBS = 'obs', + JAR = 'jar' +} +/** + * @export + * @enum {string} + */ +export enum ShowFunctionConfigResponseTypeEnum { + V1 = 'v1', + V2 = 'v2' +} diff --git a/services/functiongraph/v2/model/ShowFunctionTriggerRequest.ts b/services/functiongraph/v2/model/ShowFunctionTriggerRequest.ts new file mode 100644 index 000000000..16fc6b79d --- /dev/null +++ b/services/functiongraph/v2/model/ShowFunctionTriggerRequest.ts @@ -0,0 +1,59 @@ + + +export class ShowFunctionTriggerRequest { + private 'function_urn': string | undefined; + private 'trigger_type_code': ShowFunctionTriggerRequestTriggerTypeCodeEnum | undefined; + private 'trigger_id': string | undefined; + public constructor(functionUrn?: any, triggerTypeCode?: any, triggerId?: any) { + this['function_urn'] = functionUrn; + this['trigger_type_code'] = triggerTypeCode; + this['trigger_id'] = triggerId; + } + public withFunctionUrn(functionUrn: string): ShowFunctionTriggerRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withTriggerTypeCode(triggerTypeCode: ShowFunctionTriggerRequestTriggerTypeCodeEnum): ShowFunctionTriggerRequest { + this['trigger_type_code'] = triggerTypeCode; + return this; + } + public set triggerTypeCode(triggerTypeCode: ShowFunctionTriggerRequestTriggerTypeCodeEnum | undefined) { + this['trigger_type_code'] = triggerTypeCode; + } + public get triggerTypeCode() { + return this['trigger_type_code']; + } + public withTriggerId(triggerId: string): ShowFunctionTriggerRequest { + this['trigger_id'] = triggerId; + return this; + } + public set triggerId(triggerId: string | undefined) { + this['trigger_id'] = triggerId; + } + public get triggerId() { + return this['trigger_id']; + } +} + +/** + * @export + * @enum {string} + */ +export enum ShowFunctionTriggerRequestTriggerTypeCodeEnum { + TIMER = 'TIMER', + APIG = 'APIG', + CTS = 'CTS', + DDS = 'DDS', + DMS = 'DMS', + DIS = 'DIS', + LTS = 'LTS', + OBS = 'OBS', + SMN = 'SMN', + KAFKA = 'KAFKA' +} diff --git a/services/functiongraph/v2/model/ShowFunctionTriggerResponse.ts b/services/functiongraph/v2/model/ShowFunctionTriggerResponse.ts new file mode 100644 index 000000000..580cc61d2 --- /dev/null +++ b/services/functiongraph/v2/model/ShowFunctionTriggerResponse.ts @@ -0,0 +1,99 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowFunctionTriggerResponse extends SdkResponse { + private 'trigger_id'?: string | undefined; + private 'trigger_type_code'?: ShowFunctionTriggerResponseTriggerTypeCodeEnum | undefined; + private 'trigger_status'?: ShowFunctionTriggerResponseTriggerStatusEnum | undefined; + private 'event_data'?: object | undefined; + private 'last_updated_time'?: Date | undefined; + private 'created_time'?: Date | undefined; + public constructor() { + super(); + } + public withTriggerId(triggerId: string): ShowFunctionTriggerResponse { + this['trigger_id'] = triggerId; + return this; + } + public set triggerId(triggerId: string | undefined) { + this['trigger_id'] = triggerId; + } + public get triggerId() { + return this['trigger_id']; + } + public withTriggerTypeCode(triggerTypeCode: ShowFunctionTriggerResponseTriggerTypeCodeEnum): ShowFunctionTriggerResponse { + this['trigger_type_code'] = triggerTypeCode; + return this; + } + public set triggerTypeCode(triggerTypeCode: ShowFunctionTriggerResponseTriggerTypeCodeEnum | undefined) { + this['trigger_type_code'] = triggerTypeCode; + } + public get triggerTypeCode() { + return this['trigger_type_code']; + } + public withTriggerStatus(triggerStatus: ShowFunctionTriggerResponseTriggerStatusEnum): ShowFunctionTriggerResponse { + this['trigger_status'] = triggerStatus; + return this; + } + public set triggerStatus(triggerStatus: ShowFunctionTriggerResponseTriggerStatusEnum | undefined) { + this['trigger_status'] = triggerStatus; + } + public get triggerStatus() { + return this['trigger_status']; + } + public withEventData(eventData: object): ShowFunctionTriggerResponse { + this['event_data'] = eventData; + return this; + } + public set eventData(eventData: object | undefined) { + this['event_data'] = eventData; + } + public get eventData() { + return this['event_data']; + } + public withLastUpdatedTime(lastUpdatedTime: Date): ShowFunctionTriggerResponse { + this['last_updated_time'] = lastUpdatedTime; + return this; + } + public set lastUpdatedTime(lastUpdatedTime: Date | undefined) { + this['last_updated_time'] = lastUpdatedTime; + } + public get lastUpdatedTime() { + return this['last_updated_time']; + } + public withCreatedTime(createdTime: Date): ShowFunctionTriggerResponse { + this['created_time'] = createdTime; + return this; + } + public set createdTime(createdTime: Date | undefined) { + this['created_time'] = createdTime; + } + public get createdTime() { + return this['created_time']; + } +} + +/** + * @export + * @enum {string} + */ +export enum ShowFunctionTriggerResponseTriggerTypeCodeEnum { + TIMER = 'TIMER', + APIG = 'APIG', + CTS = 'CTS', + DDS = 'DDS', + DMS = 'DMS', + DIS = 'DIS', + LTS = 'LTS', + OBS = 'OBS', + SMN = 'SMN', + KAFKA = 'KAFKA' +} +/** + * @export + * @enum {string} + */ +export enum ShowFunctionTriggerResponseTriggerStatusEnum { + ACTIVE = 'ACTIVE', + DISABLED = 'DISABLED' +} diff --git a/services/functiongraph/v2/model/ShowLtsLogDetailsRequest.ts b/services/functiongraph/v2/model/ShowLtsLogDetailsRequest.ts new file mode 100644 index 000000000..ca0b7cd16 --- /dev/null +++ b/services/functiongraph/v2/model/ShowLtsLogDetailsRequest.ts @@ -0,0 +1,18 @@ + + +export class ShowLtsLogDetailsRequest { + private 'function_urn': string | undefined; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): ShowLtsLogDetailsRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ShowLtsLogDetailsResponse.ts b/services/functiongraph/v2/model/ShowLtsLogDetailsResponse.ts new file mode 100644 index 000000000..99606889b --- /dev/null +++ b/services/functiongraph/v2/model/ShowLtsLogDetailsResponse.ts @@ -0,0 +1,41 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowLtsLogDetailsResponse extends SdkResponse { + private 'group_id'?: string | undefined; + private 'stream_id'?: string | undefined; + private 'stream_name'?: string | undefined; + public constructor() { + super(); + } + public withGroupId(groupId: string): ShowLtsLogDetailsResponse { + this['group_id'] = groupId; + return this; + } + public set groupId(groupId: string | undefined) { + this['group_id'] = groupId; + } + public get groupId() { + return this['group_id']; + } + public withStreamId(streamId: string): ShowLtsLogDetailsResponse { + this['stream_id'] = streamId; + return this; + } + public set streamId(streamId: string | undefined) { + this['stream_id'] = streamId; + } + public get streamId() { + return this['stream_id']; + } + public withStreamName(streamName: string): ShowLtsLogDetailsResponse { + this['stream_name'] = streamName; + return this; + } + public set streamName(streamName: string | undefined) { + this['stream_name'] = streamName; + } + public get streamName() { + return this['stream_name']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ShowVersionAliasRequest.ts b/services/functiongraph/v2/model/ShowVersionAliasRequest.ts new file mode 100644 index 000000000..6227606ee --- /dev/null +++ b/services/functiongraph/v2/model/ShowVersionAliasRequest.ts @@ -0,0 +1,30 @@ + + +export class ShowVersionAliasRequest { + private 'function_urn': string | undefined; + private 'alias_name': string | undefined; + public constructor(functionUrn?: any, aliasName?: any) { + this['function_urn'] = functionUrn; + this['alias_name'] = aliasName; + } + public withFunctionUrn(functionUrn: string): ShowVersionAliasRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withAliasName(aliasName: string): ShowVersionAliasRequest { + this['alias_name'] = aliasName; + return this; + } + public set aliasName(aliasName: string | undefined) { + this['alias_name'] = aliasName; + } + public get aliasName() { + return this['alias_name']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/ShowVersionAliasResponse.ts b/services/functiongraph/v2/model/ShowVersionAliasResponse.ts new file mode 100644 index 000000000..25fbb3a05 --- /dev/null +++ b/services/functiongraph/v2/model/ShowVersionAliasResponse.ts @@ -0,0 +1,56 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowVersionAliasResponse extends SdkResponse { + public name?: string; + public version?: string; + public description?: string; + private 'last_modified'?: Date | undefined; + private 'alias_urn'?: string | undefined; + private 'additional_version_weights'?: { [key: string]: number; } | undefined; + public constructor() { + super(); + } + public withName(name: string): ShowVersionAliasResponse { + this['name'] = name; + return this; + } + public withVersion(version: string): ShowVersionAliasResponse { + this['version'] = version; + return this; + } + public withDescription(description: string): ShowVersionAliasResponse { + this['description'] = description; + return this; + } + public withLastModified(lastModified: Date): ShowVersionAliasResponse { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: Date | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } + public withAliasUrn(aliasUrn: string): ShowVersionAliasResponse { + this['alias_urn'] = aliasUrn; + return this; + } + public set aliasUrn(aliasUrn: string | undefined) { + this['alias_urn'] = aliasUrn; + } + public get aliasUrn() { + return this['alias_urn']; + } + public withAdditionalVersionWeights(additionalVersionWeights: { [key: string]: number; }): ShowVersionAliasResponse { + this['additional_version_weights'] = additionalVersionWeights; + return this; + } + public set additionalVersionWeights(additionalVersionWeights: { [key: string]: number; } | undefined) { + this['additional_version_weights'] = additionalVersionWeights; + } + public get additionalVersionWeights() { + return this['additional_version_weights']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/SlaReportsValue.ts b/services/functiongraph/v2/model/SlaReportsValue.ts new file mode 100644 index 000000000..cef8273f4 --- /dev/null +++ b/services/functiongraph/v2/model/SlaReportsValue.ts @@ -0,0 +1,16 @@ + + +export class SlaReportsValue { + public timestamp?: number; + public value?: number; + public constructor() { + } + public withTimestamp(timestamp: number): SlaReportsValue { + this['timestamp'] = timestamp; + return this; + } + public withValue(value: number): SlaReportsValue { + this['value'] = value; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/StrategyConfig.ts b/services/functiongraph/v2/model/StrategyConfig.ts new file mode 100644 index 000000000..22705d4de --- /dev/null +++ b/services/functiongraph/v2/model/StrategyConfig.ts @@ -0,0 +1,23 @@ + + +export class StrategyConfig { + public concurrency: number; + private 'concurrent_num'?: number | undefined; + public constructor(concurrency?: any) { + this['concurrency'] = concurrency; + } + public withConcurrency(concurrency: number): StrategyConfig { + this['concurrency'] = concurrency; + return this; + } + public withConcurrentNum(concurrentNum: number): StrategyConfig { + this['concurrent_num'] = concurrentNum; + return this; + } + public set concurrentNum(concurrentNum: number | undefined) { + this['concurrent_num'] = concurrentNum; + } + public get concurrentNum() { + return this['concurrent_num']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateDependencyRequest.ts b/services/functiongraph/v2/model/UpdateDependencyRequest.ts new file mode 100644 index 000000000..20c92bf1f --- /dev/null +++ b/services/functiongraph/v2/model/UpdateDependencyRequest.ts @@ -0,0 +1,24 @@ +import { UpdateDependencyRequestBody } from './UpdateDependencyRequestBody'; + + +export class UpdateDependencyRequest { + private 'depend_id': string | undefined; + public body?: UpdateDependencyRequestBody; + public constructor(dependId?: any) { + this['depend_id'] = dependId; + } + public withDependId(dependId: string): UpdateDependencyRequest { + this['depend_id'] = dependId; + return this; + } + public set dependId(dependId: string | undefined) { + this['depend_id'] = dependId; + } + public get dependId() { + return this['depend_id']; + } + public withBody(body: UpdateDependencyRequestBody): UpdateDependencyRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateDependencyRequestBody.ts b/services/functiongraph/v2/model/UpdateDependencyRequestBody.ts new file mode 100644 index 000000000..d1c090f2c --- /dev/null +++ b/services/functiongraph/v2/model/UpdateDependencyRequestBody.ts @@ -0,0 +1,75 @@ + + +export class UpdateDependencyRequestBody { + private 'depend_file'?: string | undefined; + private 'depend_link'?: string | undefined; + private 'depend_type': string | undefined; + public runtime: UpdateDependencyRequestBodyRuntimeEnum; + public name?: string; + public description?: string; + public constructor(dependType?: any, runtime?: any) { + this['depend_type'] = dependType; + this['runtime'] = runtime; + } + public withDependFile(dependFile: string): UpdateDependencyRequestBody { + this['depend_file'] = dependFile; + return this; + } + public set dependFile(dependFile: string | undefined) { + this['depend_file'] = dependFile; + } + public get dependFile() { + return this['depend_file']; + } + public withDependLink(dependLink: string): UpdateDependencyRequestBody { + this['depend_link'] = dependLink; + return this; + } + public set dependLink(dependLink: string | undefined) { + this['depend_link'] = dependLink; + } + public get dependLink() { + return this['depend_link']; + } + public withDependType(dependType: string): UpdateDependencyRequestBody { + this['depend_type'] = dependType; + return this; + } + public set dependType(dependType: string | undefined) { + this['depend_type'] = dependType; + } + public get dependType() { + return this['depend_type']; + } + public withRuntime(runtime: UpdateDependencyRequestBodyRuntimeEnum): UpdateDependencyRequestBody { + this['runtime'] = runtime; + return this; + } + public withName(name: string): UpdateDependencyRequestBody { + this['name'] = name; + return this; + } + public withDescription(description: string): UpdateDependencyRequestBody { + this['description'] = description; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum UpdateDependencyRequestBodyRuntimeEnum { + JAVA_8 = 'Java 8', + NODE_JS_6_10 = 'Node.js 6.10', + NODE_JS_8_10 = 'Node.js 8.10', + NODE_JS_10_16 = 'Node.js 10.16', + NODE_JS_12_13 = 'Node.js 12.13', + PYTHON_2_7 = 'Python 2.7', + PYTHON_3_6 = 'Python 3.6', + GO_1_8 = 'Go 1.8', + C__NET_CORE_2_0 = 'C#(.NET Core 2.0)', + C__NET_CORE_2_1 = 'C#(.NET Core 2.1)', + C__NET_CORE_3_1 = 'C#(.NET Core 3.1)', + PHP_7_3 = 'PHP 7.3' +} diff --git a/services/functiongraph/v2/model/UpdateDependencyResponse.ts b/services/functiongraph/v2/model/UpdateDependencyResponse.ts new file mode 100644 index 000000000..14fde938a --- /dev/null +++ b/services/functiongraph/v2/model/UpdateDependencyResponse.ts @@ -0,0 +1,59 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class UpdateDependencyResponse extends SdkResponse { + public id?: string; + public owner?: string; + public link?: string; + public runtime?: string; + public etag?: string; + public size?: number; + public name?: string; + public description?: string; + private 'file_name'?: string | undefined; + public constructor() { + super(); + } + public withId(id: string): UpdateDependencyResponse { + this['id'] = id; + return this; + } + public withOwner(owner: string): UpdateDependencyResponse { + this['owner'] = owner; + return this; + } + public withLink(link: string): UpdateDependencyResponse { + this['link'] = link; + return this; + } + public withRuntime(runtime: string): UpdateDependencyResponse { + this['runtime'] = runtime; + return this; + } + public withEtag(etag: string): UpdateDependencyResponse { + this['etag'] = etag; + return this; + } + public withSize(size: number): UpdateDependencyResponse { + this['size'] = size; + return this; + } + public withName(name: string): UpdateDependencyResponse { + this['name'] = name; + return this; + } + public withDescription(description: string): UpdateDependencyResponse { + this['description'] = description; + return this; + } + public withFileName(fileName: string): UpdateDependencyResponse { + this['file_name'] = fileName; + return this; + } + public set fileName(fileName: string | undefined) { + this['file_name'] = fileName; + } + public get fileName() { + return this['file_name']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateEventRequest.ts b/services/functiongraph/v2/model/UpdateEventRequest.ts new file mode 100644 index 000000000..27fc150d6 --- /dev/null +++ b/services/functiongraph/v2/model/UpdateEventRequest.ts @@ -0,0 +1,36 @@ +import { UpdateEventRequestBody } from './UpdateEventRequestBody'; + + +export class UpdateEventRequest { + private 'event_id': string | undefined; + private 'function_urn': string | undefined; + public body?: UpdateEventRequestBody; + public constructor(eventId?: any, functionUrn?: any) { + this['event_id'] = eventId; + this['function_urn'] = functionUrn; + } + public withEventId(eventId: string): UpdateEventRequest { + this['event_id'] = eventId; + return this; + } + public set eventId(eventId: string | undefined) { + this['event_id'] = eventId; + } + public get eventId() { + return this['event_id']; + } + public withFunctionUrn(functionUrn: string): UpdateEventRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withBody(body: UpdateEventRequestBody): UpdateEventRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateEventRequestBody.ts b/services/functiongraph/v2/model/UpdateEventRequestBody.ts new file mode 100644 index 000000000..31961737d --- /dev/null +++ b/services/functiongraph/v2/model/UpdateEventRequestBody.ts @@ -0,0 +1,11 @@ + + +export class UpdateEventRequestBody { + public content?: string; + public constructor() { + } + public withContent(content: string): UpdateEventRequestBody { + this['content'] = content; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateEventResponse.ts b/services/functiongraph/v2/model/UpdateEventResponse.ts new file mode 100644 index 000000000..5de10c717 --- /dev/null +++ b/services/functiongraph/v2/model/UpdateEventResponse.ts @@ -0,0 +1,34 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class UpdateEventResponse extends SdkResponse { + public id?: string; + public name?: string; + public content?: string; + private 'last_modified'?: number | undefined; + public constructor() { + super(); + } + public withId(id: string): UpdateEventResponse { + this['id'] = id; + return this; + } + public withName(name: string): UpdateEventResponse { + this['name'] = name; + return this; + } + public withContent(content: string): UpdateEventResponse { + this['content'] = content; + return this; + } + public withLastModified(lastModified: number): UpdateEventResponse { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: number | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateFunctionAsyncInvokeConfigRequest.ts b/services/functiongraph/v2/model/UpdateFunctionAsyncInvokeConfigRequest.ts new file mode 100644 index 000000000..c1df0a2bc --- /dev/null +++ b/services/functiongraph/v2/model/UpdateFunctionAsyncInvokeConfigRequest.ts @@ -0,0 +1,24 @@ +import { UpdateFunctionAsyncInvokeConfigRequestBody } from './UpdateFunctionAsyncInvokeConfigRequestBody'; + + +export class UpdateFunctionAsyncInvokeConfigRequest { + private 'function_urn': string | undefined; + public body?: UpdateFunctionAsyncInvokeConfigRequestBody; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): UpdateFunctionAsyncInvokeConfigRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withBody(body: UpdateFunctionAsyncInvokeConfigRequestBody): UpdateFunctionAsyncInvokeConfigRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateFunctionAsyncInvokeConfigRequestBody.ts b/services/functiongraph/v2/model/UpdateFunctionAsyncInvokeConfigRequestBody.ts new file mode 100644 index 000000000..26a1ea968 --- /dev/null +++ b/services/functiongraph/v2/model/UpdateFunctionAsyncInvokeConfigRequestBody.ts @@ -0,0 +1,40 @@ +import { FuncAsyncDestinationConfig } from './FuncAsyncDestinationConfig'; + + +export class UpdateFunctionAsyncInvokeConfigRequestBody { + private 'max_async_event_age_in_seconds'?: number | undefined; + private 'max_async_retry_attempts'?: number | undefined; + private 'destination_config'?: FuncAsyncDestinationConfig | undefined; + public constructor() { + } + public withMaxAsyncEventAgeInSeconds(maxAsyncEventAgeInSeconds: number): UpdateFunctionAsyncInvokeConfigRequestBody { + this['max_async_event_age_in_seconds'] = maxAsyncEventAgeInSeconds; + return this; + } + public set maxAsyncEventAgeInSeconds(maxAsyncEventAgeInSeconds: number | undefined) { + this['max_async_event_age_in_seconds'] = maxAsyncEventAgeInSeconds; + } + public get maxAsyncEventAgeInSeconds() { + return this['max_async_event_age_in_seconds']; + } + public withMaxAsyncRetryAttempts(maxAsyncRetryAttempts: number): UpdateFunctionAsyncInvokeConfigRequestBody { + this['max_async_retry_attempts'] = maxAsyncRetryAttempts; + return this; + } + public set maxAsyncRetryAttempts(maxAsyncRetryAttempts: number | undefined) { + this['max_async_retry_attempts'] = maxAsyncRetryAttempts; + } + public get maxAsyncRetryAttempts() { + return this['max_async_retry_attempts']; + } + public withDestinationConfig(destinationConfig: FuncAsyncDestinationConfig): UpdateFunctionAsyncInvokeConfigRequestBody { + this['destination_config'] = destinationConfig; + return this; + } + public set destinationConfig(destinationConfig: FuncAsyncDestinationConfig | undefined) { + this['destination_config'] = destinationConfig; + } + public get destinationConfig() { + return this['destination_config']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateFunctionAsyncInvokeConfigResponse.ts b/services/functiongraph/v2/model/UpdateFunctionAsyncInvokeConfigResponse.ts new file mode 100644 index 000000000..d087f9a1c --- /dev/null +++ b/services/functiongraph/v2/model/UpdateFunctionAsyncInvokeConfigResponse.ts @@ -0,0 +1,75 @@ +import { FuncAsyncDestinationConfig } from './FuncAsyncDestinationConfig'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class UpdateFunctionAsyncInvokeConfigResponse extends SdkResponse { + private 'func_urn'?: string | undefined; + private 'max_async_event_age_in_seconds'?: number | undefined; + private 'max_async_retry_attempts'?: number | undefined; + private 'destination_config'?: FuncAsyncDestinationConfig | undefined; + private 'created_time'?: string | undefined; + private 'last_modified'?: string | undefined; + public constructor() { + super(); + } + public withFuncUrn(funcUrn: string): UpdateFunctionAsyncInvokeConfigResponse { + this['func_urn'] = funcUrn; + return this; + } + public set funcUrn(funcUrn: string | undefined) { + this['func_urn'] = funcUrn; + } + public get funcUrn() { + return this['func_urn']; + } + public withMaxAsyncEventAgeInSeconds(maxAsyncEventAgeInSeconds: number): UpdateFunctionAsyncInvokeConfigResponse { + this['max_async_event_age_in_seconds'] = maxAsyncEventAgeInSeconds; + return this; + } + public set maxAsyncEventAgeInSeconds(maxAsyncEventAgeInSeconds: number | undefined) { + this['max_async_event_age_in_seconds'] = maxAsyncEventAgeInSeconds; + } + public get maxAsyncEventAgeInSeconds() { + return this['max_async_event_age_in_seconds']; + } + public withMaxAsyncRetryAttempts(maxAsyncRetryAttempts: number): UpdateFunctionAsyncInvokeConfigResponse { + this['max_async_retry_attempts'] = maxAsyncRetryAttempts; + return this; + } + public set maxAsyncRetryAttempts(maxAsyncRetryAttempts: number | undefined) { + this['max_async_retry_attempts'] = maxAsyncRetryAttempts; + } + public get maxAsyncRetryAttempts() { + return this['max_async_retry_attempts']; + } + public withDestinationConfig(destinationConfig: FuncAsyncDestinationConfig): UpdateFunctionAsyncInvokeConfigResponse { + this['destination_config'] = destinationConfig; + return this; + } + public set destinationConfig(destinationConfig: FuncAsyncDestinationConfig | undefined) { + this['destination_config'] = destinationConfig; + } + public get destinationConfig() { + return this['destination_config']; + } + public withCreatedTime(createdTime: string): UpdateFunctionAsyncInvokeConfigResponse { + this['created_time'] = createdTime; + return this; + } + public set createdTime(createdTime: string | undefined) { + this['created_time'] = createdTime; + } + public get createdTime() { + return this['created_time']; + } + public withLastModified(lastModified: string): UpdateFunctionAsyncInvokeConfigResponse { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: string | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateFunctionCodeRequest.ts b/services/functiongraph/v2/model/UpdateFunctionCodeRequest.ts new file mode 100644 index 000000000..846a91c75 --- /dev/null +++ b/services/functiongraph/v2/model/UpdateFunctionCodeRequest.ts @@ -0,0 +1,24 @@ +import { UpdateFunctionCodeRequestBody } from './UpdateFunctionCodeRequestBody'; + + +export class UpdateFunctionCodeRequest { + private 'function_urn': string | undefined; + public body?: UpdateFunctionCodeRequestBody; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): UpdateFunctionCodeRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withBody(body: UpdateFunctionCodeRequestBody): UpdateFunctionCodeRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateFunctionCodeRequestBody.ts b/services/functiongraph/v2/model/UpdateFunctionCodeRequestBody.ts new file mode 100644 index 000000000..5936f85f0 --- /dev/null +++ b/services/functiongraph/v2/model/UpdateFunctionCodeRequestBody.ts @@ -0,0 +1,75 @@ +import { FuncCode } from './FuncCode'; + + +export class UpdateFunctionCodeRequestBody { + private 'code_type': UpdateFunctionCodeRequestBodyCodeTypeEnum | undefined; + private 'code_url'?: string | undefined; + private 'code_filename'?: string | undefined; + private 'func_code': FuncCode | undefined; + private 'depend_list'?: Array | undefined; + public constructor(codeType?: any, funcCode?: any) { + this['code_type'] = codeType; + this['func_code'] = funcCode; + } + public withCodeType(codeType: UpdateFunctionCodeRequestBodyCodeTypeEnum): UpdateFunctionCodeRequestBody { + this['code_type'] = codeType; + return this; + } + public set codeType(codeType: UpdateFunctionCodeRequestBodyCodeTypeEnum | undefined) { + this['code_type'] = codeType; + } + public get codeType() { + return this['code_type']; + } + public withCodeUrl(codeUrl: string): UpdateFunctionCodeRequestBody { + this['code_url'] = codeUrl; + return this; + } + public set codeUrl(codeUrl: string | undefined) { + this['code_url'] = codeUrl; + } + public get codeUrl() { + return this['code_url']; + } + public withCodeFilename(codeFilename: string): UpdateFunctionCodeRequestBody { + this['code_filename'] = codeFilename; + return this; + } + public set codeFilename(codeFilename: string | undefined) { + this['code_filename'] = codeFilename; + } + public get codeFilename() { + return this['code_filename']; + } + public withFuncCode(funcCode: FuncCode): UpdateFunctionCodeRequestBody { + this['func_code'] = funcCode; + return this; + } + public set funcCode(funcCode: FuncCode | undefined) { + this['func_code'] = funcCode; + } + public get funcCode() { + return this['func_code']; + } + public withDependList(dependList: Array): UpdateFunctionCodeRequestBody { + this['depend_list'] = dependList; + return this; + } + public set dependList(dependList: Array | undefined) { + this['depend_list'] = dependList; + } + public get dependList() { + return this['depend_list']; + } +} + +/** + * @export + * @enum {string} + */ +export enum UpdateFunctionCodeRequestBodyCodeTypeEnum { + INLINE = 'inline', + ZIP = 'zip', + OBS = 'obs', + JAR = 'jar' +} diff --git a/services/functiongraph/v2/model/UpdateFunctionCodeResponse.ts b/services/functiongraph/v2/model/UpdateFunctionCodeResponse.ts new file mode 100644 index 000000000..9aafd151b --- /dev/null +++ b/services/functiongraph/v2/model/UpdateFunctionCodeResponse.ts @@ -0,0 +1,175 @@ +import { Dependency } from './Dependency'; +import { FuncCode } from './FuncCode'; +import { StrategyConfig } from './StrategyConfig'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class UpdateFunctionCodeResponse extends SdkResponse { + private 'func_urn'?: string | undefined; + private 'func_name'?: string | undefined; + private 'domain_id'?: string | undefined; + public runtime?: UpdateFunctionCodeResponseRuntimeEnum; + private 'code_type'?: UpdateFunctionCodeResponseCodeTypeEnum | undefined; + private 'code_url'?: string | undefined; + private 'code_filename'?: string | undefined; + private 'code_size'?: number | undefined; + public digest?: string; + private 'last_modified'?: Date | undefined; + private 'func_code'?: FuncCode | undefined; + private 'depend_list'?: Array | undefined; + private 'strategy_config'?: StrategyConfig | undefined; + public dependencies?: Array; + public constructor() { + super(); + } + public withFuncUrn(funcUrn: string): UpdateFunctionCodeResponse { + this['func_urn'] = funcUrn; + return this; + } + public set funcUrn(funcUrn: string | undefined) { + this['func_urn'] = funcUrn; + } + public get funcUrn() { + return this['func_urn']; + } + public withFuncName(funcName: string): UpdateFunctionCodeResponse { + this['func_name'] = funcName; + return this; + } + public set funcName(funcName: string | undefined) { + this['func_name'] = funcName; + } + public get funcName() { + return this['func_name']; + } + public withDomainId(domainId: string): UpdateFunctionCodeResponse { + this['domain_id'] = domainId; + return this; + } + public set domainId(domainId: string | undefined) { + this['domain_id'] = domainId; + } + public get domainId() { + return this['domain_id']; + } + public withRuntime(runtime: UpdateFunctionCodeResponseRuntimeEnum): UpdateFunctionCodeResponse { + this['runtime'] = runtime; + return this; + } + public withCodeType(codeType: UpdateFunctionCodeResponseCodeTypeEnum): UpdateFunctionCodeResponse { + this['code_type'] = codeType; + return this; + } + public set codeType(codeType: UpdateFunctionCodeResponseCodeTypeEnum | undefined) { + this['code_type'] = codeType; + } + public get codeType() { + return this['code_type']; + } + public withCodeUrl(codeUrl: string): UpdateFunctionCodeResponse { + this['code_url'] = codeUrl; + return this; + } + public set codeUrl(codeUrl: string | undefined) { + this['code_url'] = codeUrl; + } + public get codeUrl() { + return this['code_url']; + } + public withCodeFilename(codeFilename: string): UpdateFunctionCodeResponse { + this['code_filename'] = codeFilename; + return this; + } + public set codeFilename(codeFilename: string | undefined) { + this['code_filename'] = codeFilename; + } + public get codeFilename() { + return this['code_filename']; + } + public withCodeSize(codeSize: number): UpdateFunctionCodeResponse { + this['code_size'] = codeSize; + return this; + } + public set codeSize(codeSize: number | undefined) { + this['code_size'] = codeSize; + } + public get codeSize() { + return this['code_size']; + } + public withDigest(digest: string): UpdateFunctionCodeResponse { + this['digest'] = digest; + return this; + } + public withLastModified(lastModified: Date): UpdateFunctionCodeResponse { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: Date | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } + public withFuncCode(funcCode: FuncCode): UpdateFunctionCodeResponse { + this['func_code'] = funcCode; + return this; + } + public set funcCode(funcCode: FuncCode | undefined) { + this['func_code'] = funcCode; + } + public get funcCode() { + return this['func_code']; + } + public withDependList(dependList: Array): UpdateFunctionCodeResponse { + this['depend_list'] = dependList; + return this; + } + public set dependList(dependList: Array | undefined) { + this['depend_list'] = dependList; + } + public get dependList() { + return this['depend_list']; + } + public withStrategyConfig(strategyConfig: StrategyConfig): UpdateFunctionCodeResponse { + this['strategy_config'] = strategyConfig; + return this; + } + public set strategyConfig(strategyConfig: StrategyConfig | undefined) { + this['strategy_config'] = strategyConfig; + } + public get strategyConfig() { + return this['strategy_config']; + } + public withDependencies(dependencies: Array): UpdateFunctionCodeResponse { + this['dependencies'] = dependencies; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum UpdateFunctionCodeResponseRuntimeEnum { + PYTHON2_7 = 'Python2.7', + PYTHON3_6 = 'Python3.6', + GO1_8 = 'Go1.8', + JAVA8 = 'Java8', + NODE_JS6_10 = 'Node.js6.10', + NODE_JS8_10 = 'Node.js8.10', + C__NET_CORE_2_0 = 'C#(.NET Core 2.0)', + C__NET_CORE_2_1 = 'C#(.NET Core 2.1)', + C__NET_CORE_3_1 = 'C#(.NET Core 3.1)', + CUSTOM = 'Custom', + PHP7_3 = 'PHP7.3' +} +/** + * @export + * @enum {string} + */ +export enum UpdateFunctionCodeResponseCodeTypeEnum { + INLINE = 'inline', + ZIP = 'zip', + OBS = 'obs', + JAR = 'jar' +} diff --git a/services/functiongraph/v2/model/UpdateFunctionConfigRequest.ts b/services/functiongraph/v2/model/UpdateFunctionConfigRequest.ts new file mode 100644 index 000000000..ab454faf8 --- /dev/null +++ b/services/functiongraph/v2/model/UpdateFunctionConfigRequest.ts @@ -0,0 +1,24 @@ +import { UpdateFunctionConfigRequestBody } from './UpdateFunctionConfigRequestBody'; + + +export class UpdateFunctionConfigRequest { + private 'function_urn': string | undefined; + public body?: UpdateFunctionConfigRequestBody; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): UpdateFunctionConfigRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withBody(body: UpdateFunctionConfigRequestBody): UpdateFunctionConfigRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateFunctionConfigRequestBody.ts b/services/functiongraph/v2/model/UpdateFunctionConfigRequestBody.ts new file mode 100644 index 000000000..072133be5 --- /dev/null +++ b/services/functiongraph/v2/model/UpdateFunctionConfigRequestBody.ts @@ -0,0 +1,177 @@ +import { FuncVpc } from './FuncVpc'; +import { MountConfig } from './MountConfig'; +import { StrategyConfig } from './StrategyConfig'; + + +export class UpdateFunctionConfigRequestBody { + private 'func_name': string | undefined; + public runtime: UpdateFunctionConfigRequestBodyRuntimeEnum; + public timeout: number; + public handler?: string; + private 'memory_size': number | undefined; + private 'user_data'?: string | undefined; + public xrole?: string; + private 'app_xrole'?: string | undefined; + public description?: string; + private 'func_vpc'?: FuncVpc | undefined; + private 'mount_config'?: MountConfig | undefined; + private 'strategy_config'?: StrategyConfig | undefined; + private 'extend_config'?: string | undefined; + private 'initializer_handler'?: string | undefined; + private 'initializer_timeout'?: number | undefined; + private 'enterprise_project_id'?: string | undefined; + public constructor(funcName?: any, runtime?: any, timeout?: any, memorySize?: any) { + this['func_name'] = funcName; + this['runtime'] = runtime; + this['timeout'] = timeout; + this['memory_size'] = memorySize; + } + public withFuncName(funcName: string): UpdateFunctionConfigRequestBody { + this['func_name'] = funcName; + return this; + } + public set funcName(funcName: string | undefined) { + this['func_name'] = funcName; + } + public get funcName() { + return this['func_name']; + } + public withRuntime(runtime: UpdateFunctionConfigRequestBodyRuntimeEnum): UpdateFunctionConfigRequestBody { + this['runtime'] = runtime; + return this; + } + public withTimeout(timeout: number): UpdateFunctionConfigRequestBody { + this['timeout'] = timeout; + return this; + } + public withHandler(handler: string): UpdateFunctionConfigRequestBody { + this['handler'] = handler; + return this; + } + public withMemorySize(memorySize: number): UpdateFunctionConfigRequestBody { + this['memory_size'] = memorySize; + return this; + } + public set memorySize(memorySize: number | undefined) { + this['memory_size'] = memorySize; + } + public get memorySize() { + return this['memory_size']; + } + public withUserData(userData: string): UpdateFunctionConfigRequestBody { + this['user_data'] = userData; + return this; + } + public set userData(userData: string | undefined) { + this['user_data'] = userData; + } + public get userData() { + return this['user_data']; + } + public withXrole(xrole: string): UpdateFunctionConfigRequestBody { + this['xrole'] = xrole; + return this; + } + public withAppXrole(appXrole: string): UpdateFunctionConfigRequestBody { + this['app_xrole'] = appXrole; + return this; + } + public set appXrole(appXrole: string | undefined) { + this['app_xrole'] = appXrole; + } + public get appXrole() { + return this['app_xrole']; + } + public withDescription(description: string): UpdateFunctionConfigRequestBody { + this['description'] = description; + return this; + } + public withFuncVpc(funcVpc: FuncVpc): UpdateFunctionConfigRequestBody { + this['func_vpc'] = funcVpc; + return this; + } + public set funcVpc(funcVpc: FuncVpc | undefined) { + this['func_vpc'] = funcVpc; + } + public get funcVpc() { + return this['func_vpc']; + } + public withMountConfig(mountConfig: MountConfig): UpdateFunctionConfigRequestBody { + this['mount_config'] = mountConfig; + return this; + } + public set mountConfig(mountConfig: MountConfig | undefined) { + this['mount_config'] = mountConfig; + } + public get mountConfig() { + return this['mount_config']; + } + public withStrategyConfig(strategyConfig: StrategyConfig): UpdateFunctionConfigRequestBody { + this['strategy_config'] = strategyConfig; + return this; + } + public set strategyConfig(strategyConfig: StrategyConfig | undefined) { + this['strategy_config'] = strategyConfig; + } + public get strategyConfig() { + return this['strategy_config']; + } + public withExtendConfig(extendConfig: string): UpdateFunctionConfigRequestBody { + this['extend_config'] = extendConfig; + return this; + } + public set extendConfig(extendConfig: string | undefined) { + this['extend_config'] = extendConfig; + } + public get extendConfig() { + return this['extend_config']; + } + public withInitializerHandler(initializerHandler: string): UpdateFunctionConfigRequestBody { + this['initializer_handler'] = initializerHandler; + return this; + } + public set initializerHandler(initializerHandler: string | undefined) { + this['initializer_handler'] = initializerHandler; + } + public get initializerHandler() { + return this['initializer_handler']; + } + public withInitializerTimeout(initializerTimeout: number): UpdateFunctionConfigRequestBody { + this['initializer_timeout'] = initializerTimeout; + return this; + } + public set initializerTimeout(initializerTimeout: number | undefined) { + this['initializer_timeout'] = initializerTimeout; + } + public get initializerTimeout() { + return this['initializer_timeout']; + } + public withEnterpriseProjectId(enterpriseProjectId: string): UpdateFunctionConfigRequestBody { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId() { + return this['enterprise_project_id']; + } +} + +/** + * @export + * @enum {string} + */ +export enum UpdateFunctionConfigRequestBodyRuntimeEnum { + PYTHON2_7 = 'Python2.7', + PYTHON3_6 = 'Python3.6', + GO1_8 = 'Go1.8', + JAVA8 = 'Java8', + NODE_JS6_10 = 'Node.js6.10', + NODE_JS8_10 = 'Node.js8.10', + C__NET_CORE_2_0 = 'C#(.NET Core 2.0)', + C__NET_CORE_2_1 = 'C#(.NET Core 2.1)', + C__NET_CORE_3_1 = 'C#(.NET Core 3.1)', + CUSTOM = 'Custom', + PHP7_3 = 'PHP7.3' +} diff --git a/services/functiongraph/v2/model/UpdateFunctionConfigResponse.ts b/services/functiongraph/v2/model/UpdateFunctionConfigResponse.ts new file mode 100644 index 000000000..7942e3ba1 --- /dev/null +++ b/services/functiongraph/v2/model/UpdateFunctionConfigResponse.ts @@ -0,0 +1,378 @@ +import { Dependency } from './Dependency'; +import { FuncVpc } from './FuncVpc'; +import { MountConfig } from './MountConfig'; +import { StrategyConfig } from './StrategyConfig'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class UpdateFunctionConfigResponse extends SdkResponse { + private 'func_urn'?: string | undefined; + private 'func_name'?: string | undefined; + private 'domain_id'?: string | undefined; + public namespace?: string; + private 'project_name'?: string | undefined; + private 'package'?: string | undefined; + public runtime?: UpdateFunctionConfigResponseRuntimeEnum; + public timeout?: number; + public handler?: string; + private 'memory_size'?: number | undefined; + public cpu?: number; + private 'code_type'?: UpdateFunctionConfigResponseCodeTypeEnum | undefined; + private 'code_url'?: string | undefined; + private 'code_filename'?: string | undefined; + private 'code_size'?: number | undefined; + private 'user_data'?: string | undefined; + private 'encrypted_user_data'?: string | undefined; + public digest?: string; + public version?: string; + private 'image_name'?: string | undefined; + public xrole?: string; + private 'app_xrole'?: string | undefined; + public description?: string; + private 'last_modified'?: Date | undefined; + private 'func_vpc'?: FuncVpc | undefined; + private 'mount_config'?: MountConfig | undefined; + private 'strategy_config'?: StrategyConfig | undefined; + private 'extend_config'?: string | undefined; + public dependencies?: Array; + private 'initializer_handler'?: string | undefined; + private 'initializer_timeout'?: number | undefined; + private 'enterprise_project_id'?: string | undefined; + private 'long_time'?: boolean | undefined; + private 'log_group_id'?: string | undefined; + private 'log_stream_id'?: string | undefined; + public type?: UpdateFunctionConfigResponseTypeEnum; + public constructor() { + super(); + } + public withFuncUrn(funcUrn: string): UpdateFunctionConfigResponse { + this['func_urn'] = funcUrn; + return this; + } + public set funcUrn(funcUrn: string | undefined) { + this['func_urn'] = funcUrn; + } + public get funcUrn() { + return this['func_urn']; + } + public withFuncName(funcName: string): UpdateFunctionConfigResponse { + this['func_name'] = funcName; + return this; + } + public set funcName(funcName: string | undefined) { + this['func_name'] = funcName; + } + public get funcName() { + return this['func_name']; + } + public withDomainId(domainId: string): UpdateFunctionConfigResponse { + this['domain_id'] = domainId; + return this; + } + public set domainId(domainId: string | undefined) { + this['domain_id'] = domainId; + } + public get domainId() { + return this['domain_id']; + } + public withNamespace(namespace: string): UpdateFunctionConfigResponse { + this['namespace'] = namespace; + return this; + } + public withProjectName(projectName: string): UpdateFunctionConfigResponse { + this['project_name'] = projectName; + return this; + } + public set projectName(projectName: string | undefined) { + this['project_name'] = projectName; + } + public get projectName() { + return this['project_name']; + } + public withPackage(_package: string): UpdateFunctionConfigResponse { + this['package'] = _package; + return this; + } + public set _package(_package: string | undefined) { + this['package'] = _package; + } + public get _package() { + return this['package']; + } + public withRuntime(runtime: UpdateFunctionConfigResponseRuntimeEnum): UpdateFunctionConfigResponse { + this['runtime'] = runtime; + return this; + } + public withTimeout(timeout: number): UpdateFunctionConfigResponse { + this['timeout'] = timeout; + return this; + } + public withHandler(handler: string): UpdateFunctionConfigResponse { + this['handler'] = handler; + return this; + } + public withMemorySize(memorySize: number): UpdateFunctionConfigResponse { + this['memory_size'] = memorySize; + return this; + } + public set memorySize(memorySize: number | undefined) { + this['memory_size'] = memorySize; + } + public get memorySize() { + return this['memory_size']; + } + public withCpu(cpu: number): UpdateFunctionConfigResponse { + this['cpu'] = cpu; + return this; + } + public withCodeType(codeType: UpdateFunctionConfigResponseCodeTypeEnum): UpdateFunctionConfigResponse { + this['code_type'] = codeType; + return this; + } + public set codeType(codeType: UpdateFunctionConfigResponseCodeTypeEnum | undefined) { + this['code_type'] = codeType; + } + public get codeType() { + return this['code_type']; + } + public withCodeUrl(codeUrl: string): UpdateFunctionConfigResponse { + this['code_url'] = codeUrl; + return this; + } + public set codeUrl(codeUrl: string | undefined) { + this['code_url'] = codeUrl; + } + public get codeUrl() { + return this['code_url']; + } + public withCodeFilename(codeFilename: string): UpdateFunctionConfigResponse { + this['code_filename'] = codeFilename; + return this; + } + public set codeFilename(codeFilename: string | undefined) { + this['code_filename'] = codeFilename; + } + public get codeFilename() { + return this['code_filename']; + } + public withCodeSize(codeSize: number): UpdateFunctionConfigResponse { + this['code_size'] = codeSize; + return this; + } + public set codeSize(codeSize: number | undefined) { + this['code_size'] = codeSize; + } + public get codeSize() { + return this['code_size']; + } + public withUserData(userData: string): UpdateFunctionConfigResponse { + this['user_data'] = userData; + return this; + } + public set userData(userData: string | undefined) { + this['user_data'] = userData; + } + public get userData() { + return this['user_data']; + } + public withEncryptedUserData(encryptedUserData: string): UpdateFunctionConfigResponse { + this['encrypted_user_data'] = encryptedUserData; + return this; + } + public set encryptedUserData(encryptedUserData: string | undefined) { + this['encrypted_user_data'] = encryptedUserData; + } + public get encryptedUserData() { + return this['encrypted_user_data']; + } + public withDigest(digest: string): UpdateFunctionConfigResponse { + this['digest'] = digest; + return this; + } + public withVersion(version: string): UpdateFunctionConfigResponse { + this['version'] = version; + return this; + } + public withImageName(imageName: string): UpdateFunctionConfigResponse { + this['image_name'] = imageName; + return this; + } + public set imageName(imageName: string | undefined) { + this['image_name'] = imageName; + } + public get imageName() { + return this['image_name']; + } + public withXrole(xrole: string): UpdateFunctionConfigResponse { + this['xrole'] = xrole; + return this; + } + public withAppXrole(appXrole: string): UpdateFunctionConfigResponse { + this['app_xrole'] = appXrole; + return this; + } + public set appXrole(appXrole: string | undefined) { + this['app_xrole'] = appXrole; + } + public get appXrole() { + return this['app_xrole']; + } + public withDescription(description: string): UpdateFunctionConfigResponse { + this['description'] = description; + return this; + } + public withLastModified(lastModified: Date): UpdateFunctionConfigResponse { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: Date | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } + public withFuncVpc(funcVpc: FuncVpc): UpdateFunctionConfigResponse { + this['func_vpc'] = funcVpc; + return this; + } + public set funcVpc(funcVpc: FuncVpc | undefined) { + this['func_vpc'] = funcVpc; + } + public get funcVpc() { + return this['func_vpc']; + } + public withMountConfig(mountConfig: MountConfig): UpdateFunctionConfigResponse { + this['mount_config'] = mountConfig; + return this; + } + public set mountConfig(mountConfig: MountConfig | undefined) { + this['mount_config'] = mountConfig; + } + public get mountConfig() { + return this['mount_config']; + } + public withStrategyConfig(strategyConfig: StrategyConfig): UpdateFunctionConfigResponse { + this['strategy_config'] = strategyConfig; + return this; + } + public set strategyConfig(strategyConfig: StrategyConfig | undefined) { + this['strategy_config'] = strategyConfig; + } + public get strategyConfig() { + return this['strategy_config']; + } + public withExtendConfig(extendConfig: string): UpdateFunctionConfigResponse { + this['extend_config'] = extendConfig; + return this; + } + public set extendConfig(extendConfig: string | undefined) { + this['extend_config'] = extendConfig; + } + public get extendConfig() { + return this['extend_config']; + } + public withDependencies(dependencies: Array): UpdateFunctionConfigResponse { + this['dependencies'] = dependencies; + return this; + } + public withInitializerHandler(initializerHandler: string): UpdateFunctionConfigResponse { + this['initializer_handler'] = initializerHandler; + return this; + } + public set initializerHandler(initializerHandler: string | undefined) { + this['initializer_handler'] = initializerHandler; + } + public get initializerHandler() { + return this['initializer_handler']; + } + public withInitializerTimeout(initializerTimeout: number): UpdateFunctionConfigResponse { + this['initializer_timeout'] = initializerTimeout; + return this; + } + public set initializerTimeout(initializerTimeout: number | undefined) { + this['initializer_timeout'] = initializerTimeout; + } + public get initializerTimeout() { + return this['initializer_timeout']; + } + public withEnterpriseProjectId(enterpriseProjectId: string): UpdateFunctionConfigResponse { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId() { + return this['enterprise_project_id']; + } + public withLongTime(longTime: boolean): UpdateFunctionConfigResponse { + this['long_time'] = longTime; + return this; + } + public set longTime(longTime: boolean | undefined) { + this['long_time'] = longTime; + } + public get longTime() { + return this['long_time']; + } + public withLogGroupId(logGroupId: string): UpdateFunctionConfigResponse { + this['log_group_id'] = logGroupId; + return this; + } + public set logGroupId(logGroupId: string | undefined) { + this['log_group_id'] = logGroupId; + } + public get logGroupId() { + return this['log_group_id']; + } + public withLogStreamId(logStreamId: string): UpdateFunctionConfigResponse { + this['log_stream_id'] = logStreamId; + return this; + } + public set logStreamId(logStreamId: string | undefined) { + this['log_stream_id'] = logStreamId; + } + public get logStreamId() { + return this['log_stream_id']; + } + public withType(type: UpdateFunctionConfigResponseTypeEnum): UpdateFunctionConfigResponse { + this['type'] = type; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum UpdateFunctionConfigResponseRuntimeEnum { + PYTHON2_7 = 'Python2.7', + PYTHON3_6 = 'Python3.6', + GO1_8 = 'Go1.8', + JAVA8 = 'Java8', + NODE_JS6_10 = 'Node.js6.10', + NODE_JS8_10 = 'Node.js8.10', + C__NET_CORE_2_0 = 'C#(.NET Core 2.0)', + C__NET_CORE_2_1 = 'C#(.NET Core 2.1)', + C__NET_CORE_3_1 = 'C#(.NET Core 3.1)', + CUSTOM = 'Custom', + PHP7_3 = 'PHP7.3' +} +/** + * @export + * @enum {string} + */ +export enum UpdateFunctionConfigResponseCodeTypeEnum { + INLINE = 'inline', + ZIP = 'zip', + OBS = 'obs', + JAR = 'jar' +} +/** + * @export + * @enum {string} + */ +export enum UpdateFunctionConfigResponseTypeEnum { + V1 = 'v1', + V2 = 'v2' +} diff --git a/services/functiongraph/v2/model/UpdateFunctionReservedInstancesRequest.ts b/services/functiongraph/v2/model/UpdateFunctionReservedInstancesRequest.ts new file mode 100644 index 000000000..6edb6e023 --- /dev/null +++ b/services/functiongraph/v2/model/UpdateFunctionReservedInstancesRequest.ts @@ -0,0 +1,24 @@ +import { UpdateFunctionReservedInstancesRequestBody } from './UpdateFunctionReservedInstancesRequestBody'; + + +export class UpdateFunctionReservedInstancesRequest { + private 'function_urn': string | undefined; + public body?: UpdateFunctionReservedInstancesRequestBody; + public constructor(functionUrn?: any) { + this['function_urn'] = functionUrn; + } + public withFunctionUrn(functionUrn: string): UpdateFunctionReservedInstancesRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withBody(body: UpdateFunctionReservedInstancesRequestBody): UpdateFunctionReservedInstancesRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateFunctionReservedInstancesRequestBody.ts b/services/functiongraph/v2/model/UpdateFunctionReservedInstancesRequestBody.ts new file mode 100644 index 000000000..fa786ca9e --- /dev/null +++ b/services/functiongraph/v2/model/UpdateFunctionReservedInstancesRequestBody.ts @@ -0,0 +1,12 @@ + + +export class UpdateFunctionReservedInstancesRequestBody { + public count: number; + public constructor(count?: any) { + this['count'] = count; + } + public withCount(count: number): UpdateFunctionReservedInstancesRequestBody { + this['count'] = count; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateFunctionReservedInstancesResponse.ts b/services/functiongraph/v2/model/UpdateFunctionReservedInstancesResponse.ts new file mode 100644 index 000000000..f0720608c --- /dev/null +++ b/services/functiongraph/v2/model/UpdateFunctionReservedInstancesResponse.ts @@ -0,0 +1,13 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class UpdateFunctionReservedInstancesResponse extends SdkResponse { + public count?: number; + public constructor() { + super(); + } + public withCount(count: number): UpdateFunctionReservedInstancesResponse { + this['count'] = count; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateTriggerRequest.ts b/services/functiongraph/v2/model/UpdateTriggerRequest.ts new file mode 100644 index 000000000..2ae688c72 --- /dev/null +++ b/services/functiongraph/v2/model/UpdateTriggerRequest.ts @@ -0,0 +1,65 @@ +import { UpdateTriggerRequestBody } from './UpdateTriggerRequestBody'; + + +export class UpdateTriggerRequest { + private 'function_urn': string | undefined; + private 'trigger_type_code': UpdateTriggerRequestTriggerTypeCodeEnum | undefined; + private 'trigger_id': string | undefined; + public body?: UpdateTriggerRequestBody; + public constructor(functionUrn?: any, triggerTypeCode?: any, triggerId?: any) { + this['function_urn'] = functionUrn; + this['trigger_type_code'] = triggerTypeCode; + this['trigger_id'] = triggerId; + } + public withFunctionUrn(functionUrn: string): UpdateTriggerRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withTriggerTypeCode(triggerTypeCode: UpdateTriggerRequestTriggerTypeCodeEnum): UpdateTriggerRequest { + this['trigger_type_code'] = triggerTypeCode; + return this; + } + public set triggerTypeCode(triggerTypeCode: UpdateTriggerRequestTriggerTypeCodeEnum | undefined) { + this['trigger_type_code'] = triggerTypeCode; + } + public get triggerTypeCode() { + return this['trigger_type_code']; + } + public withTriggerId(triggerId: string): UpdateTriggerRequest { + this['trigger_id'] = triggerId; + return this; + } + public set triggerId(triggerId: string | undefined) { + this['trigger_id'] = triggerId; + } + public get triggerId() { + return this['trigger_id']; + } + public withBody(body: UpdateTriggerRequestBody): UpdateTriggerRequest { + this['body'] = body; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum UpdateTriggerRequestTriggerTypeCodeEnum { + TIMER = 'TIMER', + APIG = 'APIG', + CTS = 'CTS', + DDS = 'DDS', + DMS = 'DMS', + DIS = 'DIS', + LTS = 'LTS', + OBS = 'OBS', + SMN = 'SMN', + KAFKA = 'KAFKA' +} diff --git a/services/functiongraph/v2/model/UpdateTriggerRequestBody.ts b/services/functiongraph/v2/model/UpdateTriggerRequestBody.ts new file mode 100644 index 000000000..475d12ec1 --- /dev/null +++ b/services/functiongraph/v2/model/UpdateTriggerRequestBody.ts @@ -0,0 +1,27 @@ + + +export class UpdateTriggerRequestBody { + private 'trigger_status': UpdateTriggerRequestBodyTriggerStatusEnum | undefined; + public constructor(triggerStatus?: any) { + this['trigger_status'] = triggerStatus; + } + public withTriggerStatus(triggerStatus: UpdateTriggerRequestBodyTriggerStatusEnum): UpdateTriggerRequestBody { + this['trigger_status'] = triggerStatus; + return this; + } + public set triggerStatus(triggerStatus: UpdateTriggerRequestBodyTriggerStatusEnum | undefined) { + this['trigger_status'] = triggerStatus; + } + public get triggerStatus() { + return this['trigger_status']; + } +} + +/** + * @export + * @enum {string} + */ +export enum UpdateTriggerRequestBodyTriggerStatusEnum { + ACTIVE = 'ACTIVE', + DISABLED = 'DISABLED' +} diff --git a/services/functiongraph/v2/model/UpdateTriggerResponse.ts b/services/functiongraph/v2/model/UpdateTriggerResponse.ts new file mode 100644 index 000000000..b990b0183 --- /dev/null +++ b/services/functiongraph/v2/model/UpdateTriggerResponse.ts @@ -0,0 +1,8 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class UpdateTriggerResponse extends SdkResponse { + public constructor() { + super(); + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateVersionAliasRequest.ts b/services/functiongraph/v2/model/UpdateVersionAliasRequest.ts new file mode 100644 index 000000000..31dd48294 --- /dev/null +++ b/services/functiongraph/v2/model/UpdateVersionAliasRequest.ts @@ -0,0 +1,36 @@ +import { UpdateVersionAliasRequestBody } from './UpdateVersionAliasRequestBody'; + + +export class UpdateVersionAliasRequest { + private 'function_urn': string | undefined; + private 'alias_name': string | undefined; + public body?: UpdateVersionAliasRequestBody; + public constructor(functionUrn?: any, aliasName?: any) { + this['function_urn'] = functionUrn; + this['alias_name'] = aliasName; + } + public withFunctionUrn(functionUrn: string): UpdateVersionAliasRequest { + this['function_urn'] = functionUrn; + return this; + } + public set functionUrn(functionUrn: string | undefined) { + this['function_urn'] = functionUrn; + } + public get functionUrn() { + return this['function_urn']; + } + public withAliasName(aliasName: string): UpdateVersionAliasRequest { + this['alias_name'] = aliasName; + return this; + } + public set aliasName(aliasName: string | undefined) { + this['alias_name'] = aliasName; + } + public get aliasName() { + return this['alias_name']; + } + public withBody(body: UpdateVersionAliasRequestBody): UpdateVersionAliasRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateVersionAliasRequestBody.ts b/services/functiongraph/v2/model/UpdateVersionAliasRequestBody.ts new file mode 100644 index 000000000..e44f2fa40 --- /dev/null +++ b/services/functiongraph/v2/model/UpdateVersionAliasRequestBody.ts @@ -0,0 +1,28 @@ + + +export class UpdateVersionAliasRequestBody { + public version: string; + public description?: string; + private 'additional_version_weights'?: { [key: string]: number; } | undefined; + public constructor(version?: any) { + this['version'] = version; + } + public withVersion(version: string): UpdateVersionAliasRequestBody { + this['version'] = version; + return this; + } + public withDescription(description: string): UpdateVersionAliasRequestBody { + this['description'] = description; + return this; + } + public withAdditionalVersionWeights(additionalVersionWeights: { [key: string]: number; }): UpdateVersionAliasRequestBody { + this['additional_version_weights'] = additionalVersionWeights; + return this; + } + public set additionalVersionWeights(additionalVersionWeights: { [key: string]: number; } | undefined) { + this['additional_version_weights'] = additionalVersionWeights; + } + public get additionalVersionWeights() { + return this['additional_version_weights']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/model/UpdateVersionAliasResponse.ts b/services/functiongraph/v2/model/UpdateVersionAliasResponse.ts new file mode 100644 index 000000000..fcb3f6b54 --- /dev/null +++ b/services/functiongraph/v2/model/UpdateVersionAliasResponse.ts @@ -0,0 +1,56 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class UpdateVersionAliasResponse extends SdkResponse { + public name?: string; + public version?: string; + public description?: string; + private 'last_modified'?: Date | undefined; + private 'alias_urn'?: string | undefined; + private 'additional_version_weights'?: { [key: string]: number; } | undefined; + public constructor() { + super(); + } + public withName(name: string): UpdateVersionAliasResponse { + this['name'] = name; + return this; + } + public withVersion(version: string): UpdateVersionAliasResponse { + this['version'] = version; + return this; + } + public withDescription(description: string): UpdateVersionAliasResponse { + this['description'] = description; + return this; + } + public withLastModified(lastModified: Date): UpdateVersionAliasResponse { + this['last_modified'] = lastModified; + return this; + } + public set lastModified(lastModified: Date | undefined) { + this['last_modified'] = lastModified; + } + public get lastModified() { + return this['last_modified']; + } + public withAliasUrn(aliasUrn: string): UpdateVersionAliasResponse { + this['alias_urn'] = aliasUrn; + return this; + } + public set aliasUrn(aliasUrn: string | undefined) { + this['alias_urn'] = aliasUrn; + } + public get aliasUrn() { + return this['alias_urn']; + } + public withAdditionalVersionWeights(additionalVersionWeights: { [key: string]: number; }): UpdateVersionAliasResponse { + this['additional_version_weights'] = additionalVersionWeights; + return this; + } + public set additionalVersionWeights(additionalVersionWeights: { [key: string]: number; } | undefined) { + this['additional_version_weights'] = additionalVersionWeights; + } + public get additionalVersionWeights() { + return this['additional_version_weights']; + } +} \ No newline at end of file diff --git a/services/functiongraph/v2/public-api.ts b/services/functiongraph/v2/public-api.ts new file mode 100644 index 000000000..0c1dafed7 --- /dev/null +++ b/services/functiongraph/v2/public-api.ts @@ -0,0 +1,131 @@ +export * from './FunctionGraphClient'; + +export * from './model/AsyncInvokeFunctionRequest'; +export * from './model/AsyncInvokeFunctionResponse'; +export * from './model/AsyncInvokeReservedFunctionRequest'; +export * from './model/AsyncInvokeReservedFunctionResponse'; +export * from './model/BatchDeleteFunctionTriggersRequest'; +export * from './model/BatchDeleteFunctionTriggersResponse'; +export * from './model/CreateDependencyRequest'; +export * from './model/CreateDependencyRequestBody'; +export * from './model/CreateDependencyResponse'; +export * from './model/CreateEventRequest'; +export * from './model/CreateEventRequestBody'; +export * from './model/CreateEventResponse'; +export * from './model/CreateFunctionRequest'; +export * from './model/CreateFunctionRequestBody'; +export * from './model/CreateFunctionResponse'; +export * from './model/CreateFunctionTriggerRequest'; +export * from './model/CreateFunctionTriggerRequestBody'; +export * from './model/CreateFunctionTriggerResponse'; +export * from './model/CreateFunctionVersionRequest'; +export * from './model/CreateFunctionVersionRequestBody'; +export * from './model/CreateFunctionVersionResponse'; +export * from './model/CreateVersionAliasRequest'; +export * from './model/CreateVersionAliasRequestBody'; +export * from './model/CreateVersionAliasResponse'; +export * from './model/DeleteDependencyRequest'; +export * from './model/DeleteDependencyResponse'; +export * from './model/DeleteEventRequest'; +export * from './model/DeleteEventResponse'; +export * from './model/DeleteFunctionAsyncInvokeConfigRequest'; +export * from './model/DeleteFunctionAsyncInvokeConfigResponse'; +export * from './model/DeleteFunctionRequest'; +export * from './model/DeleteFunctionResponse'; +export * from './model/DeleteFunctionTriggerRequest'; +export * from './model/DeleteFunctionTriggerResponse'; +export * from './model/DeleteReservedInstanceByIdRequest'; +export * from './model/DeleteReservedInstanceByIdResponse'; +export * from './model/DeleteVersionAliasRequest'; +export * from './model/DeleteVersionAliasResponse'; +export * from './model/Dependency'; +export * from './model/EnableLtsLogsRequest'; +export * from './model/EnableLtsLogsResponse'; +export * from './model/ExportFunctionRequest'; +export * from './model/ExportFunctionResponse'; +export * from './model/FuncAsyncDestinationConfig'; +export * from './model/FuncCode'; +export * from './model/FuncDestinationConfig'; +export * from './model/FuncMount'; +export * from './model/FuncVpc'; +export * from './model/ImportFunctionRequest'; +export * from './model/ImportFunctionRequestBody'; +export * from './model/ImportFunctionResponse'; +export * from './model/InvokeFunctionRequest'; +export * from './model/InvokeFunctionResponse'; +export * from './model/ListDependenciesRequest'; +export * from './model/ListDependenciesResponse'; +export * from './model/ListDependenciesResult'; +export * from './model/ListEventsRequest'; +export * from './model/ListEventsResponse'; +export * from './model/ListEventsResult'; +export * from './model/ListFunctionAsyncInvokeConfigRequest'; +export * from './model/ListFunctionAsyncInvokeConfigResponse'; +export * from './model/ListFunctionAsyncInvokeConfigResult'; +export * from './model/ListFunctionResult'; +export * from './model/ListFunctionStatisticsRequest'; +export * from './model/ListFunctionStatisticsResponse'; +export * from './model/ListFunctionStatisticsResponseBody'; +export * from './model/ListFunctionTriggerResult'; +export * from './model/ListFunctionTriggersRequest'; +export * from './model/ListFunctionTriggersResponse'; +export * from './model/ListFunctionVersionResult'; +export * from './model/ListFunctionVersionsRequest'; +export * from './model/ListFunctionVersionsResponse'; +export * from './model/ListFunctionsRequest'; +export * from './model/ListFunctionsResponse'; +export * from './model/ListQuotasRequest'; +export * from './model/ListQuotasResponse'; +export * from './model/ListQuotasResult'; +export * from './model/ListStatisticsRequest'; +export * from './model/ListStatisticsResponse'; +export * from './model/ListVersionAliasResult'; +export * from './model/ListVersionAliasesRequest'; +export * from './model/ListVersionAliasesResponse'; +export * from './model/MonthUsed'; +export * from './model/MountConfig'; +export * from './model/MountUser'; +export * from './model/PageInfo'; +export * from './model/Resources'; +export * from './model/ShowDependencyRequest'; +export * from './model/ShowDependencyResponse'; +export * from './model/ShowEventRequest'; +export * from './model/ShowEventResponse'; +export * from './model/ShowFunctionAsyncInvokeConfigRequest'; +export * from './model/ShowFunctionAsyncInvokeConfigResponse'; +export * from './model/ShowFunctionCodeRequest'; +export * from './model/ShowFunctionCodeResponse'; +export * from './model/ShowFunctionConfigRequest'; +export * from './model/ShowFunctionConfigResponse'; +export * from './model/ShowFunctionTriggerRequest'; +export * from './model/ShowFunctionTriggerResponse'; +export * from './model/ShowLtsLogDetailsRequest'; +export * from './model/ShowLtsLogDetailsResponse'; +export * from './model/ShowVersionAliasRequest'; +export * from './model/ShowVersionAliasResponse'; +export * from './model/SlaReportsValue'; +export * from './model/StrategyConfig'; +export * from './model/UpdateDependencyRequest'; +export * from './model/UpdateDependencyRequestBody'; +export * from './model/UpdateDependencyResponse'; +export * from './model/UpdateEventRequest'; +export * from './model/UpdateEventRequestBody'; +export * from './model/UpdateEventResponse'; +export * from './model/UpdateFunctionAsyncInvokeConfigRequest'; +export * from './model/UpdateFunctionAsyncInvokeConfigRequestBody'; +export * from './model/UpdateFunctionAsyncInvokeConfigResponse'; +export * from './model/UpdateFunctionCodeRequest'; +export * from './model/UpdateFunctionCodeRequestBody'; +export * from './model/UpdateFunctionCodeResponse'; +export * from './model/UpdateFunctionConfigRequest'; +export * from './model/UpdateFunctionConfigRequestBody'; +export * from './model/UpdateFunctionConfigResponse'; +export * from './model/UpdateFunctionReservedInstancesRequest'; +export * from './model/UpdateFunctionReservedInstancesRequestBody'; +export * from './model/UpdateFunctionReservedInstancesResponse'; +export * from './model/UpdateTriggerRequest'; +export * from './model/UpdateTriggerRequestBody'; +export * from './model/UpdateTriggerResponse'; +export * from './model/UpdateVersionAliasRequest'; +export * from './model/UpdateVersionAliasRequestBody'; +export * from './model/UpdateVersionAliasResponse'; \ No newline at end of file