UNPKG

tencentcloud-sdk-nodejs-intl-en

Version:
1,961 lines (1,646 loc) 169 kB
/* * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ const AbstractModel = require("../../common/abstract_model"); /** * UpdateAlias request structure. * @class */ class UpdateAliasRequest extends AbstractModel { constructor(){ super(); /** * Function name * @type {string || null} */ this.FunctionName = null; /** * Alias name * @type {string || null} */ this.Name = null; /** * Master version pointed to by the alias * @type {string || null} */ this.FunctionVersion = null; /** * Function namespace * @type {string || null} */ this.Namespace = null; /** * Routing information of alias, which is required if you need to specify an additional version for the alias. * @type {RoutingConfig || null} */ this.RoutingConfig = null; /** * Alias description * @type {string || null} */ this.Description = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.FunctionName = 'FunctionName' in params ? params.FunctionName : null; this.Name = 'Name' in params ? params.Name : null; this.FunctionVersion = 'FunctionVersion' in params ? params.FunctionVersion : null; this.Namespace = 'Namespace' in params ? params.Namespace : null; if (params.RoutingConfig) { let obj = new RoutingConfig(); obj.deserialize(params.RoutingConfig) this.RoutingConfig = obj; } this.Description = 'Description' in params ? params.Description : null; } } /** * Trigger type * @class */ class Trigger extends AbstractModel { constructor(){ super(); /** * Latest modification time of the trigger * @type {string || null} */ this.ModTime = null; /** * Trigger type * @type {string || null} */ this.Type = null; /** * Detailed trigger configuration * @type {string || null} */ this.TriggerDesc = null; /** * Trigger name * @type {string || null} */ this.TriggerName = null; /** * Creation time of the trigger * @type {string || null} */ this.AddTime = null; /** * Enabling switch * @type {number || null} */ this.Enable = null; /** * Custom parameter * @type {string || null} */ this.CustomArgument = null; /** * Trigger status * @type {string || null} */ this.AvailableStatus = null; /** * Minimum resource ID of trigger * @type {string || null} */ this.ResourceId = null; /** * Trigger-Function binding status * @type {string || null} */ this.BindStatus = null; /** * Trigger type. Two-way means that the trigger can be manipulated in both consoles, while one-way means that the trigger can be created only in the SCF Console * @type {string || null} */ this.TriggerAttribute = null; /** * The alias or version bound with the trigger * @type {string || null} */ this.Qualifier = null; /** * Trigger description * @type {string || null} */ this.Description = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ModTime = 'ModTime' in params ? params.ModTime : null; this.Type = 'Type' in params ? params.Type : null; this.TriggerDesc = 'TriggerDesc' in params ? params.TriggerDesc : null; this.TriggerName = 'TriggerName' in params ? params.TriggerName : null; this.AddTime = 'AddTime' in params ? params.AddTime : null; this.Enable = 'Enable' in params ? params.Enable : null; this.CustomArgument = 'CustomArgument' in params ? params.CustomArgument : null; this.AvailableStatus = 'AvailableStatus' in params ? params.AvailableStatus : null; this.ResourceId = 'ResourceId' in params ? params.ResourceId : null; this.BindStatus = 'BindStatus' in params ? params.BindStatus : null; this.TriggerAttribute = 'TriggerAttribute' in params ? params.TriggerAttribute : null; this.Qualifier = 'Qualifier' in params ? params.Qualifier : null; this.Description = 'Description' in params ? params.Description : null; } } /** * GetProvisionedConcurrencyConfig request structure. * @class */ class GetProvisionedConcurrencyConfigRequest extends AbstractModel { constructor(){ super(); /** * Name of the function for which to get the provisioned concurrency details. * @type {string || null} */ this.FunctionName = null; /** * Function namespace. Default value: default. * @type {string || null} */ this.Namespace = null; /** * Function version number. If this parameter is left empty, the provisioned concurrency information of all function versions will be returned. * @type {string || null} */ this.Qualifier = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.FunctionName = 'FunctionName' in params ? params.FunctionName : null; this.Namespace = 'Namespace' in params ? params.Namespace : null; this.Qualifier = 'Qualifier' in params ? params.Qualifier : null; } } /** * ListAliases response structure. * @class */ class ListAliasesResponse extends AbstractModel { constructor(){ super(); /** * Alias list * @type {Array.<Alias> || null} */ this.Aliases = null; /** * Total number of aliases Note: this field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.TotalCount = null; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } if (params.Aliases) { this.Aliases = new Array(); for (let z in params.Aliases) { let obj = new Alias(); obj.deserialize(params.Aliases[z]); this.Aliases.push(obj); } } this.TotalCount = 'TotalCount' in params ? params.TotalCount : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DeleteLayerVersion response structure. * @class */ class DeleteLayerVersionResponse extends AbstractModel { constructor(){ super(); /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * GetReservedConcurrencyConfig response structure. * @class */ class GetReservedConcurrencyConfigResponse extends AbstractModel { constructor(){ super(); /** * The reserved quota of the function Note: this field may return `null`, indicating that no valid values can be obtained. * @type {number || null} */ this.ReservedMem = null; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ReservedMem = 'ReservedMem' in params ? params.ReservedMem : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Version routing configuration of alias * @class */ class RoutingConfig extends AbstractModel { constructor(){ super(); /** * Additional version with random weight-based routing * @type {Array.<VersionWeight> || null} */ this.AdditionalVersionWeights = null; /** * Additional version with rule-based routing * @type {Array.<VersionMatch> || null} */ this.AddtionVersionMatchs = null; } /** * @private */ deserialize(params) { if (!params) { return; } if (params.AdditionalVersionWeights) { this.AdditionalVersionWeights = new Array(); for (let z in params.AdditionalVersionWeights) { let obj = new VersionWeight(); obj.deserialize(params.AdditionalVersionWeights[z]); this.AdditionalVersionWeights.push(obj); } } if (params.AddtionVersionMatchs) { this.AddtionVersionMatchs = new Array(); for (let z in params.AddtionVersionMatchs) { let obj = new VersionMatch(); obj.deserialize(params.AddtionVersionMatchs[z]); this.AddtionVersionMatchs.push(obj); } } } } /** * DeleteProvisionedConcurrencyConfig response structure. * @class */ class DeleteProvisionedConcurrencyConfigResponse extends AbstractModel { constructor(){ super(); /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Function version with weight * @class */ class VersionWeight extends AbstractModel { constructor(){ super(); /** * Function version name * @type {string || null} */ this.Version = null; /** * Version weight * @type {number || null} */ this.Weight = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Version = 'Version' in params ? params.Version : null; this.Weight = 'Weight' in params ? params.Weight : null; } } /** * Left-closed-right-open time range between the start time and end time in the format of "%Y-%m-%d %H:%M:%S" * @class */ class TimeInterval extends AbstractModel { constructor(){ super(); /** * Start time (inclusive) in the format of "%Y-%m-%d %H:%M:%S" * @type {string || null} */ this.Start = null; /** * End time (exclusive) in the format of "%Y-%m-%d %H:%M:%S" * @type {string || null} */ this.End = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Start = 'Start' in params ? params.Start : null; this.End = 'End' in params ? params.End : null; } } /** * Layer version information * @class */ class LayerVersionInfo extends AbstractModel { constructor(){ super(); /** * Runtime applicable to a version Note: This field may return null, indicating that no valid values can be obtained. * @type {Array.<string> || null} */ this.CompatibleRuntimes = null; /** * Creation time * @type {string || null} */ this.AddTime = null; /** * Version description Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.Description = null; /** * License information Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.LicenseInfo = null; /** * Version number * @type {number || null} */ this.LayerVersion = null; /** * Layer name * @type {string || null} */ this.LayerName = null; /** * Current status of specific layer version. For valid values, please see [here](https://intl.cloud.tencent.com/document/product/583/47175?from_cn_redirect=1#.E5.B1.82.EF.BC.88layer.EF.BC.89.E7.8A.B6.E6.80.81) * @type {string || null} */ this.Status = null; /** * Stamp Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.Stamp = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.CompatibleRuntimes = 'CompatibleRuntimes' in params ? params.CompatibleRuntimes : null; this.AddTime = 'AddTime' in params ? params.AddTime : null; this.Description = 'Description' in params ? params.Description : null; this.LicenseInfo = 'LicenseInfo' in params ? params.LicenseInfo : null; this.LayerVersion = 'LayerVersion' in params ? params.LayerVersion : null; this.LayerName = 'LayerName' in params ? params.LayerName : null; this.Status = 'Status' in params ? params.Status : null; this.Stamp = 'Stamp' in params ? params.Stamp : null; } } /** * PutProvisionedConcurrencyConfig response structure. * @class */ class PutProvisionedConcurrencyConfigResponse extends AbstractModel { constructor(){ super(); /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * UpdateNamespace response structure. * @class */ class UpdateNamespaceResponse extends AbstractModel { constructor(){ super(); /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * PublishLayerVersion response structure. * @class */ class PublishLayerVersionResponse extends AbstractModel { constructor(){ super(); /** * Version number of the layer created in this request * @type {number || null} */ this.LayerVersion = null; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.LayerVersion = 'LayerVersion' in params ? params.LayerVersion : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Usage information * @class */ class UsageInfo extends AbstractModel { constructor(){ super(); /** * Number of namespaces * @type {number || null} */ this.NamespacesCount = null; /** * Namespace details * @type {Array.<NamespaceUsage> || null} */ this.Namespace = null; /** * Upper limit of user concurrency memory in the current region * @type {number || null} */ this.TotalConcurrencyMem = null; /** * Quota of configured user concurrency memory in the current region * @type {number || null} */ this.TotalAllocatedConcurrencyMem = null; /** * Quota of account concurrency actually configured by user * @type {number || null} */ this.UserConcurrencyMemLimit = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.NamespacesCount = 'NamespacesCount' in params ? params.NamespacesCount : null; if (params.Namespace) { this.Namespace = new Array(); for (let z in params.Namespace) { let obj = new NamespaceUsage(); obj.deserialize(params.Namespace[z]); this.Namespace.push(obj); } } this.TotalConcurrencyMem = 'TotalConcurrencyMem' in params ? params.TotalConcurrencyMem : null; this.TotalAllocatedConcurrencyMem = 'TotalAllocatedConcurrencyMem' in params ? params.TotalAllocatedConcurrencyMem : null; this.UserConcurrencyMemLimit = 'UserConcurrencyMemLimit' in params ? params.UserConcurrencyMemLimit : null; } } /** * Async event * @class */ class AsyncEvent extends AbstractModel { constructor(){ super(); /** * Invocation request ID * @type {string || null} */ this.InvokeRequestId = null; /** * Invocation type * @type {string || null} */ this.InvokeType = null; /** * Function version * @type {string || null} */ this.Qualifier = null; /** * Event status. Values: `RUNNING`; `FINISHED` (invoked successfully); `ABORTED` (invocation ended); `FAILED` (invocation failed) * @type {string || null} */ this.Status = null; /** * Invocation start time in the format of "%Y-%m-%d %H:%M:%S.%f" * @type {string || null} */ this.StartTime = null; /** * Invocation end time in the format of "%Y-%m-%d %H:%M:%S.%f" * @type {string || null} */ this.EndTime = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InvokeRequestId = 'InvokeRequestId' in params ? params.InvokeRequestId : null; this.InvokeType = 'InvokeType' in params ? params.InvokeType : null; this.Qualifier = 'Qualifier' in params ? params.Qualifier : null; this.Status = 'Status' in params ? params.Status : null; this.StartTime = 'StartTime' in params ? params.StartTime : null; this.EndTime = 'EndTime' in params ? params.EndTime : null; } } /** * DeleteReservedConcurrencyConfig response structure. * @class */ class DeleteReservedConcurrencyConfigResponse extends AbstractModel { constructor(){ super(); /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * GetAlias response structure. * @class */ class GetAliasResponse extends AbstractModel { constructor(){ super(); /** * Master version pointed to by the alias * @type {string || null} */ this.FunctionVersion = null; /** * Alias name * @type {string || null} */ this.Name = null; /** * Routing information of alias * @type {RoutingConfig || null} */ this.RoutingConfig = null; /** * Alias description Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.Description = null; /** * Creation time Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.AddTime = null; /** * Update time Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.ModTime = null; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.FunctionVersion = 'FunctionVersion' in params ? params.FunctionVersion : null; this.Name = 'Name' in params ? params.Name : null; if (params.RoutingConfig) { let obj = new RoutingConfig(); obj.deserialize(params.RoutingConfig) this.RoutingConfig = obj; } this.Description = 'Description' in params ? params.Description : null; this.AddTime = 'AddTime' in params ? params.AddTime : null; this.ModTime = 'ModTime' in params ? params.ModTime : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * UpdateAlias response structure. * @class */ class UpdateAliasResponse extends AbstractModel { constructor(){ super(); /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Provisioned concurrency information of function version, including the set provisioned concurrency amount, available provisioned concurrency amount, and provisioned concurrency setting task status. * @class */ class VersionProvisionedConcurrencyInfo extends AbstractModel { constructor(){ super(); /** * Set provisioned concurrency amount. * @type {number || null} */ this.AllocatedProvisionedConcurrencyNum = null; /** * Currently available provisioned concurrency amount. * @type {number || null} */ this.AvailableProvisionedConcurrencyNum = null; /** * Provisioned concurrency setting task status. `Done`: completed; `InProgress`: in progress; `Failed`: partially or completely failed. * @type {string || null} */ this.Status = null; /** * Status description of provisioned concurrency setting task. * @type {string || null} */ this.StatusReason = null; /** * Function version number * @type {string || null} */ this.Qualifier = null; /** * List of scheduled provisioned concurrency scaling actions Note: this field may return `null`, indicating that no valid values can be obtained. * @type {Array.<TriggerAction> || null} */ this.TriggerActions = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.AllocatedProvisionedConcurrencyNum = 'AllocatedProvisionedConcurrencyNum' in params ? params.AllocatedProvisionedConcurrencyNum : null; this.AvailableProvisionedConcurrencyNum = 'AvailableProvisionedConcurrencyNum' in params ? params.AvailableProvisionedConcurrencyNum : null; this.Status = 'Status' in params ? params.Status : null; this.StatusReason = 'StatusReason' in params ? params.StatusReason : null; this.Qualifier = 'Qualifier' in params ? params.Qualifier : null; if (params.TriggerActions) { this.TriggerActions = new Array(); for (let z in params.TriggerActions) { let obj = new TriggerAction(); obj.deserialize(params.TriggerActions[z]); this.TriggerActions.push(obj); } } } } /** * GetFunctionLogs request structure. * @class */ class GetFunctionLogsRequest extends AbstractModel { constructor(){ super(); /** * Function name. - To ensure the compatibility of the [`GetFunctionLogs`](https://intl.cloud.tencent.com/document/product/583/18583?from_cn_redirect=1) API, the input parameter `FunctionName` is optional, but we recommend you enter it; otherwise, log acquisition may fail. - After the function is connected to CLS, we recommend you use the [related CLS API](https://intl.cloud.tencent.com/document/product/614/16875?from_cn_redirect=1) to get the best log retrieval experience. * @type {string || null} */ this.FunctionName = null; /** * Data offset. The addition of `Offset` and `Limit` cannot exceed 10,000. * @type {number || null} */ this.Offset = null; /** * Length of the return data. The addition of `Offset` and `Limit` cannot exceed 10,000. * @type {number || null} */ this.Limit = null; /** * It specifies whether to sort the logs in an ascending or descending order. The value is `desc` or `asc`. * @type {string || null} */ this.Order = null; /** * It specifies the sorting order of the logs based on a specified field, such as `function_name`, `duration`, `mem_usage`, and `start_time`. * @type {string || null} */ this.OrderBy = null; /** * Log filter used to identify whether to return logs of successful or failed requests. `filter.RetCode=not0` indicates that only the logs of failed requests will be returned. `filter.RetCode=is0` indicates that only the logs of successful requests will be returned. If this parameter is left blank, all logs will be returned. * @type {LogFilter || null} */ this.Filter = null; /** * Function namespace * @type {string || null} */ this.Namespace = null; /** * Function version * @type {string || null} */ this.Qualifier = null; /** * RequestId corresponding to the executed function * @type {string || null} */ this.FunctionRequestId = null; /** * Query date, for example, 2017-05-16 20:00:00. The date must be within one day of the end time. * @type {string || null} */ this.StartTime = null; /** * Query date, for example, 2017-05-16 20:59:59. The date must be within one day of the start time. * @type {string || null} */ this.EndTime = null; /** * This field is disused. * @type {LogSearchContext || null} */ this.SearchContext = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.FunctionName = 'FunctionName' in params ? params.FunctionName : null; this.Offset = 'Offset' in params ? params.Offset : null; this.Limit = 'Limit' in params ? params.Limit : null; this.Order = 'Order' in params ? params.Order : null; this.OrderBy = 'OrderBy' in params ? params.OrderBy : null; if (params.Filter) { let obj = new LogFilter(); obj.deserialize(params.Filter) this.Filter = obj; } this.Namespace = 'Namespace' in params ? params.Namespace : null; this.Qualifier = 'Qualifier' in params ? params.Qualifier : null; this.FunctionRequestId = 'FunctionRequestId' in params ? params.FunctionRequestId : null; this.StartTime = 'StartTime' in params ? params.StartTime : null; this.EndTime = 'EndTime' in params ? params.EndTime : null; if (params.SearchContext) { let obj = new LogSearchContext(); obj.deserialize(params.SearchContext) this.SearchContext = obj; } } } /** * State reason description * @class */ class StatusReason extends AbstractModel { constructor(){ super(); /** * Error code * @type {string || null} */ this.ErrorCode = null; /** * Error message * @type {string || null} */ this.ErrorMessage = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ErrorCode = 'ErrorCode' in params ? params.ErrorCode : null; this.ErrorMessage = 'ErrorMessage' in params ? params.ErrorMessage : null; } } /** * Function tag * @class */ class Tag extends AbstractModel { constructor(){ super(); /** * Tag key * @type {string || null} */ this.Key = null; /** * Tag value * @type {string || null} */ this.Value = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Key = 'Key' in params ? params.Key : null; this.Value = 'Value' in params ? params.Value : null; } } /** * GetRequestStatus request structure. * @class */ class GetRequestStatusRequest extends AbstractModel { constructor(){ super(); /** * Function name * @type {string || null} */ this.FunctionName = null; /** * ID of the request to be queried * @type {string || null} */ this.FunctionRequestId = null; /** * Function namespace * @type {string || null} */ this.Namespace = null; /** * Start time of the query, for example `2017-05-16 20:00:00`. If it’s left empty, it defaults to 15 minutes before the current time. * @type {string || null} */ this.StartTime = null; /** * End time of the query. such as `2017-05-16 20:59:59`. If `StartTime` is not specified, `EndTime` defaults to the current time. If `StartTime` is specified, `EndTime` is required, and it need to be later than the `StartTime`. * @type {string || null} */ this.EndTime = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.FunctionName = 'FunctionName' in params ? params.FunctionName : null; this.FunctionRequestId = 'FunctionRequestId' in params ? params.FunctionRequestId : null; this.Namespace = 'Namespace' in params ? params.Namespace : null; this.StartTime = 'StartTime' in params ? params.StartTime : null; this.EndTime = 'EndTime' in params ? params.EndTime : null; } } /** * Log filtering criteria, which is for distinguishing between logs of successful and failed execution * @class */ class LogFilter extends AbstractModel { constructor(){ super(); /** * Values of `filter.RetCode` include: not0, indicating that only logs of failed execution will be returned. is0, indicating that only logs of successful execution will be returned. TimeLimitExceeded, indicating that logs of function invocations which timed out will be returned. ResourceLimitExceeded, indicating that logs of function invocations during which resources exceeded the upper limit will be returned. UserCodeException, indicating that logs of function invocations during which a user code error occurred will be returned. Blank, indicating that all logs will be returned. * @type {string || null} */ this.RetCode = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RetCode = 'RetCode' in params ? params.RetCode : null; } } /** * ListLayerVersions response structure. * @class */ class ListLayerVersionsResponse extends AbstractModel { constructor(){ super(); /** * Layer version list * @type {Array.<LayerVersionInfo> || null} */ this.LayerVersions = null; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } if (params.LayerVersions) { this.LayerVersions = new Array(); for (let z in params.LayerVersions) { let obj = new LayerVersionInfo(); obj.deserialize(params.LayerVersions[z]); this.LayerVersions.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DeleteFunction request structure. * @class */ class DeleteFunctionRequest extends AbstractModel { constructor(){ super(); /** * Name of the function to be deleted * @type {string || null} */ this.FunctionName = null; /** * Function namespace * @type {string || null} */ this.Namespace = null; /** * ID of the version to delete. All versions are deleted if it’s left empty. * @type {string || null} */ this.Qualifier = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.FunctionName = 'FunctionName' in params ? params.FunctionName : null; this.Namespace = 'Namespace' in params ? params.Namespace : null; this.Qualifier = 'Qualifier' in params ? params.Qualifier : null; } } /** * CopyFunction response structure. * @class */ class CopyFunctionResponse extends AbstractModel { constructor(){ super(); /** * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * InvokeFunction response structure. * @class */ class InvokeFunctionResponse extends AbstractModel { constructor(){ super(); /** * Function execution result * @type {Result || null} */ this.Result = null; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } if (params.Result) { let obj = new Result(); obj.deserialize(params.Result) this.Result = obj; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Namespace * @class */ class Namespace extends AbstractModel { constructor(){ super(); /** * Creation time of the namespace * @type {string || null} */ this.ModTime = null; /** * Modification time of the namespace * @type {string || null} */ this.AddTime = null; /** * Namespace description * @type {string || null} */ this.Description = null; /** * Namespace name * @type {string || null} */ this.Name = null; /** * The default value is default. TCB indicates that the namespace is developed and created through the mini-program cloud. * @type {string || null} */ this.Type = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ModTime = 'ModTime' in params ? params.ModTime : null; this.AddTime = 'AddTime' in params ? params.AddTime : null; this.Description = 'Description' in params ? params.Description : null; this.Name = 'Name' in params ? params.Name : null; this.Type = 'Type' in params ? params.Type : null; } } /** * ListNamespaces request structure. * @class */ class ListNamespacesRequest extends AbstractModel { constructor(){ super(); /** * Return data length. The default value is `20`. * @type {number || null} */ this.Limit = null; /** * Data offset. The default value is `0`. * @type {number || null} */ this.Offset = null; /** * It specifies the sorting order of the results according to a specified field, such as `Name` and `Updatetime`. * @type {string || null} */ this.Orderby = null; /** * It specifies whether to return the results in ascending or descending order. The value is `ASC` or `DESC`. * @type {string || null} */ this.Order = null; /** * Specifies the range and keyword for search. The value of `Key` can be `Namespace` or `Description`. Multiple AND conditions can be specified. * @type {Array.<SearchKey> || null} */ this.SearchKey = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Limit = 'Limit' in params ? params.Limit : null; this.Offset = 'Offset' in params ? params.Offset : null; this.Orderby = 'Orderby' in params ? params.Orderby : null; this.Order = 'Order' in params ? params.Order : null; if (params.SearchKey) { this.SearchKey = new Array(); for (let z in params.SearchKey) { let obj = new SearchKey(); obj.deserialize(params.SearchKey[z]); this.SearchKey.push(obj); } } } } /** * PublishVersion request structure. * @class */ class PublishVersionRequest extends AbstractModel { constructor(){ super(); /** * Name of the released function * @type {string || null} */ this.FunctionName = null; /** * Function description * @type {string || null} */ this.Description = null; /** * Function namespace * @type {string || null} */ this.Namespace = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.FunctionName = 'FunctionName' in params ? params.FunctionName : null; this.Description = 'Description' in params ? params.Description : null; this.Namespace = 'Namespace' in params ? params.Namespace : null; } } /** * DeleteAlias request structure. * @class */ class DeleteAliasRequest extends AbstractModel { constructor(){ super(); /** * Function name * @type {string || null} */ this.FunctionName = null; /** * Alias name * @type {string || null} */ this.Name = null; /** * Function namespace * @type {string || null} */ this.Namespace = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.FunctionName = 'FunctionName' in params ? params.FunctionName : null; this.Name = 'Name' in params ? params.Name : null; this.Namespace = 'Namespace' in params ? params.Namespace : null; } } /** * ListVersionByFunction response structure. * @class */ class ListVersionByFunctionResponse extends AbstractModel { constructor(){ super(); /** * Function version * @type {Array.<string> || null} */ this.FunctionVersion = null; /** * Function version list Note: This field may return null, indicating that no valid values is found. * @type {Array.<FunctionVersion> || null} */ this.Versions = null; /** * Total number of function versions Note: This field may return null, indicating that no valid value was found. * @type {number || null} */ this.TotalCount = null; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.FunctionVersion = 'FunctionVersion' in params ? params.FunctionVersion : null; if (params.Versions) { this.Versions = new Array(); for (let z in params.Versions) { let obj = new FunctionVersion(); obj.deserialize(params.Versions[z]); this.Versions.push(obj); } } this.TotalCount = 'TotalCount' in params ? params.TotalCount : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * GetAlias request structure. * @class */ class GetAliasRequest extends AbstractModel { constructor(){ super(); /** * Function name * @type {string || null} */ this.FunctionName = null; /** * Alias name * @type {string || null} */ this.Name = null; /** * Function namespace * @type {string || null} */ this.Namespace = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.FunctionName = 'FunctionName' in params ? params.FunctionName : null; this.Name = 'Name' in params ? params.Name : null; this.Namespace = 'Namespace' in params ? params.Namespace : null; } } /** * DeleteNamespace request structure. * @class */ class DeleteNamespaceRequest extends AbstractModel { constructor(){ super(); /** * Namespace name * @type {string || null} */ this.Namespace = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Namespace = 'Namespace' in params ? params.Namespace : null; } } /** * UpdateFunctionCode request structure. * @class */ class UpdateFunctionCodeRequest extends AbstractModel { constructor(){ super(); /** * Name of the function to be modified * @type {string || null} */ this.FunctionName = null; /** * Function handler name, which is in the `file name.function name` form. Use a period (.) to separate a file name and function name. The file name and function name must start and end with letters and contain 2-60 characters, including letters, digits, underscores (_), and hyphens (-). * @type {string || null} */ this.Handler = null; /** * COS bucket name * @type {string || null} */ this.CosBucketName = null; /** * COS object path * @type {string || null} */ this.CosObjectName = null; /** * It contains a function code file and its dependencies in the ZIP format. When you use this API, the ZIP file needs to be encoded with Base64. Up to 20 MB is supported. * @type {string || null} */ this.ZipFile = null; /** * Function namespace * @type {string || null} */ this.Namespace = null; /** * COS region. Note: Beijing includes ap-beijing and ap-beijing-1. * @type {string || null} */ this.CosBucketRegion = null; /** * Whether to install dependencies automatically * @type {string || null} */ this.InstallDependency = null; /** * Function environment * @type {string || null} */ this.EnvId = null; /** * It specifies whether to synchronously release a new version during the update. The default value is `FALSE`, indicating not to release a new version. * @type {string || null} */ this.Publish = null; /** * Function code * @type {Code || null} */ this.Code = null; /** * Code source. Valid values: ZipFile, Cos, Inline * @type {string || null} */ this.CodeSource = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.FunctionName = 'FunctionName' in params ? params.FunctionName : null; this.Handler = 'Handler' in params ? params.Handler : null; this.CosBucketName = 'CosBucketName' in params ? params.CosBucketName : null; this.CosObjectName = 'CosObjectName' in params ? params.CosObjectName : null; this.ZipFile = 'ZipFile' in params ? params.ZipFile : null; this.Namespace = 'Namespace' in params ? params.Namespace : null; this.CosBucketRegion = 'CosBucketRegion' in params ? params.CosBucketRegion : null; this.InstallDependency = 'InstallDependency' in params ? params.InstallDependency : null; this.EnvId = 'EnvId' in params ? params.EnvId : null; this.Publish = 'Publish' in params ? params.Publish : null; if (params.Code) { let obj = new Code(); obj.deserialize(params.Code) this.Code = obj; } this.CodeSource = 'CodeSource' in params ? params.CodeSource : null; } } /** * DeleteReservedConcurrencyConfig request structure. * @class */ class DeleteReservedConcurrencyConfigRequest extends AbstractModel { constructor(){ super(); /** * Specifies the function of which you want to delete the reserved quota * @type {string || null} */ this.FunctionName = null; /** * Function namespace. Default value: `default` * @type {string || null} */ this.Namespace = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.FunctionName = 'FunctionName' in params ? params.FunctionName : null; this.Namespace = 'Namespace' in params ? params.Namespace : null; } } /** * GetFunctionEventInvokeConfig response structure. * @class */ class GetFunctionEventInvokeConfigResponse extends AbstractModel { constructor(){ super(); /** * Async retry configuration information * @type {AsyncTriggerConfig || null} */ this.AsyncTriggerConfig = null; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } if (params.AsyncTriggerConfig) { let obj = new AsyncTriggerConfig(); obj.deserialize(params.AsyncTriggerConfig) this.AsyncTriggerConfig = obj; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * ListTriggers response structure. * @class *