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,158 @@
|
|
|
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 ParameterShortModel model module.
|
|
24
|
+
* @module model/ParameterShortModel
|
|
25
|
+
* @version 1.0.0
|
|
26
|
+
*/
|
|
27
|
+
class ParameterShortModel {
|
|
28
|
+
/**
|
|
29
|
+
* Constructs a new <code>ParameterShortModel</code>.
|
|
30
|
+
* @alias module:model/ParameterShortModel
|
|
31
|
+
* @param id {String}
|
|
32
|
+
* @param parameterKeyId {String}
|
|
33
|
+
* @param value {String} Value of the parameter
|
|
34
|
+
* @param name {String} Key of the parameter
|
|
35
|
+
* @param projectIds {Array.<String>}
|
|
36
|
+
*/
|
|
37
|
+
constructor(id, parameterKeyId, value, name, projectIds) {
|
|
38
|
+
ParameterShortModel.initialize(this, id, parameterKeyId, value, name, projectIds);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Initializes the fields of this object.
|
|
43
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
44
|
+
* Only for internal use.
|
|
45
|
+
*/
|
|
46
|
+
static initialize(obj, id, parameterKeyId, value, name, projectIds) {
|
|
47
|
+
obj['id'] = id;
|
|
48
|
+
obj['parameterKeyId'] = parameterKeyId;
|
|
49
|
+
obj['value'] = value;
|
|
50
|
+
obj['name'] = name;
|
|
51
|
+
obj['projectIds'] = projectIds;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Constructs a <code>ParameterShortModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
56
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
57
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
58
|
+
* @param {module:model/ParameterShortModel} obj Optional instance to populate.
|
|
59
|
+
* @return {module:model/ParameterShortModel} The populated <code>ParameterShortModel</code> instance.
|
|
60
|
+
*/
|
|
61
|
+
static constructFromObject(data, obj) {
|
|
62
|
+
if (data) {
|
|
63
|
+
obj = obj || new ParameterShortModel();
|
|
64
|
+
if (data.hasOwnProperty('id')) {
|
|
65
|
+
obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('sharedStepId')) {
|
|
68
|
+
obj['sharedStepId'] = _ApiClient.default.convertToType(data['sharedStepId'], 'String');
|
|
69
|
+
}
|
|
70
|
+
if (data.hasOwnProperty('parameterKeyId')) {
|
|
71
|
+
obj['parameterKeyId'] = _ApiClient.default.convertToType(data['parameterKeyId'], 'String');
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('value')) {
|
|
74
|
+
obj['value'] = _ApiClient.default.convertToType(data['value'], 'String');
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('name')) {
|
|
77
|
+
obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('projectIds')) {
|
|
80
|
+
obj['projectIds'] = _ApiClient.default.convertToType(data['projectIds'], ['String']);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return obj;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Validates the JSON data with respect to <code>ParameterShortModel</code>.
|
|
88
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
89
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ParameterShortModel</code>.
|
|
90
|
+
*/
|
|
91
|
+
static validateJSON(data) {
|
|
92
|
+
// check to make sure all required properties are present in the JSON string
|
|
93
|
+
for (const property of ParameterShortModel.RequiredProperties) {
|
|
94
|
+
if (!data.hasOwnProperty(property)) {
|
|
95
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// ensure the json data is a string
|
|
99
|
+
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
100
|
+
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
101
|
+
}
|
|
102
|
+
// ensure the json data is a string
|
|
103
|
+
if (data['sharedStepId'] && !(typeof data['sharedStepId'] === 'string' || data['sharedStepId'] instanceof String)) {
|
|
104
|
+
throw new Error("Expected the field `sharedStepId` to be a primitive type in the JSON string but got " + data['sharedStepId']);
|
|
105
|
+
}
|
|
106
|
+
// ensure the json data is a string
|
|
107
|
+
if (data['parameterKeyId'] && !(typeof data['parameterKeyId'] === 'string' || data['parameterKeyId'] instanceof String)) {
|
|
108
|
+
throw new Error("Expected the field `parameterKeyId` to be a primitive type in the JSON string but got " + data['parameterKeyId']);
|
|
109
|
+
}
|
|
110
|
+
// ensure the json data is a string
|
|
111
|
+
if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) {
|
|
112
|
+
throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']);
|
|
113
|
+
}
|
|
114
|
+
// ensure the json data is a string
|
|
115
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
116
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
117
|
+
}
|
|
118
|
+
// ensure the json data is an array
|
|
119
|
+
if (!Array.isArray(data['projectIds'])) {
|
|
120
|
+
throw new Error("Expected the field `projectIds` to be an array in the JSON data but got " + data['projectIds']);
|
|
121
|
+
}
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
ParameterShortModel.RequiredProperties = ["id", "parameterKeyId", "value", "name", "projectIds"];
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @member {String} id
|
|
129
|
+
*/
|
|
130
|
+
ParameterShortModel.prototype['id'] = undefined;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @member {String} sharedStepId
|
|
134
|
+
*/
|
|
135
|
+
ParameterShortModel.prototype['sharedStepId'] = undefined;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @member {String} parameterKeyId
|
|
139
|
+
*/
|
|
140
|
+
ParameterShortModel.prototype['parameterKeyId'] = undefined;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Value of the parameter
|
|
144
|
+
* @member {String} value
|
|
145
|
+
*/
|
|
146
|
+
ParameterShortModel.prototype['value'] = undefined;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Key of the parameter
|
|
150
|
+
* @member {String} name
|
|
151
|
+
*/
|
|
152
|
+
ParameterShortModel.prototype['name'] = undefined;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* @member {Array.<String>} projectIds
|
|
156
|
+
*/
|
|
157
|
+
ParameterShortModel.prototype['projectIds'] = undefined;
|
|
158
|
+
var _default = exports.default = ParameterShortModel;
|
|
@@ -0,0 +1,98 @@
|
|
|
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 ParametersFilterApiModel model module.
|
|
24
|
+
* @module model/ParametersFilterApiModel
|
|
25
|
+
* @version 1.0.0
|
|
26
|
+
*/
|
|
27
|
+
class ParametersFilterApiModel {
|
|
28
|
+
/**
|
|
29
|
+
* Constructs a new <code>ParametersFilterApiModel</code>.
|
|
30
|
+
* @alias module:model/ParametersFilterApiModel
|
|
31
|
+
*/
|
|
32
|
+
constructor() {
|
|
33
|
+
ParametersFilterApiModel.initialize(this);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Initializes the fields of this object.
|
|
38
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
39
|
+
* Only for internal use.
|
|
40
|
+
*/
|
|
41
|
+
static initialize(obj) {}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Constructs a <code>ParametersFilterApiModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
45
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
46
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
47
|
+
* @param {module:model/ParametersFilterApiModel} obj Optional instance to populate.
|
|
48
|
+
* @return {module:model/ParametersFilterApiModel} The populated <code>ParametersFilterApiModel</code> instance.
|
|
49
|
+
*/
|
|
50
|
+
static constructFromObject(data, obj) {
|
|
51
|
+
if (data) {
|
|
52
|
+
obj = obj || new ParametersFilterApiModel();
|
|
53
|
+
if (data.hasOwnProperty('name')) {
|
|
54
|
+
obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
|
|
55
|
+
}
|
|
56
|
+
if (data.hasOwnProperty('isDeleted')) {
|
|
57
|
+
obj['isDeleted'] = _ApiClient.default.convertToType(data['isDeleted'], 'Boolean');
|
|
58
|
+
}
|
|
59
|
+
if (data.hasOwnProperty('projectIds')) {
|
|
60
|
+
obj['projectIds'] = _ApiClient.default.convertToType(data['projectIds'], ['String']);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Validates the JSON data with respect to <code>ParametersFilterApiModel</code>.
|
|
68
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
69
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ParametersFilterApiModel</code>.
|
|
70
|
+
*/
|
|
71
|
+
static validateJSON(data) {
|
|
72
|
+
// ensure the json data is a string
|
|
73
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
74
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
75
|
+
}
|
|
76
|
+
// ensure the json data is an array
|
|
77
|
+
if (!Array.isArray(data['projectIds'])) {
|
|
78
|
+
throw new Error("Expected the field `projectIds` to be an array in the JSON data but got " + data['projectIds']);
|
|
79
|
+
}
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @member {String} name
|
|
86
|
+
*/
|
|
87
|
+
ParametersFilterApiModel.prototype['name'] = undefined;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @member {Boolean} isDeleted
|
|
91
|
+
*/
|
|
92
|
+
ParametersFilterApiModel.prototype['isDeleted'] = undefined;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @member {Array.<String>} projectIds
|
|
96
|
+
*/
|
|
97
|
+
ParametersFilterApiModel.prototype['projectIds'] = undefined;
|
|
98
|
+
var _default = exports.default = ParametersFilterApiModel;
|
|
@@ -0,0 +1,124 @@
|
|
|
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 ProblemDetails model module.
|
|
24
|
+
* @module model/ProblemDetails
|
|
25
|
+
* @version 1.0.0
|
|
26
|
+
*/
|
|
27
|
+
class ProblemDetails {
|
|
28
|
+
/**
|
|
29
|
+
* Constructs a new <code>ProblemDetails</code>.
|
|
30
|
+
* @alias module:model/ProblemDetails
|
|
31
|
+
* @extends Object
|
|
32
|
+
*/
|
|
33
|
+
constructor() {
|
|
34
|
+
ProblemDetails.initialize(this);
|
|
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) {}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Constructs a <code>ProblemDetails</code> from a plain JavaScript object, optionally creating a new instance.
|
|
46
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
47
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
48
|
+
* @param {module:model/ProblemDetails} obj Optional instance to populate.
|
|
49
|
+
* @return {module:model/ProblemDetails} The populated <code>ProblemDetails</code> instance.
|
|
50
|
+
*/
|
|
51
|
+
static constructFromObject(data, obj) {
|
|
52
|
+
if (data) {
|
|
53
|
+
obj = obj || new ProblemDetails();
|
|
54
|
+
_ApiClient.default.constructFromObject(data, obj, 'Object');
|
|
55
|
+
if (data.hasOwnProperty('type')) {
|
|
56
|
+
obj['type'] = _ApiClient.default.convertToType(data['type'], 'String');
|
|
57
|
+
}
|
|
58
|
+
if (data.hasOwnProperty('title')) {
|
|
59
|
+
obj['title'] = _ApiClient.default.convertToType(data['title'], 'String');
|
|
60
|
+
}
|
|
61
|
+
if (data.hasOwnProperty('status')) {
|
|
62
|
+
obj['status'] = _ApiClient.default.convertToType(data['status'], 'Number');
|
|
63
|
+
}
|
|
64
|
+
if (data.hasOwnProperty('detail')) {
|
|
65
|
+
obj['detail'] = _ApiClient.default.convertToType(data['detail'], 'String');
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('instance')) {
|
|
68
|
+
obj['instance'] = _ApiClient.default.convertToType(data['instance'], 'String');
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Validates the JSON data with respect to <code>ProblemDetails</code>.
|
|
76
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
77
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ProblemDetails</code>.
|
|
78
|
+
*/
|
|
79
|
+
static validateJSON(data) {
|
|
80
|
+
// ensure the json data is a string
|
|
81
|
+
if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
|
|
82
|
+
throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
|
|
83
|
+
}
|
|
84
|
+
// ensure the json data is a string
|
|
85
|
+
if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
|
|
86
|
+
throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
|
|
87
|
+
}
|
|
88
|
+
// ensure the json data is a string
|
|
89
|
+
if (data['detail'] && !(typeof data['detail'] === 'string' || data['detail'] instanceof String)) {
|
|
90
|
+
throw new Error("Expected the field `detail` to be a primitive type in the JSON string but got " + data['detail']);
|
|
91
|
+
}
|
|
92
|
+
// ensure the json data is a string
|
|
93
|
+
if (data['instance'] && !(typeof data['instance'] === 'string' || data['instance'] instanceof String)) {
|
|
94
|
+
throw new Error("Expected the field `instance` to be a primitive type in the JSON string but got " + data['instance']);
|
|
95
|
+
}
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @member {String} type
|
|
102
|
+
*/
|
|
103
|
+
ProblemDetails.prototype['type'] = undefined;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @member {String} title
|
|
107
|
+
*/
|
|
108
|
+
ProblemDetails.prototype['title'] = undefined;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @member {Number} status
|
|
112
|
+
*/
|
|
113
|
+
ProblemDetails.prototype['status'] = undefined;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @member {String} detail
|
|
117
|
+
*/
|
|
118
|
+
ProblemDetails.prototype['detail'] = undefined;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @member {String} instance
|
|
122
|
+
*/
|
|
123
|
+
ProblemDetails.prototype['instance'] = undefined;
|
|
124
|
+
var _default = exports.default = ProblemDetails;
|
|
@@ -0,0 +1,165 @@
|
|
|
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 ProjectApiResult model module.
|
|
24
|
+
* @module model/ProjectApiResult
|
|
25
|
+
* @version 1.0.0
|
|
26
|
+
*/
|
|
27
|
+
class ProjectApiResult {
|
|
28
|
+
/**
|
|
29
|
+
* Constructs a new <code>ProjectApiResult</code>.
|
|
30
|
+
* @alias module:model/ProjectApiResult
|
|
31
|
+
* @param id {String} Unique ID of the project
|
|
32
|
+
* @param name {String} Name of the project
|
|
33
|
+
* @param isFavorite {Boolean} Indicates if the project is marked as favorite
|
|
34
|
+
* @param isDeleted {Boolean} Indicates if the project is deleted
|
|
35
|
+
* @param globalId {Number} Global ID of the project
|
|
36
|
+
* @param workflowId {String} ID of the workflow used in project
|
|
37
|
+
*/
|
|
38
|
+
constructor(id, name, isFavorite, isDeleted, globalId, workflowId) {
|
|
39
|
+
ProjectApiResult.initialize(this, id, name, isFavorite, isDeleted, globalId, workflowId);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Initializes the fields of this object.
|
|
44
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
45
|
+
* Only for internal use.
|
|
46
|
+
*/
|
|
47
|
+
static initialize(obj, id, name, isFavorite, isDeleted, globalId, workflowId) {
|
|
48
|
+
obj['id'] = id;
|
|
49
|
+
obj['name'] = name;
|
|
50
|
+
obj['isFavorite'] = isFavorite;
|
|
51
|
+
obj['isDeleted'] = isDeleted;
|
|
52
|
+
obj['globalId'] = globalId;
|
|
53
|
+
obj['workflowId'] = workflowId;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Constructs a <code>ProjectApiResult</code> from a plain JavaScript object, optionally creating a new instance.
|
|
58
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
59
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
60
|
+
* @param {module:model/ProjectApiResult} obj Optional instance to populate.
|
|
61
|
+
* @return {module:model/ProjectApiResult} The populated <code>ProjectApiResult</code> instance.
|
|
62
|
+
*/
|
|
63
|
+
static constructFromObject(data, obj) {
|
|
64
|
+
if (data) {
|
|
65
|
+
obj = obj || new ProjectApiResult();
|
|
66
|
+
if (data.hasOwnProperty('id')) {
|
|
67
|
+
obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('description')) {
|
|
70
|
+
obj['description'] = _ApiClient.default.convertToType(data['description'], 'String');
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('name')) {
|
|
73
|
+
obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('isFavorite')) {
|
|
76
|
+
obj['isFavorite'] = _ApiClient.default.convertToType(data['isFavorite'], 'Boolean');
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('isDeleted')) {
|
|
79
|
+
obj['isDeleted'] = _ApiClient.default.convertToType(data['isDeleted'], 'Boolean');
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('globalId')) {
|
|
82
|
+
obj['globalId'] = _ApiClient.default.convertToType(data['globalId'], 'Number');
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty('workflowId')) {
|
|
85
|
+
obj['workflowId'] = _ApiClient.default.convertToType(data['workflowId'], 'String');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return obj;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Validates the JSON data with respect to <code>ProjectApiResult</code>.
|
|
93
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
94
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ProjectApiResult</code>.
|
|
95
|
+
*/
|
|
96
|
+
static validateJSON(data) {
|
|
97
|
+
// check to make sure all required properties are present in the JSON string
|
|
98
|
+
for (const property of ProjectApiResult.RequiredProperties) {
|
|
99
|
+
if (!data.hasOwnProperty(property)) {
|
|
100
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
// ensure the json data is a string
|
|
104
|
+
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
105
|
+
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
106
|
+
}
|
|
107
|
+
// ensure the json data is a string
|
|
108
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
109
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
110
|
+
}
|
|
111
|
+
// ensure the json data is a string
|
|
112
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
113
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
114
|
+
}
|
|
115
|
+
// ensure the json data is a string
|
|
116
|
+
if (data['workflowId'] && !(typeof data['workflowId'] === 'string' || data['workflowId'] instanceof String)) {
|
|
117
|
+
throw new Error("Expected the field `workflowId` to be a primitive type in the JSON string but got " + data['workflowId']);
|
|
118
|
+
}
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
ProjectApiResult.RequiredProperties = ["id", "name", "isFavorite", "isDeleted", "globalId", "workflowId"];
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Unique ID of the project
|
|
126
|
+
* @member {String} id
|
|
127
|
+
*/
|
|
128
|
+
ProjectApiResult.prototype['id'] = undefined;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Description of the project
|
|
132
|
+
* @member {String} description
|
|
133
|
+
*/
|
|
134
|
+
ProjectApiResult.prototype['description'] = undefined;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Name of the project
|
|
138
|
+
* @member {String} name
|
|
139
|
+
*/
|
|
140
|
+
ProjectApiResult.prototype['name'] = undefined;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Indicates if the project is marked as favorite
|
|
144
|
+
* @member {Boolean} isFavorite
|
|
145
|
+
*/
|
|
146
|
+
ProjectApiResult.prototype['isFavorite'] = undefined;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Indicates if the project is deleted
|
|
150
|
+
* @member {Boolean} isDeleted
|
|
151
|
+
*/
|
|
152
|
+
ProjectApiResult.prototype['isDeleted'] = undefined;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Global ID of the project
|
|
156
|
+
* @member {Number} globalId
|
|
157
|
+
*/
|
|
158
|
+
ProjectApiResult.prototype['globalId'] = undefined;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* ID of the workflow used in project
|
|
162
|
+
* @member {String} workflowId
|
|
163
|
+
*/
|
|
164
|
+
ProjectApiResult.prototype['workflowId'] = undefined;
|
|
165
|
+
var _default = exports.default = ProjectApiResult;
|
|
@@ -0,0 +1,132 @@
|
|
|
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 _CustomAttributeTypesEnum = _interopRequireDefault(require("./CustomAttributeTypesEnum"));
|
|
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 ProjectAttributesFilterModel model module.
|
|
25
|
+
* @module model/ProjectAttributesFilterModel
|
|
26
|
+
* @version 1.0.0
|
|
27
|
+
*/
|
|
28
|
+
class ProjectAttributesFilterModel {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>ProjectAttributesFilterModel</code>.
|
|
31
|
+
* @alias module:model/ProjectAttributesFilterModel
|
|
32
|
+
* @param name {String} Specifies an attribute name to search for
|
|
33
|
+
* @param types {Array.<module:model/CustomAttributeTypesEnum>} Specifies an attribute types to search for
|
|
34
|
+
*/
|
|
35
|
+
constructor(name, types) {
|
|
36
|
+
ProjectAttributesFilterModel.initialize(this, name, types);
|
|
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, name, types) {
|
|
45
|
+
obj['name'] = name;
|
|
46
|
+
obj['types'] = types;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Constructs a <code>ProjectAttributesFilterModel</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/ProjectAttributesFilterModel} obj Optional instance to populate.
|
|
54
|
+
* @return {module:model/ProjectAttributesFilterModel} The populated <code>ProjectAttributesFilterModel</code> instance.
|
|
55
|
+
*/
|
|
56
|
+
static constructFromObject(data, obj) {
|
|
57
|
+
if (data) {
|
|
58
|
+
obj = obj || new ProjectAttributesFilterModel();
|
|
59
|
+
if (data.hasOwnProperty('name')) {
|
|
60
|
+
obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
|
|
61
|
+
}
|
|
62
|
+
if (data.hasOwnProperty('isRequired')) {
|
|
63
|
+
obj['isRequired'] = _ApiClient.default.convertToType(data['isRequired'], 'Boolean');
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('isGlobal')) {
|
|
66
|
+
obj['isGlobal'] = _ApiClient.default.convertToType(data['isGlobal'], 'Boolean');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('types')) {
|
|
69
|
+
obj['types'] = _ApiClient.default.convertToType(data['types'], [_CustomAttributeTypesEnum.default]);
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('isEnabled')) {
|
|
72
|
+
obj['isEnabled'] = _ApiClient.default.convertToType(data['isEnabled'], 'Boolean');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return obj;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Validates the JSON data with respect to <code>ProjectAttributesFilterModel</code>.
|
|
80
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
81
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ProjectAttributesFilterModel</code>.
|
|
82
|
+
*/
|
|
83
|
+
static validateJSON(data) {
|
|
84
|
+
// check to make sure all required properties are present in the JSON string
|
|
85
|
+
for (const property of ProjectAttributesFilterModel.RequiredProperties) {
|
|
86
|
+
if (!data.hasOwnProperty(property)) {
|
|
87
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// ensure the json data is a string
|
|
91
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
92
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
93
|
+
}
|
|
94
|
+
// ensure the json data is an array
|
|
95
|
+
if (!Array.isArray(data['types'])) {
|
|
96
|
+
throw new Error("Expected the field `types` to be an array in the JSON data but got " + data['types']);
|
|
97
|
+
}
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
ProjectAttributesFilterModel.RequiredProperties = ["name", "types"];
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Specifies an attribute name to search for
|
|
105
|
+
* @member {String} name
|
|
106
|
+
*/
|
|
107
|
+
ProjectAttributesFilterModel.prototype['name'] = undefined;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Specifies an attribute mandatory status to search for
|
|
111
|
+
* @member {Boolean} isRequired
|
|
112
|
+
*/
|
|
113
|
+
ProjectAttributesFilterModel.prototype['isRequired'] = undefined;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Specifies an attribute global status to search for
|
|
117
|
+
* @member {Boolean} isGlobal
|
|
118
|
+
*/
|
|
119
|
+
ProjectAttributesFilterModel.prototype['isGlobal'] = undefined;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Specifies an attribute types to search for
|
|
123
|
+
* @member {Array.<module:model/CustomAttributeTypesEnum>} types
|
|
124
|
+
*/
|
|
125
|
+
ProjectAttributesFilterModel.prototype['types'] = undefined;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Specifies an attribute enabled status to search for
|
|
129
|
+
* @member {Boolean} isEnabled
|
|
130
|
+
*/
|
|
131
|
+
ProjectAttributesFilterModel.prototype['isEnabled'] = undefined;
|
|
132
|
+
var _default = exports.default = ProjectAttributesFilterModel;
|