UNPKG

tencentcloud-sdk-nodejs-intl-en

Version:
2,042 lines (1,680 loc) • 232 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"); /** * DescribeCronJobs request structure. * @class */ class DescribeCronJobsRequest extends AbstractModel { constructor(){ super(); /** * Array of Project ID. * @type {Array.<string> || null} */ this.ProjectIds = null; /** * Offset. Default value is 0. * @type {number || null} */ this.Offset = null; /** * Number of returns. * @type {number || null} */ this.Limit = null; /** * Array of CronJob ID. * @type {Array.<string> || null} */ this.CronJobIds = null; /** * CronJob name, fuzzy query. * @type {string || null} */ this.CronJobName = null; /** * Array of CronJob status. * @type {Array.<number> || null} */ this.CronJobStatus = null; /** * Column for sorting. * @type {string || null} */ this.OrderBy = null; /** * Whether in ascending order. * @type {boolean || null} */ this.Ascend = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ProjectIds = 'ProjectIds' in params ? params.ProjectIds : null; this.Offset = 'Offset' in params ? params.Offset : null; this.Limit = 'Limit' in params ? params.Limit : null; this.CronJobIds = 'CronJobIds' in params ? params.CronJobIds : null; this.CronJobName = 'CronJobName' in params ? params.CronJobName : null; this.CronJobStatus = 'CronJobStatus' in params ? params.CronJobStatus : null; this.OrderBy = 'OrderBy' in params ? params.OrderBy : null; this.Ascend = 'Ascend' in params ? params.Ascend : null; } } /** * UpdateJob request structure. * @class */ class UpdateJobRequest extends AbstractModel { constructor(){ super(); /** * Job ID. * @type {string || null} */ this.JobId = null; /** * Project ID. * @type {string || null} */ this.ProjectId = null; /** * Scenario ID. * @type {string || null} */ this.ScenarioId = null; /** * Job note. * @type {string || null} */ this.Note = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.JobId = 'JobId' in params ? params.JobId : null; this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; this.ScenarioId = 'ScenarioId' in params ? params.ScenarioId : null; this.Note = 'Note' in params ? params.Note : null; } } /** * UpdateCronJob response structure. * @class */ class UpdateCronJobResponse 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; } } /** * DescribeSampleMatrixQuery response structure. * @class */ class DescribeSampleMatrixQueryResponse extends AbstractModel { constructor(){ super(); /** * Metric matrix. Note: This field may return null, indicating that no valid value is found. * @type {CustomSampleMatrix || null} */ this.MetricSampleMatrix = null; /** * 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; } if (params.MetricSampleMatrix) { let obj = new CustomSampleMatrix(); obj.deserialize(params.MetricSampleMatrix) this.MetricSampleMatrix = obj; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DescribeSampleLogs request structure. * @class */ class DescribeSampleLogsRequest extends AbstractModel { constructor(){ super(); /** * Project ID. * @type {string || null} */ this.ProjectId = null; /** * Scenario ID. * @type {string || null} */ this.ScenarioId = null; /** * Job ID. * @type {string || null} */ this.JobId = null; /** * Context is used when loading more logs. Pass through the Context value returned last time to retrieve subsequent log content. The expiration time is 1 hour. * @type {string || null} */ this.Context = null; /** * Log start time. * @type {string || null} */ this.From = null; /** * Log end time. * @type {string || null} */ this.To = null; /** * Log levels, such as debug, info, error. * @type {string || null} */ this.SeverityText = null; /** * Region of pressure engine instance, such as ap-shanghai, ap-guangzhou. * @type {string || null} */ this.InstanceRegion = null; /** * IP of pressure engine instance. * @type {string || null} */ this.Instance = null; /** * Type of log, can be left empty. 'Request' represents sampling logs. * @type {string || null} */ this.LogType = null; /** * Number of returned logs, maximum 100. * @type {number || null} */ this.Limit = null; /** * Response time range of sampling logs. * @type {ReactionTimeRange || null} */ this.ReactionTimeRange = null; /** * Status code of sampling logs. * @type {string || null} */ this.Status = null; /** * Result code of sampling logs. * @type {string || null} */ this.Result = null; /** * Request method of sampling logs. * @type {string || null} */ this.Method = null; /** * Request service of sampling logs. * @type {string || null} */ this.Service = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; this.ScenarioId = 'ScenarioId' in params ? params.ScenarioId : null; this.JobId = 'JobId' in params ? params.JobId : null; this.Context = 'Context' in params ? params.Context : null; this.From = 'From' in params ? params.From : null; this.To = 'To' in params ? params.To : null; this.SeverityText = 'SeverityText' in params ? params.SeverityText : null; this.InstanceRegion = 'InstanceRegion' in params ? params.InstanceRegion : null; this.Instance = 'Instance' in params ? params.Instance : null; this.LogType = 'LogType' in params ? params.LogType : null; this.Limit = 'Limit' in params ? params.Limit : null; if (params.ReactionTimeRange) { let obj = new ReactionTimeRange(); obj.deserialize(params.ReactionTimeRange) this.ReactionTimeRange = obj; } this.Status = 'Status' in params ? params.Status : null; this.Result = 'Result' in params ? params.Result : null; this.Method = 'Method' in params ? params.Method : null; this.Service = 'Service' in params ? params.Service : null; } } /** * DeleteJobs request structure. * @class */ class DeleteJobsRequest extends AbstractModel { constructor(){ super(); /** * Array of Job ID to be deleted. * @type {Array.<string> || null} */ this.JobIds = null; /** * Project ID. * @type {string || null} */ this.ProjectId = null; /** * Array of Scenario ID. * @type {Array.<string> || null} */ this.ScenarioIds = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.JobIds = 'JobIds' in params ? params.JobIds : null; this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; this.ScenarioIds = 'ScenarioIds' in params ? params.ScenarioIds : null; } } /** * Alert notification recipient group. * @class */ class AlertChannelRecord extends AbstractModel { constructor(){ super(); /** * Notice ID. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.NoticeId = null; /** * Consumer ID. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.AMPConsumerId = null; /** * Project ID. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.ProjectId = null; /** * Status. Note: This field may return null, indicating that no valid value is found. * @type {number || null} */ this.Status = null; /** * Create time. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.CreatedAt = null; /** * Update time. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.UpdatedAt = null; /** * App ID. Note: This field may return null, indicating that no valid value is found. * @type {number || null} */ this.AppId = null; /** * Account uin. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.Uin = null; /** * Sub account uin. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.SubAccountUin = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.NoticeId = 'NoticeId' in params ? params.NoticeId : null; this.AMPConsumerId = 'AMPConsumerId' in params ? params.AMPConsumerId : null; this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; this.Status = 'Status' in params ? params.Status : null; this.CreatedAt = 'CreatedAt' in params ? params.CreatedAt : null; this.UpdatedAt = 'UpdatedAt' in params ? params.UpdatedAt : null; this.AppId = 'AppId' in params ? params.AppId : null; this.Uin = 'Uin' in params ? params.Uin : null; this.SubAccountUin = 'SubAccountUin' in params ? params.SubAccountUin : null; } } /** * DescribeAlertRecords request structure. * @class */ class DescribeAlertRecordsRequest extends AbstractModel { constructor(){ super(); /** * Array of Project ID. * @type {Array.<string> || null} */ this.ProjectIds = null; /** * Array of Scenario ID. * @type {Array.<string> || null} */ this.ScenarioIds = null; /** * Array of Job ID. * @type {Array.<string> || null} */ this.JobIds = null; /** * Whether in ascending order. * @type {boolean || null} */ this.Ascend = null; /** * Column for sorting. * @type {string || null} */ this.OrderBy = null; /** * Offset. Default value is 0. * @type {number || null} */ this.Offset = null; /** * Number of returns. Default value is 20, maximum is 100 * @type {number || null} */ this.Limit = null; /** * Filter by Scenario names. * @type {Array.<string> || null} */ this.ScenarioNames = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ProjectIds = 'ProjectIds' in params ? params.ProjectIds : null; this.ScenarioIds = 'ScenarioIds' in params ? params.ScenarioIds : null; this.JobIds = 'JobIds' in params ? params.JobIds : null; this.Ascend = 'Ascend' in params ? params.Ascend : null; this.OrderBy = 'OrderBy' in params ? params.OrderBy : null; this.Offset = 'Offset' in params ? params.Offset : null; this.Limit = 'Limit' in params ? params.Limit : null; this.ScenarioNames = 'ScenarioNames' in params ? params.ScenarioNames : null; } } /** * DeleteAlertChannel response structure. * @class */ class DeleteAlertChannelResponse 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; } } /** * DescribeLabelValues request structure. * @class */ class DescribeLabelValuesRequest extends AbstractModel { constructor(){ super(); /** * Job ID. * @type {string || null} */ this.JobId = null; /** * Scenario ID. * @type {string || null} */ this.ScenarioId = null; /** * Metric name. For the value range, refer to all metric names returned by the DescribeMetricLabelWithValues API. * @type {string || null} */ this.Metric = null; /** * Label name. For the value range, refer to the metrics and label names returned by the DescribeMetricLabelWithValues API. * @type {string || null} */ this.LabelName = null; /** * Project ID. * @type {string || null} */ this.ProjectId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.JobId = 'JobId' in params ? params.JobId : null; this.ScenarioId = 'ScenarioId' in params ? params.ScenarioId : null; this.Metric = 'Metric' in params ? params.Metric : null; this.LabelName = 'LabelName' in params ? params.LabelName : null; this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; } } /** * AbortCronJobs response structure. * @class */ class AbortCronJobsResponse 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; } } /** * DescribeRequestSummary response structure. * @class */ class DescribeRequestSummaryResponse extends AbstractModel { constructor(){ super(); /** * Request summary information. Note: This field may return null, indicating that no valid value is found. * @type {Array.<RequestSummary> || null} */ this.RequestSummarySet = null; /** * 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; } if (params.RequestSummarySet) { this.RequestSummarySet = new Array(); for (let z in params.RequestSummarySet) { let obj = new RequestSummary(); obj.deserialize(params.RequestSummarySet[z]); this.RequestSummarySet.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DescribeScenarioWithJobs request structure. * @class */ class DescribeScenarioWithJobsRequest extends AbstractModel { constructor(){ super(); /** * Offset. Default value is 0. * @type {number || null} */ this.Offset = null; /** * Number of returns. Default value is 20, maximum is 100. * @type {number || null} */ this.Limit = null; /** * Array of Project ID. * @type {Array.<string> || null} */ this.ProjectIds = null; /** * Array of Scenario ID. * @type {Array.<string> || null} */ this.ScenarioIds = null; /** * Scenario Name. * @type {string || null} */ this.ScenarioName = null; /** * Array of Scenario status. * @type {number || null} */ this.ScenarioStatus = null; /** * Column for sorting. * @type {string || null} */ this.OrderBy = null; /** * Whether in ascending order. * @type {boolean || null} */ this.Ascend = null; /** * Parameters related to job. * @type {ScenarioRelatedJobsParams || null} */ this.ScenarioRelatedJobsParams = null; /** * Whether to return the test script content of the scenario. * @type {boolean || null} */ this.IgnoreScript = null; /** * Whether to return test data file information of the scenario. * @type {boolean || null} */ this.IgnoreDataset = null; /** * Scenario type, such as pts-http, pts-js, pts-jmeter. * @type {string || null} */ this.ScenarioType = null; /** * Creator. * @type {string || null} */ this.Owner = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Offset = 'Offset' in params ? params.Offset : null; this.Limit = 'Limit' in params ? params.Limit : null; this.ProjectIds = 'ProjectIds' in params ? params.ProjectIds : null; this.ScenarioIds = 'ScenarioIds' in params ? params.ScenarioIds : null; this.ScenarioName = 'ScenarioName' in params ? params.ScenarioName : null; this.ScenarioStatus = 'ScenarioStatus' in params ? params.ScenarioStatus : null; this.OrderBy = 'OrderBy' in params ? params.OrderBy : null; this.Ascend = 'Ascend' in params ? params.Ascend : null; if (params.ScenarioRelatedJobsParams) { let obj = new ScenarioRelatedJobsParams(); obj.deserialize(params.ScenarioRelatedJobsParams) this.ScenarioRelatedJobsParams = obj; } this.IgnoreScript = 'IgnoreScript' in params ? params.IgnoreScript : null; this.IgnoreDataset = 'IgnoreDataset' in params ? params.IgnoreDataset : null; this.ScenarioType = 'ScenarioType' in params ? params.ScenarioType : null; this.Owner = 'Owner' in params ? params.Owner : null; } } /** * CreateCronJob response structure. * @class */ class CreateCronJobResponse extends AbstractModel { constructor(){ super(); /** * Cron job ID. * @type {string || null} */ this.CronJobId = null; /** * 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.CronJobId = 'CronJobId' in params ? params.CronJobId : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * RestartCronJobs response structure. * @class */ class RestartCronJobsResponse 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; } } /** * SLA policy. * @class */ class SLAPolicy extends AbstractModel { constructor(){ super(); /** * SLA rules. Note: This field may return null, indicating that no valid value is found. * @type {Array.<SLARule> || null} */ this.SLARules = null; /** * Alert notification channel. Note: This field may return null, indicating that no valid value is found. * @type {AlertChannel || null} */ this.AlertChannel = null; } /** * @private */ deserialize(params) { if (!params) { return; } if (params.SLARules) { this.SLARules = new Array(); for (let z in params.SLARules) { let obj = new SLARule(); obj.deserialize(params.SLARules[z]); this.SLARules.push(obj); } } if (params.AlertChannel) { let obj = new AlertChannel(); obj.deserialize(params.AlertChannel) this.AlertChannel = obj; } } } /** * DNS configuration of the pressure machine. * @class */ class DNSConfig extends AbstractModel { constructor(){ super(); /** * DNS IP list. Note: This field may return null, indicating that no valid value is found. * @type {Array.<string> || null} */ this.Nameservers = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Nameservers = 'Nameservers' in params ? params.Nameservers : null; } } /** * Performance test script information. * @class */ class ScriptInfo extends AbstractModel { constructor(){ super(); /** * Filename. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.Name = null; /** * File size. Note: This field may return null, indicating that no valid value is found. * @type {number || null} */ this.Size = null; /** * File type. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.Type = null; /** * Update time. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.UpdatedAt = null; /** * Base64-encoded file content. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.EncodedContent = null; /** * Base64-encoded har structure. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.EncodedHttpArchive = null; /** * Script weight, range 1-100. Note: This field may return null, indicating that no valid value is found. * @type {number || null} */ this.LoadWeight = null; /** * File ID. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.FileId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Name = 'Name' in params ? params.Name : null; this.Size = 'Size' in params ? params.Size : null; this.Type = 'Type' in params ? params.Type : null; this.UpdatedAt = 'UpdatedAt' in params ? params.UpdatedAt : null; this.EncodedContent = 'EncodedContent' in params ? params.EncodedContent : null; this.EncodedHttpArchive = 'EncodedHttpArchive' in params ? params.EncodedHttpArchive : null; this.LoadWeight = 'LoadWeight' in params ? params.LoadWeight : null; this.FileId = 'FileId' in params ? params.FileId : null; } } /** * General log struct. * @class */ class NormalLog extends AbstractModel { constructor(){ super(); /** * Timestamp in milliseconds. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.Timestamp = null; /** * Log level. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.SeverityText = null; /** * Log output content. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.Body = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Timestamp = 'Timestamp' in params ? params.Timestamp : null; this.SeverityText = 'SeverityText' in params ? params.SeverityText : null; this.Body = 'Body' in params ? params.Body : null; } } /** * UpdateProject request structure. * @class */ class UpdateProjectRequest extends AbstractModel { constructor(){ super(); /** * Project ID. * @type {string || null} */ this.ProjectId = null; /** * Project name. * @type {string || null} */ this.Name = null; /** * Project description. * @type {string || null} */ this.Description = null; /** * Project status, default value 1 * @type {number || null} */ this.Status = null; /** * Tags. * @type {Array.<TagSpec> || null} */ this.Tags = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; this.Name = 'Name' in params ? params.Name : null; this.Description = 'Description' in params ? params.Description : null; this.Status = 'Status' in params ? params.Status : null; if (params.Tags) { this.Tags = new Array(); for (let z in params.Tags) { let obj = new TagSpec(); obj.deserialize(params.Tags[z]); this.Tags.push(obj); } } } } /** * AbortJob response structure. * @class */ class AbortJobResponse 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; } } /** * Project. * @class */ class Project extends AbstractModel { constructor(){ super(); /** * Project ID. * @type {string || null} */ this.ProjectId = null; /** * Project name. * @type {string || null} */ this.Name = null; /** * Project description. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.Description = null; /** * Tags. Note: This field may return null, indicating that no valid value is found. * @type {Array.<TagSpec> || null} */ this.Tags = null; /** * Project status. * @type {number || null} */ this.Status = null; /** * Create time. * @type {string || null} */ this.CreatedAt = null; /** * Update time. * @type {string || null} */ this.UpdatedAt = null; /** * App ID. * @type {number || null} */ this.AppId = null; /** * Uin. * @type {string || null} */ this.Uin = null; /** * Sub account uin. * @type {string || null} */ this.SubAccountUin = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; this.Name = 'Name' in params ? params.Name : null; this.Description = 'Description' in params ? params.Description : null; if (params.Tags) { this.Tags = new Array(); for (let z in params.Tags) { let obj = new TagSpec(); obj.deserialize(params.Tags[z]); this.Tags.push(obj); } } this.Status = 'Status' in params ? params.Status : null; this.CreatedAt = 'CreatedAt' in params ? params.CreatedAt : null; this.UpdatedAt = 'UpdatedAt' in params ? params.UpdatedAt : null; this.AppId = 'AppId' in params ? params.AppId : null; this.Uin = 'Uin' in params ? params.Uin : null; this.SubAccountUin = 'SubAccountUin' in params ? params.SubAccountUin : null; } } /** * UpdateEnvironment request structure. * @class */ class UpdateEnvironmentRequest extends AbstractModel { constructor(){ super(); } /** * @private */ deserialize(params) { if (!params) { return; } } } /** * DescribeRegions response structure. * @class */ class DescribeRegionsResponse extends AbstractModel { constructor(){ super(); /** * Array of regions. Note: This field may return null, indicating that no valid value is found. * @type {Array.<RegionDetail> || null} */ this.RegionSet = null; /** * 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; } if (params.RegionSet) { this.RegionSet = new Array(); for (let z in params.RegionSet) { let obj = new RegionDetail(); obj.deserialize(params.RegionSet[z]); this.RegionSet.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Sampling log attributes * @class */ class Attributes extends AbstractModel { constructor(){ super(); /** * Response status code. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.Status = null; /** * Response result code. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.Result = null; /** * Request service. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.Service = null; /** * Request method. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.Method = null; /** * Request duration. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.Duration = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Status = 'Status' in params ? params.Status : null; this.Result = 'Result' in params ? params.Result : null; this.Service = 'Service' in params ? params.Service : null; this.Method = 'Method' in params ? params.Method : null; this.Duration = 'Duration' in params ? params.Duration : null; } } /** * CreateEnvironment response structure. * @class */ class CreateEnvironmentResponse 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; } } /** * UpdateScenario response structure. * @class */ class UpdateScenarioResponse 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; } } /** * File. * @class */ class File extends AbstractModel { constructor(){ super(); /** * File ID. * @type {string || null} */ this.FileId = null; /** * File type. 1 represents parameter file, 2 represents protocol file, 3 represents request file. * @type {number || null} */ this.Kind = null; /** * Filename. * @type {string || null} */ this.Name = null; /** * File size. * @type {number || null} */ this.Size = null; /** * File type. The 'folder' represents a folder; if not specified, it represents a normal file. * @type {string || null} */ this.Type = null; /** * Update time. * @type {string || null} */ this.UpdatedAt = null; /** * Number of file lines. Note: This field may return null, indicating that no valid value is found. * @type {number || null} */ this.LineCount = null; /** * First few rows of file. Note: This field may return null, indicating that no valid value is found. * @type {Array.<string> || null} */ this.HeadLines = null; /** * Last few rows of file. Note: This field may return null, indicating that no valid value is found. * @type {Array.<string> || null} */ this.TailLines = null; /** * Whether the header is in the file. Note: This field may return null, indicating that no valid value is found. * @type {boolean || null} */ this.HeaderInFile = null; /** * Parameter name. Note: This field may return null, indicating that no valid value is found. * @type {Array.<string> || null} */ this.HeaderColumns = null; /** * Files in the folder. Note: This field may return null, indicating that no valid value is found. * @type {Array.<FileInfo> || null} */ this.FileInfos = null; /** * Associated scenario. Note: This field may return null, indicating that no valid value is found. * @type {Array.<Scenario> || null} */ this.ScenarioSet = null; /** * File status. Note: This field may return null, indicating that no valid value is found. * @type {number || null} */ this.Status = null; /** * Create time. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.CreatedAt = null; /** * Project ID. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.ProjectId = null; /** * Deprecated. Note: This field may return null, indicating that no valid value is found. * @type {number || null} */ this.AppID = null; /** * Uin. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.Uin = null; /** * Sub account uin. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.SubAccountUin = null; /** * App ID of user account. Note: This field may return null, indicating that no valid value is found. * @type {number || null} */ this.AppId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.FileId = 'FileId' in params ? params.FileId : null; this.Kind = 'Kind' in params ? params.Kind : null; this.Name = 'Name' in params ? params.Name : null; this.Size = 'Size' in params ? params.Size : null; this.Type = 'Type' in params ? params.Type : null; this.UpdatedAt = 'UpdatedAt' in params ? params.UpdatedAt : null; this.LineCount = 'LineCount' in params ? params.LineCount : null; this.HeadLines = 'HeadLines' in params ? params.HeadLines : null; this.TailLines = 'TailLines' in params ? params.TailLines : null; this.HeaderInFile = 'HeaderInFile' in params ? params.HeaderInFile : null; this.HeaderColumns = 'HeaderColumns' in params ? params.HeaderColumns : null; if (params.FileInfos) { this.FileInfos = new Array(); for (let z in params.FileInfos) { let obj = new FileInfo(); obj.deserialize(params.FileInfos[z]); this.FileInfos.push(obj); } } if (params.ScenarioSet) { this.ScenarioSet = new Array(); for (let z in params.ScenarioSet) { let obj = new Scenario(); obj.deserialize(params.ScenarioSet[z]); this.ScenarioSet.push(obj); } } this.Status = 'Status' in params ? params.Status : null; this.CreatedAt = 'CreatedAt' in params ? params.CreatedAt : null; this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; this.AppID = 'AppID' in params ? params.AppID : null; this.Uin = 'Uin' in params ? params.Uin : null; this.SubAccountUin = 'SubAccountUin' in params ? params.SubAccountUin : null; this.AppId = 'AppId' in params ? params.AppId : null; } } /** * DescribeEnvironments request structure. * @class */ class DescribeEnvironmentsRequest extends AbstractModel { constructor(){ super(); } /** * @private */ deserialize(params) { if (!params) { return; } } } /** * Sample includes metric, aggregation from original metric query statement. * @class */ class CustomSample extends AbstractModel { constructor(){ super(); /** * Metric name. * @type {string || null} */ this.Metric = null; /** * Aggregation condition. * @type {string || null} */ this.Aggregation = null; /** * Label filter. Note: This field may return null, indicating that no valid value is found. * @type {Array.<Label> || null} */ this.Labels = null; /** * Value obtained from the query. * @type {number || null} */ this.Value = null; /** * Time is the number of milliseconds since the epoch (1970-01-01 00:00 UTC) excluding leap seconds. * @type {number || null} */ this.Timestamp = null; /** * Unit corresponding to the metric, including s(second), bytes, bytes/s, reqs, reqs/s, checks, checks/s, iters, iters/s, VUs, %. * @type {string || null} */ this.Unit = null; /** * Metric name in PTS. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.Name = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Metric = 'Metric' in params ? params.Metric : null; this.Aggregation = 'Aggregation' in params ? params.Aggregation : null; if (params.Labels) { this.Labels = new Array(); for (let z in params.Labels) { let obj = new Label(); obj.deserialize(params.Labels[z]); this.Labels.push(obj); } } this.Value = 'Value' in params ? params.Value : null; this.Timestamp = 'Timestamp' in params ? params.Timestamp : null; this.Unit = 'Unit' in params ? params.Unit : null; this.Name = 'Name' in params ? params.Name : null; } } /** * CreateProject request structure. * @class */ class CreateProjectRequest extends AbstractModel { constructor(){ super(); /** * Project name. * @type {string || null} */ this.Name = null; /** * Project description. * @type {string || null} */ this.Description = null; /** * Array of tags. * @type {Array.<TagSpec> || null} */ this.Tags = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Name = 'Name' in params ? params.Name : null; this.Description = 'Description' in params ? params.Description : null; if (params.Tags) { this.Tags = new Array(); for (let z in params.Tags) { let obj = new TagSpec(); obj.deserialize(params.Tags[z]); this.Tags.push(obj); } } } } /** * AdjustJobSpeed request structure. * @class */ class AdjustJobSpeedRequest extends AbstractModel { constructor(){ super(); /** * Job ID. * @type {string || null} */ this.JobId = null; /** * Target RPS. The value should be greater than the initial RPS and less than the maximum RPS. * @type {number || null} */ this.TargetRequestsPerSecond = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.JobId = 'JobId' in params ? params.JobId : null; this.TargetRequestsPerSecond = 'TargetRequestsPerSecond' in params ? params.TargetRequestsPerSecond : null; } } /** * DescribeRequestSummary request structure. * @class */ class DescribeRequestSummaryRequest extends AbstractModel { constructor(){ super(); /** * Job ID. * @type {string || null} */ this.JobId = null; /** * Scenario ID. * @type {string || null} */ this.ScenarioId = null; /** * Project ID. * @type {string || null} */ this.ProjectId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.JobId = 'JobId' in params ? params.JobId : null; this.ScenarioId = 'ScenarioId' in params ? params.ScenarioId : null; this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; } } /** * Domain configuration of the pressure machine. * @class */ class HostAlias extends AbstractModel { constructor(){ super(); /** * Domain list to be bound. Note: This field may return null, indicating that no valid value is found. * @type {Array.<string> || null} */ this.HostNames = null; /** * IP address to be bound. Note: This field may return null, indicating that no valid value is found. * @type {string || null} */ this.IP = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.HostNames = 'HostNames' in params ? params.HostNames : null; this.IP = 'IP' in params ? params.IP : null; } } /** * CreateFile response structure. * @class */ class CreateFileResponse 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; } } /** * DeleteProjects response structure. * @class */ class DeleteProjectsResponse 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; }