testit-js-commons 4.2.0-TMS-5.8 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/adapters-api/dist/ApiClient.js +683 -0
- package/lib/adapters-api/dist/api/AttachmentsApi.js +165 -0
- package/lib/adapters-api/dist/api/AutoTestsApi.js +536 -0
- package/lib/adapters-api/dist/api/ConfigurationsApi.js +91 -0
- package/lib/adapters-api/dist/api/ParametersApi.js +159 -0
- package/lib/adapters-api/dist/api/ProjectAttributesApi.js +140 -0
- package/lib/adapters-api/dist/api/ProjectSectionsApi.js +96 -0
- package/lib/adapters-api/dist/api/ProjectWorkItemsApi.js +99 -0
- package/lib/adapters-api/dist/api/ProjectsApi.js +200 -0
- package/lib/adapters-api/dist/api/SectionsApi.js +118 -0
- package/lib/adapters-api/dist/api/TestResultsApi.js +168 -0
- package/lib/adapters-api/dist/api/TestRunsApi.js +331 -0
- package/lib/adapters-api/dist/api/WorkItemsApi.js +170 -0
- package/lib/adapters-api/dist/api/WorkflowsApi.js +75 -0
- package/lib/adapters-api/dist/index.js +951 -0
- package/lib/adapters-api/dist/model/AssignAttachmentApiModel.js +89 -0
- package/lib/adapters-api/dist/model/AssignAutoTestCaseIdApiModel.js +89 -0
- package/lib/adapters-api/dist/model/AssignIterationApiModel.js +112 -0
- package/lib/adapters-api/dist/model/AttachmentApiResult.js +145 -0
- package/lib/adapters-api/dist/model/AttachmentModel.js +193 -0
- package/lib/adapters-api/dist/model/AttachmentPutModel.js +89 -0
- package/lib/adapters-api/dist/model/AttachmentPutModelAutoTestStepResultsModel.js +196 -0
- package/lib/adapters-api/dist/model/AttachmentUpdateRequest.js +89 -0
- package/lib/adapters-api/dist/model/AutoTest.js +327 -0
- package/lib/adapters-api/dist/model/AutoTestApiResult.js +323 -0
- package/lib/adapters-api/dist/model/AutoTestCaseApiModel.js +89 -0
- package/lib/adapters-api/dist/model/AutoTestCreateApiModel.js +323 -0
- package/lib/adapters-api/dist/model/AutoTestFilterApiModel.js +201 -0
- package/lib/adapters-api/dist/model/AutoTestIdModel.js +88 -0
- package/lib/adapters-api/dist/model/AutoTestModel.js +488 -0
- package/lib/adapters-api/dist/model/AutoTestResultReasonShort.js +99 -0
- package/lib/adapters-api/dist/model/AutoTestResultsForTestRunModel.js +334 -0
- package/lib/adapters-api/dist/model/AutoTestSearchApiModel.js +96 -0
- package/lib/adapters-api/dist/model/AutoTestSearchIncludeApiModel.js +93 -0
- package/lib/adapters-api/dist/model/AutoTestStep.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepApiModel.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepApiResult.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepModel.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepResult.js +196 -0
- package/lib/adapters-api/dist/model/AutoTestStepResultUpdateRequest.js +196 -0
- package/lib/adapters-api/dist/model/AutoTestUpdateApiModel.js +327 -0
- package/lib/adapters-api/dist/model/AutoTestWorkItemIdentifierApiResult.js +100 -0
- package/lib/adapters-api/dist/model/AvailableTestResultOutcome.js +67 -0
- package/lib/adapters-api/dist/model/ConfigurationFilterModel.js +114 -0
- package/lib/adapters-api/dist/model/ConfigurationModel.js +213 -0
- package/lib/adapters-api/dist/model/ConfigurationShortModel.js +102 -0
- package/lib/adapters-api/dist/model/CreateEmptyTestRunApiModel.js +185 -0
- package/lib/adapters-api/dist/model/CreateLinkApiModel.js +127 -0
- package/lib/adapters-api/dist/model/CreateParameterApiModel.js +117 -0
- package/lib/adapters-api/dist/model/CreateProjectApiModel.js +124 -0
- package/lib/adapters-api/dist/model/CreateStepApiModel.js +131 -0
- package/lib/adapters-api/dist/model/CreateWorkItemApiModel.js +384 -0
- package/lib/adapters-api/dist/model/CustomAttributeApiResult.js +184 -0
- package/lib/adapters-api/dist/model/CustomAttributeGetModel.js +184 -0
- package/lib/adapters-api/dist/model/CustomAttributeOptionApiResult.js +124 -0
- package/lib/adapters-api/dist/model/CustomAttributeOptionModel.js +124 -0
- package/lib/adapters-api/dist/model/CustomAttributePutModel.js +182 -0
- package/lib/adapters-api/dist/model/CustomAttributeType.js +73 -0
- package/lib/adapters-api/dist/model/CustomAttributeTypesEnum.js +73 -0
- package/lib/adapters-api/dist/model/DateTimeRangeSelectorModel.js +82 -0
- package/lib/adapters-api/dist/model/DeletionState.js +55 -0
- package/lib/adapters-api/dist/model/DetailedProjectApiResult.js +204 -0
- package/lib/adapters-api/dist/model/FailureCategoryModel.js +67 -0
- package/lib/adapters-api/dist/model/GuidExtractionModel.js +90 -0
- package/lib/adapters-api/dist/model/ImageResizeType.js +49 -0
- package/lib/adapters-api/dist/model/Int32RangeSelectorModel.js +82 -0
- package/lib/adapters-api/dist/model/Int64RangeSelectorModel.js +82 -0
- package/lib/adapters-api/dist/model/IterationApiResult.js +109 -0
- package/lib/adapters-api/dist/model/IterationModel.js +109 -0
- package/lib/adapters-api/dist/model/LabelApiModel.js +100 -0
- package/lib/adapters-api/dist/model/LabelApiResult.js +100 -0
- package/lib/adapters-api/dist/model/LabelShortModel.js +100 -0
- package/lib/adapters-api/dist/model/LinkApiResult.js +140 -0
- package/lib/adapters-api/dist/model/LinkCreateApiModel.js +127 -0
- package/lib/adapters-api/dist/model/LinkModel.js +149 -0
- package/lib/adapters-api/dist/model/LinkPostModel.js +137 -0
- package/lib/adapters-api/dist/model/LinkPutModel.js +149 -0
- package/lib/adapters-api/dist/model/LinkShortApiResult.js +126 -0
- package/lib/adapters-api/dist/model/LinkType.js +73 -0
- package/lib/adapters-api/dist/model/LinkUpdateApiModel.js +140 -0
- package/lib/adapters-api/dist/model/ManualRerunApiResult.js +84 -0
- package/lib/adapters-api/dist/model/ManualRerunSelectTestResultsApiModel.js +109 -0
- package/lib/adapters-api/dist/model/ManualRerunTestResultApiModel.js +81 -0
- package/lib/adapters-api/dist/model/Operation.js +110 -0
- package/lib/adapters-api/dist/model/ParameterApiResult.js +154 -0
- package/lib/adapters-api/dist/model/ParameterIterationModel.js +100 -0
- package/lib/adapters-api/dist/model/ParameterShortApiResult.js +132 -0
- package/lib/adapters-api/dist/model/ParameterShortModel.js +158 -0
- package/lib/adapters-api/dist/model/ParametersFilterApiModel.js +98 -0
- package/lib/adapters-api/dist/model/ProblemDetails.js +124 -0
- package/lib/adapters-api/dist/model/ProjectApiResult.js +165 -0
- package/lib/adapters-api/dist/model/ProjectAttributesFilterModel.js +132 -0
- package/lib/adapters-api/dist/model/ProjectTypeModel.js +49 -0
- package/lib/adapters-api/dist/model/ProjectsFilterModel.js +209 -0
- package/lib/adapters-api/dist/model/SectionModel.js +180 -0
- package/lib/adapters-api/dist/model/SectionPostModel.js +178 -0
- package/lib/adapters-api/dist/model/SectionWithStepsModel.js +242 -0
- package/lib/adapters-api/dist/model/SharedStepModel.js +145 -0
- package/lib/adapters-api/dist/model/SharedStepResultApiModel.js +102 -0
- package/lib/adapters-api/dist/model/StepCommentApiModel.js +207 -0
- package/lib/adapters-api/dist/model/StepModel.js +163 -0
- package/lib/adapters-api/dist/model/StepPostModel.js +126 -0
- package/lib/adapters-api/dist/model/StepResultApiModel.js +149 -0
- package/lib/adapters-api/dist/model/TagModel.js +88 -0
- package/lib/adapters-api/dist/model/TestResultLinkApiResult.js +153 -0
- package/lib/adapters-api/dist/model/TestResultOutcome.js +67 -0
- package/lib/adapters-api/dist/model/TestResultResponse.js +400 -0
- package/lib/adapters-api/dist/model/TestResultShortResponse.js +311 -0
- package/lib/adapters-api/dist/model/TestResultStepCommentUpdateRequest.js +152 -0
- package/lib/adapters-api/dist/model/TestResultUpdateRequest.js +285 -0
- package/lib/adapters-api/dist/model/TestResultsFilterApiModel.js +226 -0
- package/lib/adapters-api/dist/model/TestRunApiResult.js +196 -0
- package/lib/adapters-api/dist/model/TestRunState.js +61 -0
- package/lib/adapters-api/dist/model/TestStatusApiResult.js +114 -0
- package/lib/adapters-api/dist/model/TestStatusApiType.js +67 -0
- package/lib/adapters-api/dist/model/TestStatusModel.js +149 -0
- package/lib/adapters-api/dist/model/TestStatusType.js +67 -0
- package/lib/adapters-api/dist/model/UpdateEmptyTestRunApiModel.js +187 -0
- package/lib/adapters-api/dist/model/UpdateLinkApiModel.js +140 -0
- package/lib/adapters-api/dist/model/ValidationProblemDetails.js +144 -0
- package/lib/adapters-api/dist/model/WorkItemApiResult.js +499 -0
- package/lib/adapters-api/dist/model/WorkItemEntityTypeApiModel.js +55 -0
- package/lib/adapters-api/dist/model/WorkItemFilterApiModel.js +309 -0
- package/lib/adapters-api/dist/model/WorkItemIdApiModel.js +89 -0
- package/lib/adapters-api/dist/model/WorkItemParameterKeyApiModel.js +89 -0
- package/lib/adapters-api/dist/model/WorkItemParameterKeyApiResult.js +88 -0
- package/lib/adapters-api/dist/model/WorkItemPriorityApiModel.js +67 -0
- package/lib/adapters-api/dist/model/WorkItemPriorityModel.js +67 -0
- package/lib/adapters-api/dist/model/WorkItemSelectApiModel.js +90 -0
- package/lib/adapters-api/dist/model/WorkItemShortApiResult.js +316 -0
- package/lib/adapters-api/dist/model/WorkItemSourceTypeModel.js +49 -0
- package/lib/adapters-api/dist/model/WorkItemStateApiModel.js +55 -0
- package/lib/adapters-api/dist/model/WorkItemStates.js +55 -0
- package/lib/adapters-api/dist/model/WorkItemTypeModel.js +55 -0
- package/lib/adapters-api/dist/model/WorkflowApiResult.js +111 -0
- package/lib/adapters-api/dist/model/WorkflowStatusApiResult.js +114 -0
- package/lib/adapters-api/index.d.ts +8862 -0
- package/lib/common/base.converter.d.ts +16 -17
- package/lib/common/base.converter.js +12 -14
- package/lib/common/base.service.d.ts +1 -1
- package/lib/common/base.service.js +6 -36
- package/lib/services/attachments/attachments.service.d.ts +1 -2
- package/lib/services/attachments/attachments.service.js +7 -7
- package/lib/services/autotests/autotests.converter.d.ts +2 -3
- package/lib/services/autotests/autotests.converter.js +0 -5
- package/lib/services/autotests/autotests.service.d.ts +1 -2
- package/lib/services/autotests/autotests.service.js +11 -44
- package/lib/services/testresults/testresults.converter.d.ts +4 -5
- package/lib/services/testresults/testresults.converter.js +0 -15
- package/lib/services/testresults/testresults.service.d.ts +2 -3
- package/lib/services/testresults/testresults.service.js +16 -44
- package/lib/services/testresults/testresults.type.d.ts +1 -1
- package/lib/services/testruns/testruns.converter.d.ts +12 -13
- package/lib/services/testruns/testruns.converter.js +19 -8
- package/lib/services/testruns/testruns.service.d.ts +1 -2
- package/lib/services/testruns/testruns.service.js +13 -46
- package/package.json +7 -5
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
/**
|
|
10
|
+
* API
|
|
11
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
12
|
+
*
|
|
13
|
+
* The version of the OpenAPI document: adapters
|
|
14
|
+
*
|
|
15
|
+
*
|
|
16
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
17
|
+
* https://openapi-generator.tech
|
|
18
|
+
* Do not edit the class manually.
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The AutoTestIdModel model module.
|
|
24
|
+
* @module model/AutoTestIdModel
|
|
25
|
+
* @version 1.0.0
|
|
26
|
+
*/
|
|
27
|
+
class AutoTestIdModel {
|
|
28
|
+
/**
|
|
29
|
+
* Constructs a new <code>AutoTestIdModel</code>.
|
|
30
|
+
* @alias module:model/AutoTestIdModel
|
|
31
|
+
* @param id {String}
|
|
32
|
+
*/
|
|
33
|
+
constructor(id) {
|
|
34
|
+
AutoTestIdModel.initialize(this, id);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Initializes the fields of this object.
|
|
39
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
40
|
+
* Only for internal use.
|
|
41
|
+
*/
|
|
42
|
+
static initialize(obj, id) {
|
|
43
|
+
obj['id'] = id;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Constructs a <code>AutoTestIdModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
48
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
49
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
50
|
+
* @param {module:model/AutoTestIdModel} obj Optional instance to populate.
|
|
51
|
+
* @return {module:model/AutoTestIdModel} The populated <code>AutoTestIdModel</code> instance.
|
|
52
|
+
*/
|
|
53
|
+
static constructFromObject(data, obj) {
|
|
54
|
+
if (data) {
|
|
55
|
+
obj = obj || new AutoTestIdModel();
|
|
56
|
+
if (data.hasOwnProperty('id')) {
|
|
57
|
+
obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return obj;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Validates the JSON data with respect to <code>AutoTestIdModel</code>.
|
|
65
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
66
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>AutoTestIdModel</code>.
|
|
67
|
+
*/
|
|
68
|
+
static validateJSON(data) {
|
|
69
|
+
// check to make sure all required properties are present in the JSON string
|
|
70
|
+
for (const property of AutoTestIdModel.RequiredProperties) {
|
|
71
|
+
if (!data.hasOwnProperty(property)) {
|
|
72
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
// ensure the json data is a string
|
|
76
|
+
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
77
|
+
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
78
|
+
}
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
AutoTestIdModel.RequiredProperties = ["id"];
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @member {String} id
|
|
86
|
+
*/
|
|
87
|
+
AutoTestIdModel.prototype['id'] = undefined;
|
|
88
|
+
var _default = exports.default = AutoTestIdModel;
|
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _AutoTestStepModel = _interopRequireDefault(require("./AutoTestStepModel"));
|
|
9
|
+
var _ConfigurationShortModel = _interopRequireDefault(require("./ConfigurationShortModel"));
|
|
10
|
+
var _LabelShortModel = _interopRequireDefault(require("./LabelShortModel"));
|
|
11
|
+
var _LinkPutModel = _interopRequireDefault(require("./LinkPutModel"));
|
|
12
|
+
var _TestStatusModel = _interopRequireDefault(require("./TestStatusModel"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
/**
|
|
15
|
+
* API
|
|
16
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
17
|
+
*
|
|
18
|
+
* The version of the OpenAPI document: adapters
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
+
* https://openapi-generator.tech
|
|
23
|
+
* Do not edit the class manually.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The AutoTestModel model module.
|
|
29
|
+
* @module model/AutoTestModel
|
|
30
|
+
* @version 1.0.0
|
|
31
|
+
*/
|
|
32
|
+
class AutoTestModel {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>AutoTestModel</code>.
|
|
35
|
+
* @alias module:model/AutoTestModel
|
|
36
|
+
* @param globalId {Number} Global ID of the autotest
|
|
37
|
+
* @param isDeleted {Boolean} Indicates if the autotest is deleted
|
|
38
|
+
* @param mustBeApproved {Boolean} Indicates if the autotest has unapproved changes from linked work items
|
|
39
|
+
* @param id {String} Unique ID of the autotest
|
|
40
|
+
* @param createdDate {Date} Creation date of the autotest
|
|
41
|
+
* @param createdById {String} Unique ID of the project creator
|
|
42
|
+
* @param externalId {String} External ID of the autotest
|
|
43
|
+
* @param projectId {String} Unique ID of the autotest project
|
|
44
|
+
* @param name {String} Name of the autotest
|
|
45
|
+
*/
|
|
46
|
+
constructor(globalId, isDeleted, mustBeApproved, id, createdDate, createdById, externalId, projectId, name) {
|
|
47
|
+
AutoTestModel.initialize(this, globalId, isDeleted, mustBeApproved, id, createdDate, createdById, externalId, projectId, name);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Initializes the fields of this object.
|
|
52
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
53
|
+
* Only for internal use.
|
|
54
|
+
*/
|
|
55
|
+
static initialize(obj, globalId, isDeleted, mustBeApproved, id, createdDate, createdById, externalId, projectId, name) {
|
|
56
|
+
obj['globalId'] = globalId;
|
|
57
|
+
obj['isDeleted'] = isDeleted;
|
|
58
|
+
obj['mustBeApproved'] = mustBeApproved;
|
|
59
|
+
obj['id'] = id;
|
|
60
|
+
obj['createdDate'] = createdDate;
|
|
61
|
+
obj['createdById'] = createdById;
|
|
62
|
+
obj['externalId'] = externalId;
|
|
63
|
+
obj['projectId'] = projectId;
|
|
64
|
+
obj['name'] = name;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Constructs a <code>AutoTestModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
69
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
70
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
71
|
+
* @param {module:model/AutoTestModel} obj Optional instance to populate.
|
|
72
|
+
* @return {module:model/AutoTestModel} The populated <code>AutoTestModel</code> instance.
|
|
73
|
+
*/
|
|
74
|
+
static constructFromObject(data, obj) {
|
|
75
|
+
if (data) {
|
|
76
|
+
obj = obj || new AutoTestModel();
|
|
77
|
+
if (data.hasOwnProperty('globalId')) {
|
|
78
|
+
obj['globalId'] = _ApiClient.default.convertToType(data['globalId'], 'Number');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('isDeleted')) {
|
|
81
|
+
obj['isDeleted'] = _ApiClient.default.convertToType(data['isDeleted'], 'Boolean');
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('mustBeApproved')) {
|
|
84
|
+
obj['mustBeApproved'] = _ApiClient.default.convertToType(data['mustBeApproved'], 'Boolean');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('id')) {
|
|
87
|
+
obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('createdDate')) {
|
|
90
|
+
obj['createdDate'] = _ApiClient.default.convertToType(data['createdDate'], 'Date');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('modifiedDate')) {
|
|
93
|
+
obj['modifiedDate'] = _ApiClient.default.convertToType(data['modifiedDate'], 'Date');
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('createdById')) {
|
|
96
|
+
obj['createdById'] = _ApiClient.default.convertToType(data['createdById'], 'String');
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty('modifiedById')) {
|
|
99
|
+
obj['modifiedById'] = _ApiClient.default.convertToType(data['modifiedById'], 'String');
|
|
100
|
+
}
|
|
101
|
+
if (data.hasOwnProperty('lastTestRunId')) {
|
|
102
|
+
obj['lastTestRunId'] = _ApiClient.default.convertToType(data['lastTestRunId'], 'String');
|
|
103
|
+
}
|
|
104
|
+
if (data.hasOwnProperty('lastTestRunName')) {
|
|
105
|
+
obj['lastTestRunName'] = _ApiClient.default.convertToType(data['lastTestRunName'], 'String');
|
|
106
|
+
}
|
|
107
|
+
if (data.hasOwnProperty('lastTestResultId')) {
|
|
108
|
+
obj['lastTestResultId'] = _ApiClient.default.convertToType(data['lastTestResultId'], 'String');
|
|
109
|
+
}
|
|
110
|
+
if (data.hasOwnProperty('lastTestResultConfiguration')) {
|
|
111
|
+
obj['lastTestResultConfiguration'] = _ApiClient.default.convertToType(data['lastTestResultConfiguration'], _ConfigurationShortModel.default);
|
|
112
|
+
}
|
|
113
|
+
if (data.hasOwnProperty('lastTestResultOutcome')) {
|
|
114
|
+
obj['lastTestResultOutcome'] = _ApiClient.default.convertToType(data['lastTestResultOutcome'], 'String');
|
|
115
|
+
}
|
|
116
|
+
if (data.hasOwnProperty('lastTestResultStatus')) {
|
|
117
|
+
obj['lastTestResultStatus'] = _ApiClient.default.convertToType(data['lastTestResultStatus'], _TestStatusModel.default);
|
|
118
|
+
}
|
|
119
|
+
if (data.hasOwnProperty('stabilityPercentage')) {
|
|
120
|
+
obj['stabilityPercentage'] = _ApiClient.default.convertToType(data['stabilityPercentage'], 'Number');
|
|
121
|
+
}
|
|
122
|
+
if (data.hasOwnProperty('externalId')) {
|
|
123
|
+
obj['externalId'] = _ApiClient.default.convertToType(data['externalId'], 'String');
|
|
124
|
+
}
|
|
125
|
+
if (data.hasOwnProperty('links')) {
|
|
126
|
+
obj['links'] = _ApiClient.default.convertToType(data['links'], [_LinkPutModel.default]);
|
|
127
|
+
}
|
|
128
|
+
if (data.hasOwnProperty('projectId')) {
|
|
129
|
+
obj['projectId'] = _ApiClient.default.convertToType(data['projectId'], 'String');
|
|
130
|
+
}
|
|
131
|
+
if (data.hasOwnProperty('name')) {
|
|
132
|
+
obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
|
|
133
|
+
}
|
|
134
|
+
if (data.hasOwnProperty('namespace')) {
|
|
135
|
+
obj['namespace'] = _ApiClient.default.convertToType(data['namespace'], 'String');
|
|
136
|
+
}
|
|
137
|
+
if (data.hasOwnProperty('classname')) {
|
|
138
|
+
obj['classname'] = _ApiClient.default.convertToType(data['classname'], 'String');
|
|
139
|
+
}
|
|
140
|
+
if (data.hasOwnProperty('steps')) {
|
|
141
|
+
obj['steps'] = _ApiClient.default.convertToType(data['steps'], [_AutoTestStepModel.default]);
|
|
142
|
+
}
|
|
143
|
+
if (data.hasOwnProperty('setup')) {
|
|
144
|
+
obj['setup'] = _ApiClient.default.convertToType(data['setup'], [_AutoTestStepModel.default]);
|
|
145
|
+
}
|
|
146
|
+
if (data.hasOwnProperty('teardown')) {
|
|
147
|
+
obj['teardown'] = _ApiClient.default.convertToType(data['teardown'], [_AutoTestStepModel.default]);
|
|
148
|
+
}
|
|
149
|
+
if (data.hasOwnProperty('title')) {
|
|
150
|
+
obj['title'] = _ApiClient.default.convertToType(data['title'], 'String');
|
|
151
|
+
}
|
|
152
|
+
if (data.hasOwnProperty('description')) {
|
|
153
|
+
obj['description'] = _ApiClient.default.convertToType(data['description'], 'String');
|
|
154
|
+
}
|
|
155
|
+
if (data.hasOwnProperty('labels')) {
|
|
156
|
+
obj['labels'] = _ApiClient.default.convertToType(data['labels'], [_LabelShortModel.default]);
|
|
157
|
+
}
|
|
158
|
+
if (data.hasOwnProperty('isFlaky')) {
|
|
159
|
+
obj['isFlaky'] = _ApiClient.default.convertToType(data['isFlaky'], 'Boolean');
|
|
160
|
+
}
|
|
161
|
+
if (data.hasOwnProperty('externalKey')) {
|
|
162
|
+
obj['externalKey'] = _ApiClient.default.convertToType(data['externalKey'], 'String');
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return obj;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Validates the JSON data with respect to <code>AutoTestModel</code>.
|
|
170
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
171
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>AutoTestModel</code>.
|
|
172
|
+
*/
|
|
173
|
+
static validateJSON(data) {
|
|
174
|
+
// check to make sure all required properties are present in the JSON string
|
|
175
|
+
for (const property of AutoTestModel.RequiredProperties) {
|
|
176
|
+
if (!data.hasOwnProperty(property)) {
|
|
177
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
// ensure the json data is a string
|
|
181
|
+
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
182
|
+
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
183
|
+
}
|
|
184
|
+
// ensure the json data is a string
|
|
185
|
+
if (data['createdById'] && !(typeof data['createdById'] === 'string' || data['createdById'] instanceof String)) {
|
|
186
|
+
throw new Error("Expected the field `createdById` to be a primitive type in the JSON string but got " + data['createdById']);
|
|
187
|
+
}
|
|
188
|
+
// ensure the json data is a string
|
|
189
|
+
if (data['modifiedById'] && !(typeof data['modifiedById'] === 'string' || data['modifiedById'] instanceof String)) {
|
|
190
|
+
throw new Error("Expected the field `modifiedById` to be a primitive type in the JSON string but got " + data['modifiedById']);
|
|
191
|
+
}
|
|
192
|
+
// ensure the json data is a string
|
|
193
|
+
if (data['lastTestRunId'] && !(typeof data['lastTestRunId'] === 'string' || data['lastTestRunId'] instanceof String)) {
|
|
194
|
+
throw new Error("Expected the field `lastTestRunId` to be a primitive type in the JSON string but got " + data['lastTestRunId']);
|
|
195
|
+
}
|
|
196
|
+
// ensure the json data is a string
|
|
197
|
+
if (data['lastTestRunName'] && !(typeof data['lastTestRunName'] === 'string' || data['lastTestRunName'] instanceof String)) {
|
|
198
|
+
throw new Error("Expected the field `lastTestRunName` to be a primitive type in the JSON string but got " + data['lastTestRunName']);
|
|
199
|
+
}
|
|
200
|
+
// ensure the json data is a string
|
|
201
|
+
if (data['lastTestResultId'] && !(typeof data['lastTestResultId'] === 'string' || data['lastTestResultId'] instanceof String)) {
|
|
202
|
+
throw new Error("Expected the field `lastTestResultId` to be a primitive type in the JSON string but got " + data['lastTestResultId']);
|
|
203
|
+
}
|
|
204
|
+
// validate the optional field `lastTestResultConfiguration`
|
|
205
|
+
if (data['lastTestResultConfiguration']) {
|
|
206
|
+
// data not null
|
|
207
|
+
_ConfigurationShortModel.default.validateJSON(data['lastTestResultConfiguration']);
|
|
208
|
+
}
|
|
209
|
+
// ensure the json data is a string
|
|
210
|
+
if (data['lastTestResultOutcome'] && !(typeof data['lastTestResultOutcome'] === 'string' || data['lastTestResultOutcome'] instanceof String)) {
|
|
211
|
+
throw new Error("Expected the field `lastTestResultOutcome` to be a primitive type in the JSON string but got " + data['lastTestResultOutcome']);
|
|
212
|
+
}
|
|
213
|
+
// validate the optional field `lastTestResultStatus`
|
|
214
|
+
if (data['lastTestResultStatus']) {
|
|
215
|
+
// data not null
|
|
216
|
+
_TestStatusModel.default.validateJSON(data['lastTestResultStatus']);
|
|
217
|
+
}
|
|
218
|
+
// ensure the json data is a string
|
|
219
|
+
if (data['externalId'] && !(typeof data['externalId'] === 'string' || data['externalId'] instanceof String)) {
|
|
220
|
+
throw new Error("Expected the field `externalId` to be a primitive type in the JSON string but got " + data['externalId']);
|
|
221
|
+
}
|
|
222
|
+
if (data['links']) {
|
|
223
|
+
// data not null
|
|
224
|
+
// ensure the json data is an array
|
|
225
|
+
if (!Array.isArray(data['links'])) {
|
|
226
|
+
throw new Error("Expected the field `links` to be an array in the JSON data but got " + data['links']);
|
|
227
|
+
}
|
|
228
|
+
// validate the optional field `links` (array)
|
|
229
|
+
for (const item of data['links']) {
|
|
230
|
+
_LinkPutModel.default.validateJSON(item);
|
|
231
|
+
}
|
|
232
|
+
;
|
|
233
|
+
}
|
|
234
|
+
// ensure the json data is a string
|
|
235
|
+
if (data['projectId'] && !(typeof data['projectId'] === 'string' || data['projectId'] instanceof String)) {
|
|
236
|
+
throw new Error("Expected the field `projectId` to be a primitive type in the JSON string but got " + data['projectId']);
|
|
237
|
+
}
|
|
238
|
+
// ensure the json data is a string
|
|
239
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
240
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
241
|
+
}
|
|
242
|
+
// ensure the json data is a string
|
|
243
|
+
if (data['namespace'] && !(typeof data['namespace'] === 'string' || data['namespace'] instanceof String)) {
|
|
244
|
+
throw new Error("Expected the field `namespace` to be a primitive type in the JSON string but got " + data['namespace']);
|
|
245
|
+
}
|
|
246
|
+
// ensure the json data is a string
|
|
247
|
+
if (data['classname'] && !(typeof data['classname'] === 'string' || data['classname'] instanceof String)) {
|
|
248
|
+
throw new Error("Expected the field `classname` to be a primitive type in the JSON string but got " + data['classname']);
|
|
249
|
+
}
|
|
250
|
+
if (data['steps']) {
|
|
251
|
+
// data not null
|
|
252
|
+
// ensure the json data is an array
|
|
253
|
+
if (!Array.isArray(data['steps'])) {
|
|
254
|
+
throw new Error("Expected the field `steps` to be an array in the JSON data but got " + data['steps']);
|
|
255
|
+
}
|
|
256
|
+
// validate the optional field `steps` (array)
|
|
257
|
+
for (const item of data['steps']) {
|
|
258
|
+
_AutoTestStepModel.default.validateJSON(item);
|
|
259
|
+
}
|
|
260
|
+
;
|
|
261
|
+
}
|
|
262
|
+
if (data['setup']) {
|
|
263
|
+
// data not null
|
|
264
|
+
// ensure the json data is an array
|
|
265
|
+
if (!Array.isArray(data['setup'])) {
|
|
266
|
+
throw new Error("Expected the field `setup` to be an array in the JSON data but got " + data['setup']);
|
|
267
|
+
}
|
|
268
|
+
// validate the optional field `setup` (array)
|
|
269
|
+
for (const item of data['setup']) {
|
|
270
|
+
_AutoTestStepModel.default.validateJSON(item);
|
|
271
|
+
}
|
|
272
|
+
;
|
|
273
|
+
}
|
|
274
|
+
if (data['teardown']) {
|
|
275
|
+
// data not null
|
|
276
|
+
// ensure the json data is an array
|
|
277
|
+
if (!Array.isArray(data['teardown'])) {
|
|
278
|
+
throw new Error("Expected the field `teardown` to be an array in the JSON data but got " + data['teardown']);
|
|
279
|
+
}
|
|
280
|
+
// validate the optional field `teardown` (array)
|
|
281
|
+
for (const item of data['teardown']) {
|
|
282
|
+
_AutoTestStepModel.default.validateJSON(item);
|
|
283
|
+
}
|
|
284
|
+
;
|
|
285
|
+
}
|
|
286
|
+
// ensure the json data is a string
|
|
287
|
+
if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
|
|
288
|
+
throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
|
|
289
|
+
}
|
|
290
|
+
// ensure the json data is a string
|
|
291
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
292
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
293
|
+
}
|
|
294
|
+
if (data['labels']) {
|
|
295
|
+
// data not null
|
|
296
|
+
// ensure the json data is an array
|
|
297
|
+
if (!Array.isArray(data['labels'])) {
|
|
298
|
+
throw new Error("Expected the field `labels` to be an array in the JSON data but got " + data['labels']);
|
|
299
|
+
}
|
|
300
|
+
// validate the optional field `labels` (array)
|
|
301
|
+
for (const item of data['labels']) {
|
|
302
|
+
_LabelShortModel.default.validateJSON(item);
|
|
303
|
+
}
|
|
304
|
+
;
|
|
305
|
+
}
|
|
306
|
+
// ensure the json data is a string
|
|
307
|
+
if (data['externalKey'] && !(typeof data['externalKey'] === 'string' || data['externalKey'] instanceof String)) {
|
|
308
|
+
throw new Error("Expected the field `externalKey` to be a primitive type in the JSON string but got " + data['externalKey']);
|
|
309
|
+
}
|
|
310
|
+
return true;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
AutoTestModel.RequiredProperties = ["globalId", "isDeleted", "mustBeApproved", "id", "createdDate", "createdById", "externalId", "projectId", "name"];
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Global ID of the autotest
|
|
317
|
+
* @member {Number} globalId
|
|
318
|
+
*/
|
|
319
|
+
AutoTestModel.prototype['globalId'] = undefined;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Indicates if the autotest is deleted
|
|
323
|
+
* @member {Boolean} isDeleted
|
|
324
|
+
*/
|
|
325
|
+
AutoTestModel.prototype['isDeleted'] = undefined;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Indicates if the autotest has unapproved changes from linked work items
|
|
329
|
+
* @member {Boolean} mustBeApproved
|
|
330
|
+
*/
|
|
331
|
+
AutoTestModel.prototype['mustBeApproved'] = undefined;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Unique ID of the autotest
|
|
335
|
+
* @member {String} id
|
|
336
|
+
*/
|
|
337
|
+
AutoTestModel.prototype['id'] = undefined;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Creation date of the autotest
|
|
341
|
+
* @member {Date} createdDate
|
|
342
|
+
*/
|
|
343
|
+
AutoTestModel.prototype['createdDate'] = undefined;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Last modification date of the project
|
|
347
|
+
* @member {Date} modifiedDate
|
|
348
|
+
*/
|
|
349
|
+
AutoTestModel.prototype['modifiedDate'] = undefined;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Unique ID of the project creator
|
|
353
|
+
* @member {String} createdById
|
|
354
|
+
*/
|
|
355
|
+
AutoTestModel.prototype['createdById'] = undefined;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Unique ID of the project last editor
|
|
359
|
+
* @member {String} modifiedById
|
|
360
|
+
*/
|
|
361
|
+
AutoTestModel.prototype['modifiedById'] = undefined;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Unique ID of the autotest last test run
|
|
365
|
+
* @member {String} lastTestRunId
|
|
366
|
+
*/
|
|
367
|
+
AutoTestModel.prototype['lastTestRunId'] = undefined;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Name of the autotest last test run
|
|
371
|
+
* @member {String} lastTestRunName
|
|
372
|
+
*/
|
|
373
|
+
AutoTestModel.prototype['lastTestRunName'] = undefined;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Unique ID of the autotest last test result
|
|
377
|
+
* @member {String} lastTestResultId
|
|
378
|
+
*/
|
|
379
|
+
AutoTestModel.prototype['lastTestResultId'] = undefined;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Configuration of the autotest last test result
|
|
383
|
+
* @member {module:model/ConfigurationShortModel} lastTestResultConfiguration
|
|
384
|
+
*/
|
|
385
|
+
AutoTestModel.prototype['lastTestResultConfiguration'] = undefined;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Outcome of the autotest last test result
|
|
389
|
+
* @member {String} lastTestResultOutcome
|
|
390
|
+
*/
|
|
391
|
+
AutoTestModel.prototype['lastTestResultOutcome'] = undefined;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Status of the autotest last test result
|
|
395
|
+
* @member {module:model/TestStatusModel} lastTestResultStatus
|
|
396
|
+
*/
|
|
397
|
+
AutoTestModel.prototype['lastTestResultStatus'] = undefined;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Stability percentage of the autotest
|
|
401
|
+
* @member {Number} stabilityPercentage
|
|
402
|
+
*/
|
|
403
|
+
AutoTestModel.prototype['stabilityPercentage'] = undefined;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* External ID of the autotest
|
|
407
|
+
* @member {String} externalId
|
|
408
|
+
*/
|
|
409
|
+
AutoTestModel.prototype['externalId'] = undefined;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Collection of the autotest links
|
|
413
|
+
* @member {Array.<module:model/LinkPutModel>} links
|
|
414
|
+
*/
|
|
415
|
+
AutoTestModel.prototype['links'] = undefined;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Unique ID of the autotest project
|
|
419
|
+
* @member {String} projectId
|
|
420
|
+
*/
|
|
421
|
+
AutoTestModel.prototype['projectId'] = undefined;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Name of the autotest
|
|
425
|
+
* @member {String} name
|
|
426
|
+
*/
|
|
427
|
+
AutoTestModel.prototype['name'] = undefined;
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Name of the autotest namespace
|
|
431
|
+
* @member {String} namespace
|
|
432
|
+
*/
|
|
433
|
+
AutoTestModel.prototype['namespace'] = undefined;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Name of the autotest class
|
|
437
|
+
* @member {String} classname
|
|
438
|
+
*/
|
|
439
|
+
AutoTestModel.prototype['classname'] = undefined;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Collection of the autotest steps
|
|
443
|
+
* @member {Array.<module:model/AutoTestStepModel>} steps
|
|
444
|
+
*/
|
|
445
|
+
AutoTestModel.prototype['steps'] = undefined;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Collection of the autotest setup steps
|
|
449
|
+
* @member {Array.<module:model/AutoTestStepModel>} setup
|
|
450
|
+
*/
|
|
451
|
+
AutoTestModel.prototype['setup'] = undefined;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Collection of the autotest teardown steps
|
|
455
|
+
* @member {Array.<module:model/AutoTestStepModel>} teardown
|
|
456
|
+
*/
|
|
457
|
+
AutoTestModel.prototype['teardown'] = undefined;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Name of the autotest in autotest's card
|
|
461
|
+
* @member {String} title
|
|
462
|
+
*/
|
|
463
|
+
AutoTestModel.prototype['title'] = undefined;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Description of the autotest in autotest's card
|
|
467
|
+
* @member {String} description
|
|
468
|
+
*/
|
|
469
|
+
AutoTestModel.prototype['description'] = undefined;
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Collection of the autotest labels
|
|
473
|
+
* @member {Array.<module:model/LabelShortModel>} labels
|
|
474
|
+
*/
|
|
475
|
+
AutoTestModel.prototype['labels'] = undefined;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Indicates if the autotest is marked as flaky
|
|
479
|
+
* @member {Boolean} isFlaky
|
|
480
|
+
*/
|
|
481
|
+
AutoTestModel.prototype['isFlaky'] = undefined;
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* External key of the autotest
|
|
485
|
+
* @member {String} externalKey
|
|
486
|
+
*/
|
|
487
|
+
AutoTestModel.prototype['externalKey'] = undefined;
|
|
488
|
+
var _default = exports.default = AutoTestModel;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _FailureCategoryModel = _interopRequireDefault(require("./FailureCategoryModel"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/**
|
|
11
|
+
* API
|
|
12
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
13
|
+
*
|
|
14
|
+
* The version of the OpenAPI document: adapters
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
18
|
+
* https://openapi-generator.tech
|
|
19
|
+
* Do not edit the class manually.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The AutoTestResultReasonShort model module.
|
|
25
|
+
* @module model/AutoTestResultReasonShort
|
|
26
|
+
* @version 1.0.0
|
|
27
|
+
*/
|
|
28
|
+
class AutoTestResultReasonShort {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>AutoTestResultReasonShort</code>.
|
|
31
|
+
* @alias module:model/AutoTestResultReasonShort
|
|
32
|
+
* @param failureCategory {module:model/FailureCategoryModel}
|
|
33
|
+
* @param name {String}
|
|
34
|
+
*/
|
|
35
|
+
constructor(failureCategory, name) {
|
|
36
|
+
AutoTestResultReasonShort.initialize(this, failureCategory, name);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Initializes the fields of this object.
|
|
41
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
42
|
+
* Only for internal use.
|
|
43
|
+
*/
|
|
44
|
+
static initialize(obj, failureCategory, name) {
|
|
45
|
+
obj['failureCategory'] = failureCategory;
|
|
46
|
+
obj['name'] = name;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Constructs a <code>AutoTestResultReasonShort</code> from a plain JavaScript object, optionally creating a new instance.
|
|
51
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
52
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
53
|
+
* @param {module:model/AutoTestResultReasonShort} obj Optional instance to populate.
|
|
54
|
+
* @return {module:model/AutoTestResultReasonShort} The populated <code>AutoTestResultReasonShort</code> instance.
|
|
55
|
+
*/
|
|
56
|
+
static constructFromObject(data, obj) {
|
|
57
|
+
if (data) {
|
|
58
|
+
obj = obj || new AutoTestResultReasonShort();
|
|
59
|
+
if (data.hasOwnProperty('failureCategory')) {
|
|
60
|
+
obj['failureCategory'] = _ApiClient.default.convertToType(data['failureCategory'], _FailureCategoryModel.default);
|
|
61
|
+
}
|
|
62
|
+
if (data.hasOwnProperty('name')) {
|
|
63
|
+
obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return obj;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Validates the JSON data with respect to <code>AutoTestResultReasonShort</code>.
|
|
71
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
72
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>AutoTestResultReasonShort</code>.
|
|
73
|
+
*/
|
|
74
|
+
static validateJSON(data) {
|
|
75
|
+
// check to make sure all required properties are present in the JSON string
|
|
76
|
+
for (const property of AutoTestResultReasonShort.RequiredProperties) {
|
|
77
|
+
if (!data.hasOwnProperty(property)) {
|
|
78
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// ensure the json data is a string
|
|
82
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
83
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
84
|
+
}
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
AutoTestResultReasonShort.RequiredProperties = ["failureCategory", "name"];
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @member {module:model/FailureCategoryModel} failureCategory
|
|
92
|
+
*/
|
|
93
|
+
AutoTestResultReasonShort.prototype['failureCategory'] = undefined;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @member {String} name
|
|
97
|
+
*/
|
|
98
|
+
AutoTestResultReasonShort.prototype['name'] = undefined;
|
|
99
|
+
var _default = exports.default = AutoTestResultReasonShort;
|