@nutanix-scratch/objects-js-client 4.0.1-alpha.2
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/LICENSE.txt +49 -0
- package/README.md +200 -0
- package/dist/Ntnx-Objects-js-client-prod.js +1 -0
- package/dist/Ntnx-Objects-js-client.js +729 -0
- package/dist/es/ApiClient.d.ts +159 -0
- package/dist/es/ApiClient.js +1211 -0
- package/dist/es/Paginable.d.ts +95 -0
- package/dist/es/Paginable.js +287 -0
- package/dist/es/apis/objectstores-endpoints.d.ts +231 -0
- package/dist/es/apis/objectstores-endpoints.js +522 -0
- package/dist/es/index.d.ts +64 -0
- package/dist/es/index.js +252 -0
- package/dist/es/models/common/v1/config/FQDN.d.ts +48 -0
- package/dist/es/models/common/v1/config/FQDN.js +242 -0
- package/dist/es/models/common/v1/config/Flag.d.ts +58 -0
- package/dist/es/models/common/v1/config/Flag.js +275 -0
- package/dist/es/models/common/v1/config/IPAddress.d.ts +61 -0
- package/dist/es/models/common/v1/config/IPAddress.js +291 -0
- package/dist/es/models/common/v1/config/IPv4Address.d.ts +62 -0
- package/dist/es/models/common/v1/config/IPv4Address.js +288 -0
- package/dist/es/models/common/v1/config/IPv6Address.d.ts +62 -0
- package/dist/es/models/common/v1/config/IPv6Address.js +288 -0
- package/dist/es/models/common/v1/config/KVPair.d.ts +62 -0
- package/dist/es/models/common/v1/config/KVPair.js +332 -0
- package/dist/es/models/common/v1/config/Message.d.ts +84 -0
- package/dist/es/models/common/v1/config/Message.js +354 -0
- package/dist/es/models/common/v1/config/MessageSeverity.d.ts +19 -0
- package/dist/es/models/common/v1/config/MessageSeverity.js +91 -0
- package/dist/es/models/common/v1/config/Metadata.d.ts +98 -0
- package/dist/es/models/common/v1/config/Metadata.js +411 -0
- package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +50 -0
- package/dist/es/models/common/v1/config/TenantAwareModel.js +243 -0
- package/dist/es/models/common/v1/response/ApiLink.d.ts +62 -0
- package/dist/es/models/common/v1/response/ApiLink.js +280 -0
- package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +98 -0
- package/dist/es/models/common/v1/response/ApiResponseMetadata.js +438 -0
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +42 -0
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +270 -0
- package/dist/es/models/objects/v4/error/AppMessage.d.ts +108 -0
- package/dist/es/models/objects/v4/error/AppMessage.js +432 -0
- package/dist/es/models/objects/v4/error/ErrorResponse.d.ts +48 -0
- package/dist/es/models/objects/v4/error/ErrorResponse.js +288 -0
- package/dist/es/models/objects/v4/error/SchemaValidationError.d.ts +98 -0
- package/dist/es/models/objects/v4/error/SchemaValidationError.js +407 -0
- package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +74 -0
- package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.js +318 -0
- package/dist/es/models/objects/v4/operations/Certificate.d.ts +78 -0
- package/dist/es/models/objects/v4/operations/Certificate.js +411 -0
- package/dist/es/models/objects/v4/operations/CertificateApiResponse.d.ts +59 -0
- package/dist/es/models/objects/v4/operations/CertificateApiResponse.js +311 -0
- package/dist/es/models/objects/v4/operations/CertificateListApiResponse.d.ts +59 -0
- package/dist/es/models/objects/v4/operations/CertificateListApiResponse.js +338 -0
- package/dist/es/models/objects/v4/operations/CertificateProjection.d.ts +9 -0
- package/dist/es/models/objects/v4/operations/CertificateProjection.js +131 -0
- package/dist/es/models/objects/v4/operations/Objectstore.d.ts +242 -0
- package/dist/es/models/objects/v4/operations/Objectstore.js +945 -0
- package/dist/es/models/objects/v4/operations/ObjectstoreApiResponse.d.ts +59 -0
- package/dist/es/models/objects/v4/operations/ObjectstoreApiResponse.js +311 -0
- package/dist/es/models/objects/v4/operations/ObjectstoreListApiResponse.d.ts +59 -0
- package/dist/es/models/objects/v4/operations/ObjectstoreListApiResponse.js +338 -0
- package/dist/es/models/objects/v4/operations/ObjectstoreProjection.d.ts +50 -0
- package/dist/es/models/objects/v4/operations/ObjectstoreProjection.js +298 -0
- package/dist/es/models/objects/v4/operations/StateEnum.d.ts +19 -0
- package/dist/es/models/objects/v4/operations/StateEnum.js +145 -0
- package/dist/es/models/objects/v4/operations/TaskReferenceApiResponse.d.ts +59 -0
- package/dist/es/models/objects/v4/operations/TaskReferenceApiResponse.js +311 -0
- package/dist/es/models/prism/v4/config/TaskReference.d.ts +50 -0
- package/dist/es/models/prism/v4/config/TaskReference.js +247 -0
- package/dist/es/models/validation/ValidationError.d.ts +13 -0
- package/dist/es/models/validation/ValidationError.js +60 -0
- package/dist/es/models/validation/ValidationScopes.d.ts +9 -0
- package/dist/es/models/validation/ValidationScopes.js +38 -0
- package/dist/es/utils/ValidationUtils.d.ts +13 -0
- package/dist/es/utils/ValidationUtils.js +85 -0
- package/dist/lib/ApiClient.d.ts +159 -0
- package/dist/lib/ApiClient.js +1211 -0
- package/dist/lib/Paginable.d.ts +95 -0
- package/dist/lib/Paginable.js +287 -0
- package/dist/lib/apis/objectstores-endpoints.d.ts +231 -0
- package/dist/lib/apis/objectstores-endpoints.js +522 -0
- package/dist/lib/index.d.ts +64 -0
- package/dist/lib/index.js +252 -0
- package/dist/lib/models/common/v1/config/FQDN.d.ts +48 -0
- package/dist/lib/models/common/v1/config/FQDN.js +242 -0
- package/dist/lib/models/common/v1/config/Flag.d.ts +58 -0
- package/dist/lib/models/common/v1/config/Flag.js +275 -0
- package/dist/lib/models/common/v1/config/IPAddress.d.ts +61 -0
- package/dist/lib/models/common/v1/config/IPAddress.js +291 -0
- package/dist/lib/models/common/v1/config/IPv4Address.d.ts +62 -0
- package/dist/lib/models/common/v1/config/IPv4Address.js +288 -0
- package/dist/lib/models/common/v1/config/IPv6Address.d.ts +62 -0
- package/dist/lib/models/common/v1/config/IPv6Address.js +288 -0
- package/dist/lib/models/common/v1/config/KVPair.d.ts +62 -0
- package/dist/lib/models/common/v1/config/KVPair.js +332 -0
- package/dist/lib/models/common/v1/config/Message.d.ts +84 -0
- package/dist/lib/models/common/v1/config/Message.js +354 -0
- package/dist/lib/models/common/v1/config/MessageSeverity.d.ts +19 -0
- package/dist/lib/models/common/v1/config/MessageSeverity.js +91 -0
- package/dist/lib/models/common/v1/config/Metadata.d.ts +98 -0
- package/dist/lib/models/common/v1/config/Metadata.js +411 -0
- package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +50 -0
- package/dist/lib/models/common/v1/config/TenantAwareModel.js +243 -0
- package/dist/lib/models/common/v1/response/ApiLink.d.ts +62 -0
- package/dist/lib/models/common/v1/response/ApiLink.js +280 -0
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +98 -0
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +438 -0
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +42 -0
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +270 -0
- package/dist/lib/models/objects/v4/error/AppMessage.d.ts +108 -0
- package/dist/lib/models/objects/v4/error/AppMessage.js +432 -0
- package/dist/lib/models/objects/v4/error/ErrorResponse.d.ts +48 -0
- package/dist/lib/models/objects/v4/error/ErrorResponse.js +288 -0
- package/dist/lib/models/objects/v4/error/SchemaValidationError.d.ts +98 -0
- package/dist/lib/models/objects/v4/error/SchemaValidationError.js +407 -0
- package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +74 -0
- package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.js +318 -0
- package/dist/lib/models/objects/v4/operations/Certificate.d.ts +78 -0
- package/dist/lib/models/objects/v4/operations/Certificate.js +411 -0
- package/dist/lib/models/objects/v4/operations/CertificateApiResponse.d.ts +59 -0
- package/dist/lib/models/objects/v4/operations/CertificateApiResponse.js +311 -0
- package/dist/lib/models/objects/v4/operations/CertificateListApiResponse.d.ts +59 -0
- package/dist/lib/models/objects/v4/operations/CertificateListApiResponse.js +338 -0
- package/dist/lib/models/objects/v4/operations/CertificateProjection.d.ts +9 -0
- package/dist/lib/models/objects/v4/operations/CertificateProjection.js +131 -0
- package/dist/lib/models/objects/v4/operations/Objectstore.d.ts +242 -0
- package/dist/lib/models/objects/v4/operations/Objectstore.js +945 -0
- package/dist/lib/models/objects/v4/operations/ObjectstoreApiResponse.d.ts +59 -0
- package/dist/lib/models/objects/v4/operations/ObjectstoreApiResponse.js +311 -0
- package/dist/lib/models/objects/v4/operations/ObjectstoreListApiResponse.d.ts +59 -0
- package/dist/lib/models/objects/v4/operations/ObjectstoreListApiResponse.js +338 -0
- package/dist/lib/models/objects/v4/operations/ObjectstoreProjection.d.ts +50 -0
- package/dist/lib/models/objects/v4/operations/ObjectstoreProjection.js +298 -0
- package/dist/lib/models/objects/v4/operations/StateEnum.d.ts +19 -0
- package/dist/lib/models/objects/v4/operations/StateEnum.js +145 -0
- package/dist/lib/models/objects/v4/operations/TaskReferenceApiResponse.d.ts +59 -0
- package/dist/lib/models/objects/v4/operations/TaskReferenceApiResponse.js +311 -0
- package/dist/lib/models/prism/v4/config/TaskReference.d.ts +50 -0
- package/dist/lib/models/prism/v4/config/TaskReference.js +247 -0
- package/dist/lib/models/validation/ValidationError.d.ts +13 -0
- package/dist/lib/models/validation/ValidationError.js +60 -0
- package/dist/lib/models/validation/ValidationScopes.d.ts +9 -0
- package/dist/lib/models/validation/ValidationScopes.js +38 -0
- package/dist/lib/utils/ValidationUtils.d.ts +13 -0
- package/dist/lib/utils/ValidationUtils.js +85 -0
- package/package.json +53 -0
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
|
|
8
|
+
var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
|
|
9
|
+
var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
15
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
16
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
22
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
23
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
24
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
25
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
26
|
+
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
|
27
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } } /*
|
|
28
|
+
* Nutanix Objects Storage Management APIs
|
|
29
|
+
*
|
|
30
|
+
* OpenAPI spec version: 4.0.1-alpha-2
|
|
31
|
+
*
|
|
32
|
+
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
33
|
+
*
|
|
34
|
+
* Open API Dev Platform Codegen version: 16.8.0.7344-RELEASE
|
|
35
|
+
*
|
|
36
|
+
* Do not edit the class manually.
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* The Metadata model module.
|
|
41
|
+
* @module Ntnx/Metadata
|
|
42
|
+
* @version 4.0.1-alpha-2
|
|
43
|
+
* @class Metadata
|
|
44
|
+
*/
|
|
45
|
+
var _Metadata_brand = /*#__PURE__*/new WeakSet();
|
|
46
|
+
var Metadata = exports["default"] = /*#__PURE__*/function () {
|
|
47
|
+
/**
|
|
48
|
+
* Constructs a new <code>Metadata</code>.
|
|
49
|
+
* Metadata associated with this resource.
|
|
50
|
+
* @alias module:Ntnx/Metadata
|
|
51
|
+
*/
|
|
52
|
+
function Metadata() {
|
|
53
|
+
_classCallCheck(this, Metadata);
|
|
54
|
+
/*
|
|
55
|
+
* toJson method for a map type which supports map with primitive keys and values of object types
|
|
56
|
+
* @param {Object} obj
|
|
57
|
+
* @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
|
|
58
|
+
* Otherwise, just returns the input object.
|
|
59
|
+
*/
|
|
60
|
+
_classPrivateMethodInitSpec(this, _Metadata_brand);
|
|
61
|
+
this.$objectType = "common.v1.config.Metadata";
|
|
62
|
+
this.$reserved = {
|
|
63
|
+
'$fv': "v1.r0.b1"
|
|
64
|
+
};
|
|
65
|
+
this.$unknownFields = {};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Constructs a <code>Metadata</code> from a plain JavaScript object, optionally creating a new instance.
|
|
70
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
71
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
72
|
+
* @param {module:Ntnx/Metadata} obj Optional instance to populate.
|
|
73
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
74
|
+
* @return {module:Ntnx/Metadata} The populated <code>Metadata</code> instance.
|
|
75
|
+
*/
|
|
76
|
+
return _createClass(Metadata, [{
|
|
77
|
+
key: "getOwnerReferenceId",
|
|
78
|
+
value:
|
|
79
|
+
/**
|
|
80
|
+
* Returns A globally unique identifier that represents the owner of this resource.
|
|
81
|
+
* @return {}
|
|
82
|
+
*/
|
|
83
|
+
function getOwnerReferenceId() {
|
|
84
|
+
return this.ownerReferenceId;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Sets A globally unique identifier that represents the owner of this resource.
|
|
89
|
+
* @param {} ownerReferenceId A globally unique identifier that represents the owner of this resource.
|
|
90
|
+
*/
|
|
91
|
+
}, {
|
|
92
|
+
key: "setOwnerReferenceId",
|
|
93
|
+
value: function setOwnerReferenceId(ownerReferenceId) {
|
|
94
|
+
this.ownerReferenceId = ownerReferenceId;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Returns The userName of the owner of this resource.
|
|
99
|
+
* @return {}
|
|
100
|
+
*/
|
|
101
|
+
}, {
|
|
102
|
+
key: "getOwnerUserName",
|
|
103
|
+
value: function getOwnerUserName() {
|
|
104
|
+
return this.ownerUserName;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Sets The userName of the owner of this resource.
|
|
109
|
+
* @param {} ownerUserName The userName of the owner of this resource.
|
|
110
|
+
*/
|
|
111
|
+
}, {
|
|
112
|
+
key: "setOwnerUserName",
|
|
113
|
+
value: function setOwnerUserName(ownerUserName) {
|
|
114
|
+
this.ownerUserName = ownerUserName;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Returns A globally unique identifier that represents the project this resource belongs to.
|
|
119
|
+
* @return {}
|
|
120
|
+
*/
|
|
121
|
+
}, {
|
|
122
|
+
key: "getProjectReferenceId",
|
|
123
|
+
value: function getProjectReferenceId() {
|
|
124
|
+
return this.projectReferenceId;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Sets A globally unique identifier that represents the project this resource belongs to.
|
|
129
|
+
* @param {} projectReferenceId A globally unique identifier that represents the project this resource belongs to.
|
|
130
|
+
*/
|
|
131
|
+
}, {
|
|
132
|
+
key: "setProjectReferenceId",
|
|
133
|
+
value: function setProjectReferenceId(projectReferenceId) {
|
|
134
|
+
this.projectReferenceId = projectReferenceId;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Returns The name of the project this resource belongs to.
|
|
139
|
+
* @return {}
|
|
140
|
+
*/
|
|
141
|
+
}, {
|
|
142
|
+
key: "getProjectName",
|
|
143
|
+
value: function getProjectName() {
|
|
144
|
+
return this.projectName;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Sets The name of the project this resource belongs to.
|
|
149
|
+
* @param {} projectName The name of the project this resource belongs to.
|
|
150
|
+
*/
|
|
151
|
+
}, {
|
|
152
|
+
key: "setProjectName",
|
|
153
|
+
value: function setProjectName(projectName) {
|
|
154
|
+
this.projectName = projectName;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Returns A list of globally unique identifiers that represent all the categories the resource is associated with.
|
|
159
|
+
* @return {}
|
|
160
|
+
*/
|
|
161
|
+
}, {
|
|
162
|
+
key: "getCategoryIds",
|
|
163
|
+
value: function getCategoryIds() {
|
|
164
|
+
return this.categoryIds;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Sets A list of globally unique identifiers that represent all the categories the resource is associated with.
|
|
169
|
+
* @param {} categoryIds A list of globally unique identifiers that represent all the categories the resource is associated with.
|
|
170
|
+
*/
|
|
171
|
+
}, {
|
|
172
|
+
key: "setCategoryIds",
|
|
173
|
+
value: function setCategoryIds(categoryIds) {
|
|
174
|
+
this.categoryIds = categoryIds;
|
|
175
|
+
}
|
|
176
|
+
}, {
|
|
177
|
+
key: "get$Reserved",
|
|
178
|
+
value: function get$Reserved() {
|
|
179
|
+
return this.$reserved;
|
|
180
|
+
}
|
|
181
|
+
}, {
|
|
182
|
+
key: "get$ObjectType",
|
|
183
|
+
value: function get$ObjectType() {
|
|
184
|
+
return this.$objectType;
|
|
185
|
+
}
|
|
186
|
+
}, {
|
|
187
|
+
key: "get$UnknownFields",
|
|
188
|
+
value: function get$UnknownFields() {
|
|
189
|
+
return this.$unknownFields;
|
|
190
|
+
}
|
|
191
|
+
}, {
|
|
192
|
+
key: "toJson",
|
|
193
|
+
value: function toJson(forMutation) {
|
|
194
|
+
if (forMutation === false) {
|
|
195
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getOwnerReferenceId() !== 'undefined' && this.getOwnerReferenceId() !== null ? {
|
|
196
|
+
'ownerReferenceId': this.getOwnerReferenceId()
|
|
197
|
+
} : {}), typeof this.getOwnerUserName() !== 'undefined' && this.getOwnerUserName() !== null ? {
|
|
198
|
+
'ownerUserName': this.getOwnerUserName()
|
|
199
|
+
} : {}), typeof this.getProjectReferenceId() !== 'undefined' && this.getProjectReferenceId() !== null ? {
|
|
200
|
+
'projectReferenceId': this.getProjectReferenceId()
|
|
201
|
+
} : {}), typeof this.getProjectName() !== 'undefined' && this.getProjectName() !== null ? {
|
|
202
|
+
'projectName': this.getProjectName()
|
|
203
|
+
} : {}), typeof this.getCategoryIds() !== 'undefined' && this.getCategoryIds() !== null ? {
|
|
204
|
+
'categoryIds': this.getCategoryIds()
|
|
205
|
+
} : {}), {}, {
|
|
206
|
+
'$reserved': this.get$Reserved(),
|
|
207
|
+
'$objectType': this.get$ObjectType(),
|
|
208
|
+
'$unknownFields': this.get$UnknownFields()
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getOwnerReferenceId() !== 'undefined' && this.getOwnerReferenceId() !== null ? {
|
|
212
|
+
'ownerReferenceId': this.getOwnerReferenceId()
|
|
213
|
+
} : {}), typeof this.getOwnerUserName() !== 'undefined' && this.getOwnerUserName() !== null ? {
|
|
214
|
+
'ownerUserName': this.getOwnerUserName()
|
|
215
|
+
} : {}), typeof this.getProjectReferenceId() !== 'undefined' && this.getProjectReferenceId() !== null ? {
|
|
216
|
+
'projectReferenceId': this.getProjectReferenceId()
|
|
217
|
+
} : {}), typeof this.getProjectName() !== 'undefined' && this.getProjectName() !== null ? {
|
|
218
|
+
'projectName': this.getProjectName()
|
|
219
|
+
} : {}), typeof this.getCategoryIds() !== 'undefined' && this.getCategoryIds() !== null ? {
|
|
220
|
+
'categoryIds': this.getCategoryIds()
|
|
221
|
+
} : {}), {}, {
|
|
222
|
+
'$reserved': this.get$Reserved(),
|
|
223
|
+
'$objectType': this.get$ObjectType(),
|
|
224
|
+
'$unknownFields': this.get$UnknownFields()
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
}, {
|
|
228
|
+
key: "validate",
|
|
229
|
+
value: function validate(scope, properties) {
|
|
230
|
+
var _this = this;
|
|
231
|
+
var propList = [];
|
|
232
|
+
if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes["default"]) {
|
|
233
|
+
//cases validate() and validate(scope)
|
|
234
|
+
propList = [];
|
|
235
|
+
} else if (arguments.length === 1) {
|
|
236
|
+
//case validate(properties)
|
|
237
|
+
propList = arguments[0];
|
|
238
|
+
scope = null;
|
|
239
|
+
} else {
|
|
240
|
+
//case validate(scope, properties)
|
|
241
|
+
propList = arguments[1];
|
|
242
|
+
}
|
|
243
|
+
var res = [];
|
|
244
|
+
var err = null;
|
|
245
|
+
propList.forEach(function (property) {
|
|
246
|
+
err = _this.validateProperty(property, scope);
|
|
247
|
+
if (err) {
|
|
248
|
+
res.push(err);
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
return new Promise(function (resolve, reject) {
|
|
252
|
+
if (res.length !== 0) {
|
|
253
|
+
reject(err);
|
|
254
|
+
} else {
|
|
255
|
+
resolve();
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}, {
|
|
260
|
+
key: "validateProperty",
|
|
261
|
+
value: function validateProperty(scope, property) {
|
|
262
|
+
if (property === "ownerReferenceId") {
|
|
263
|
+
if (typeof this.ownerReferenceId === 'undefined' || this.ownerReferenceId === null) {
|
|
264
|
+
return new _ValidationError["default"]("ownerReferenceId", "undefined or null");
|
|
265
|
+
}
|
|
266
|
+
if (!_ValidationUtils["default"].validatePattern(this.ownerReferenceId, /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)) {
|
|
267
|
+
return new _ValidationError["default"]("ownerReferenceId", "does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/");
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
if (property === "ownerUserName") {
|
|
271
|
+
if (typeof this.ownerUserName === 'undefined' || this.ownerUserName === null) {
|
|
272
|
+
return new _ValidationError["default"]("ownerUserName", "undefined or null");
|
|
273
|
+
}
|
|
274
|
+
if (!_ValidationUtils["default"].validateMaxLength(this.ownerUserName, 128)) {
|
|
275
|
+
return new _ValidationError["default"]("ownerUserName", "does not satisfy required maxLength constraint: 128");
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
if (property === "projectReferenceId") {
|
|
279
|
+
if (typeof this.projectReferenceId === 'undefined' || this.projectReferenceId === null) {
|
|
280
|
+
return new _ValidationError["default"]("projectReferenceId", "undefined or null");
|
|
281
|
+
}
|
|
282
|
+
if (!_ValidationUtils["default"].validatePattern(this.projectReferenceId, /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)) {
|
|
283
|
+
return new _ValidationError["default"]("projectReferenceId", "does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/");
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
if (property === "projectName") {
|
|
287
|
+
if (typeof this.projectName === 'undefined' || this.projectName === null) {
|
|
288
|
+
return new _ValidationError["default"]("projectName", "undefined or null");
|
|
289
|
+
}
|
|
290
|
+
if (!_ValidationUtils["default"].validateMaxLength(this.projectName, 128)) {
|
|
291
|
+
return new _ValidationError["default"]("projectName", "does not satisfy required maxLength constraint: 128");
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
if (property === "categoryIds") {
|
|
295
|
+
if (typeof this.categoryIds === 'undefined' || this.categoryIds === null) {
|
|
296
|
+
return new _ValidationError["default"]("categoryIds", "undefined or null");
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
if (property === "$reserved") {
|
|
300
|
+
if (typeof this.$reserved === 'undefined' || this.$reserved === null) {
|
|
301
|
+
return new _ValidationError["default"]("$reserved", "undefined or null");
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
if (property === "$objectType") {
|
|
305
|
+
if (typeof this.$objectType === 'undefined' || this.$objectType === null) {
|
|
306
|
+
return new _ValidationError["default"]("$objectType", "undefined or null");
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
if (property === "$unknownFields") {
|
|
310
|
+
if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {
|
|
311
|
+
return new _ValidationError["default"]("$unknownFields", "undefined or null");
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return new _ValidationError["default"](property, "no such property exists");
|
|
315
|
+
}
|
|
316
|
+
}], [{
|
|
317
|
+
key: "constructFromObject",
|
|
318
|
+
value: function constructFromObject(data, obj) {
|
|
319
|
+
var callFromChild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
320
|
+
var items, item, i, itemArr, discriminator;
|
|
321
|
+
if (data) {
|
|
322
|
+
obj = obj || new Metadata();
|
|
323
|
+
if (data.hasOwnProperty('ownerReferenceId') && data.ownerReferenceId !== null && data.ownerReferenceId !== undefined) {
|
|
324
|
+
obj.setOwnerReferenceId(data['ownerReferenceId']);
|
|
325
|
+
}
|
|
326
|
+
if (data.hasOwnProperty('ownerUserName') && data.ownerUserName !== null && data.ownerUserName !== undefined) {
|
|
327
|
+
obj.setOwnerUserName(data['ownerUserName']);
|
|
328
|
+
}
|
|
329
|
+
if (data.hasOwnProperty('projectReferenceId') && data.projectReferenceId !== null && data.projectReferenceId !== undefined) {
|
|
330
|
+
obj.setProjectReferenceId(data['projectReferenceId']);
|
|
331
|
+
}
|
|
332
|
+
if (data.hasOwnProperty('projectName') && data.projectName !== null && data.projectName !== undefined) {
|
|
333
|
+
obj.setProjectName(data['projectName']);
|
|
334
|
+
}
|
|
335
|
+
if (data.hasOwnProperty('categoryIds') && data.categoryIds !== null && data.categoryIds !== undefined) {
|
|
336
|
+
itemArr = [];
|
|
337
|
+
items = data.categoryIds;
|
|
338
|
+
for (i = 0; i < items.length; i++) {
|
|
339
|
+
itemArr.push(items[i]);
|
|
340
|
+
}
|
|
341
|
+
obj.setCategoryIds(itemArr);
|
|
342
|
+
}
|
|
343
|
+
if (data.hasOwnProperty('$reserved')) {
|
|
344
|
+
obj.$reserved = data['$reserved'];
|
|
345
|
+
}
|
|
346
|
+
if (data.hasOwnProperty('$objectType')) {
|
|
347
|
+
obj.$objectType = data['$objectType'];
|
|
348
|
+
}
|
|
349
|
+
if (data.hasOwnProperty('$unknownFields')) {
|
|
350
|
+
obj.$unknownFields = data['$unknownFields'];
|
|
351
|
+
}
|
|
352
|
+
if (!callFromChild) {
|
|
353
|
+
obj.$unknownFields = _objectSpread({}, data.$unknownFields);
|
|
354
|
+
for (var property in data) {
|
|
355
|
+
if (!Object.keys(obj).includes(property) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
|
|
356
|
+
obj.$unknownFields[property] = data[property];
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
return obj;
|
|
362
|
+
}
|
|
363
|
+
}]);
|
|
364
|
+
}();
|
|
365
|
+
/**
|
|
366
|
+
* A globally unique identifier that represents the owner of this resource.
|
|
367
|
+
* @memberof Metadata
|
|
368
|
+
*/
|
|
369
|
+
function _toJsonMapType(obj, forMutation) {
|
|
370
|
+
if (obj instanceof Map) {
|
|
371
|
+
return Object.fromEntries(Array.from(obj, function (_ref) {
|
|
372
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
373
|
+
k = _ref2[0],
|
|
374
|
+
v = _ref2[1];
|
|
375
|
+
return [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v];
|
|
376
|
+
}));
|
|
377
|
+
} else if (_typeof(obj) === 'object' && obj != null && obj.constructor === Object) {
|
|
378
|
+
return Object.fromEntries(Array.from(Object.entries(obj), function (entry) {
|
|
379
|
+
return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
|
|
380
|
+
}));
|
|
381
|
+
}
|
|
382
|
+
return obj;
|
|
383
|
+
}
|
|
384
|
+
Metadata.prototype.ownerReferenceId = undefined;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* The userName of the owner of this resource.
|
|
388
|
+
* @memberof Metadata
|
|
389
|
+
*/
|
|
390
|
+
Metadata.prototype.ownerUserName = undefined;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* A globally unique identifier that represents the project this resource belongs to.
|
|
394
|
+
* @memberof Metadata
|
|
395
|
+
*/
|
|
396
|
+
Metadata.prototype.projectReferenceId = undefined;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* The name of the project this resource belongs to.
|
|
400
|
+
* @memberof Metadata
|
|
401
|
+
*/
|
|
402
|
+
Metadata.prototype.projectName = undefined;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* A list of globally unique identifiers that represent all the categories the resource is associated with.
|
|
406
|
+
* @memberof Metadata
|
|
407
|
+
*/
|
|
408
|
+
Metadata.prototype.categoryIds = undefined;
|
|
409
|
+
Metadata.prototype.$reserved = undefined;
|
|
410
|
+
Metadata.prototype.$objectType = undefined;
|
|
411
|
+
Metadata.prototype.$unknownFields = undefined;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The TenantAwareModel model module.
|
|
3
|
+
* @module Ntnx/TenantAwareModel
|
|
4
|
+
* @version 4.0.1-alpha-2
|
|
5
|
+
* @class TenantAwareModel
|
|
6
|
+
*/
|
|
7
|
+
export default class TenantAwareModel {
|
|
8
|
+
/**
|
|
9
|
+
* Constructs a <code>TenantAwareModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
10
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
11
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
12
|
+
* @param {module:Ntnx/TenantAwareModel} obj Optional instance to populate.
|
|
13
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
14
|
+
* @return {module:Ntnx/TenantAwareModel} The populated <code>TenantAwareModel</code> instance.
|
|
15
|
+
*/
|
|
16
|
+
static constructFromObject(data: any, obj: any, callFromChild?: boolean): any;
|
|
17
|
+
$objectType: string;
|
|
18
|
+
$reserved: {
|
|
19
|
+
$fv: string;
|
|
20
|
+
};
|
|
21
|
+
$unknownFields: {};
|
|
22
|
+
/**
|
|
23
|
+
* Returns A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this Id to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
|
|
24
|
+
* @return {}
|
|
25
|
+
*/
|
|
26
|
+
getTenantId(): any;
|
|
27
|
+
/**
|
|
28
|
+
* Sets A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this Id to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
|
|
29
|
+
* @param {} tenantId A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this Id to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
|
|
30
|
+
*/
|
|
31
|
+
setTenantId(tenantId: any): void;
|
|
32
|
+
tenantId: any;
|
|
33
|
+
get$Reserved(): {
|
|
34
|
+
$fv: string;
|
|
35
|
+
};
|
|
36
|
+
get$ObjectType(): string;
|
|
37
|
+
get$UnknownFields(): {};
|
|
38
|
+
toJson(forMutation: any): {
|
|
39
|
+
$reserved: {
|
|
40
|
+
$fv: string;
|
|
41
|
+
};
|
|
42
|
+
$objectType: string;
|
|
43
|
+
$unknownFields: {};
|
|
44
|
+
tenantId?: any;
|
|
45
|
+
};
|
|
46
|
+
validate(scope: any, properties: any, ...args: any[]): Promise<any>;
|
|
47
|
+
validateProperty(scope: any, property: any): ValidationError;
|
|
48
|
+
#private;
|
|
49
|
+
}
|
|
50
|
+
import ValidationError from "../../../validation/ValidationError";
|