@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,354 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _MessageSeverity = _interopRequireDefault(require("./MessageSeverity"));
|
|
8
|
+
var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
|
|
9
|
+
var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
|
|
10
|
+
var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
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); }
|
|
13
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
|
+
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."); }
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
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; } }
|
|
18
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
19
|
+
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; }
|
|
20
|
+
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; }
|
|
21
|
+
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; }
|
|
22
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
|
+
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); } }
|
|
24
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
26
|
+
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); }
|
|
27
|
+
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
|
28
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } } /*
|
|
29
|
+
* Nutanix Objects Storage Management APIs
|
|
30
|
+
*
|
|
31
|
+
* OpenAPI spec version: 4.0.1-alpha-2
|
|
32
|
+
*
|
|
33
|
+
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
34
|
+
*
|
|
35
|
+
* Open API Dev Platform Codegen version: 16.8.0.7344-RELEASE
|
|
36
|
+
*
|
|
37
|
+
* Do not edit the class manually.
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
/**
|
|
41
|
+
* The Message model module.
|
|
42
|
+
* @module Ntnx/Message
|
|
43
|
+
* @version 4.0.1-alpha-2
|
|
44
|
+
* @class Message
|
|
45
|
+
*/
|
|
46
|
+
var _Message_brand = /*#__PURE__*/new WeakSet();
|
|
47
|
+
var Message = exports["default"] = /*#__PURE__*/function () {
|
|
48
|
+
/**
|
|
49
|
+
* Constructs a new <code>Message</code>.
|
|
50
|
+
* @alias module:Ntnx/Message
|
|
51
|
+
*/
|
|
52
|
+
function Message() {
|
|
53
|
+
_classCallCheck(this, Message);
|
|
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, _Message_brand);
|
|
61
|
+
this.$objectType = "common.v1.config.Message";
|
|
62
|
+
this.$reserved = {
|
|
63
|
+
'$fv': "v1.r0.b1"
|
|
64
|
+
};
|
|
65
|
+
this.$unknownFields = {};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Constructs a <code>Message</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/Message} obj Optional instance to populate.
|
|
73
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
74
|
+
* @return {module:Ntnx/Message} The populated <code>Message</code> instance.
|
|
75
|
+
*/
|
|
76
|
+
return _createClass(Message, [{
|
|
77
|
+
key: "getCode",
|
|
78
|
+
value:
|
|
79
|
+
/**
|
|
80
|
+
* Returns A code that uniquely identifies a message.
|
|
81
|
+
* @return {}
|
|
82
|
+
*/
|
|
83
|
+
function getCode() {
|
|
84
|
+
return this.code;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Sets A code that uniquely identifies a message.
|
|
89
|
+
* @param {} code A code that uniquely identifies a message.
|
|
90
|
+
*/
|
|
91
|
+
}, {
|
|
92
|
+
key: "setCode",
|
|
93
|
+
value: function setCode(code) {
|
|
94
|
+
this.code = code;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Returns The description of the message.
|
|
99
|
+
* @return {}
|
|
100
|
+
*/
|
|
101
|
+
}, {
|
|
102
|
+
key: "getMessage",
|
|
103
|
+
value: function getMessage() {
|
|
104
|
+
return this.message;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Sets The description of the message.
|
|
109
|
+
* @param {} message The description of the message.
|
|
110
|
+
*/
|
|
111
|
+
}, {
|
|
112
|
+
key: "setMessage",
|
|
113
|
+
value: function setMessage(message) {
|
|
114
|
+
this.message = message;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Returns The locale for the message description.
|
|
119
|
+
* @return {}
|
|
120
|
+
*/
|
|
121
|
+
}, {
|
|
122
|
+
key: "getLocale",
|
|
123
|
+
value: function getLocale() {
|
|
124
|
+
return this.locale;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Sets The locale for the message description.
|
|
129
|
+
* @param {} locale The locale for the message description.
|
|
130
|
+
*/
|
|
131
|
+
}, {
|
|
132
|
+
key: "setLocale",
|
|
133
|
+
value: function setLocale(locale) {
|
|
134
|
+
this.locale = locale;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @return {}
|
|
139
|
+
*/
|
|
140
|
+
}, {
|
|
141
|
+
key: "getSeverity",
|
|
142
|
+
value: function getSeverity() {
|
|
143
|
+
return this.severity;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @param {} severity
|
|
148
|
+
*/
|
|
149
|
+
}, {
|
|
150
|
+
key: "setSeverity",
|
|
151
|
+
value: function setSeverity(severity) {
|
|
152
|
+
this.severity = severity;
|
|
153
|
+
}
|
|
154
|
+
}, {
|
|
155
|
+
key: "get$Reserved",
|
|
156
|
+
value: function get$Reserved() {
|
|
157
|
+
return this.$reserved;
|
|
158
|
+
}
|
|
159
|
+
}, {
|
|
160
|
+
key: "get$ObjectType",
|
|
161
|
+
value: function get$ObjectType() {
|
|
162
|
+
return this.$objectType;
|
|
163
|
+
}
|
|
164
|
+
}, {
|
|
165
|
+
key: "get$UnknownFields",
|
|
166
|
+
value: function get$UnknownFields() {
|
|
167
|
+
return this.$unknownFields;
|
|
168
|
+
}
|
|
169
|
+
}, {
|
|
170
|
+
key: "toJson",
|
|
171
|
+
value: function toJson(forMutation) {
|
|
172
|
+
if (forMutation === false) {
|
|
173
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getCode() !== 'undefined' && this.getCode() !== null ? {
|
|
174
|
+
'code': this.getCode()
|
|
175
|
+
} : {}), typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {
|
|
176
|
+
'message': this.getMessage()
|
|
177
|
+
} : {}), typeof this.getLocale() !== 'undefined' && this.getLocale() !== null ? {
|
|
178
|
+
'locale': this.getLocale()
|
|
179
|
+
} : {}), typeof this.getSeverity() !== 'undefined' && this.getSeverity() !== null ? {
|
|
180
|
+
'severity': this.getSeverity()
|
|
181
|
+
} : {}), {}, {
|
|
182
|
+
'$reserved': this.get$Reserved(),
|
|
183
|
+
'$objectType': this.get$ObjectType(),
|
|
184
|
+
'$unknownFields': this.get$UnknownFields()
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getCode() !== 'undefined' && this.getCode() !== null ? {
|
|
188
|
+
'code': this.getCode()
|
|
189
|
+
} : {}), typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {
|
|
190
|
+
'message': this.getMessage()
|
|
191
|
+
} : {}), typeof this.getLocale() !== 'undefined' && this.getLocale() !== null ? {
|
|
192
|
+
'locale': this.getLocale()
|
|
193
|
+
} : {}), typeof this.getSeverity() !== 'undefined' && this.getSeverity() !== null ? {
|
|
194
|
+
'severity': this.getSeverity()
|
|
195
|
+
} : {}), {}, {
|
|
196
|
+
'$reserved': this.get$Reserved(),
|
|
197
|
+
'$objectType': this.get$ObjectType(),
|
|
198
|
+
'$unknownFields': this.get$UnknownFields()
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}, {
|
|
202
|
+
key: "validate",
|
|
203
|
+
value: function validate(scope, properties) {
|
|
204
|
+
var _this = this;
|
|
205
|
+
var propList = [];
|
|
206
|
+
if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes["default"]) {
|
|
207
|
+
//cases validate() and validate(scope)
|
|
208
|
+
propList = [];
|
|
209
|
+
} else if (arguments.length === 1) {
|
|
210
|
+
//case validate(properties)
|
|
211
|
+
propList = arguments[0];
|
|
212
|
+
scope = null;
|
|
213
|
+
} else {
|
|
214
|
+
//case validate(scope, properties)
|
|
215
|
+
propList = arguments[1];
|
|
216
|
+
}
|
|
217
|
+
var res = [];
|
|
218
|
+
var err = null;
|
|
219
|
+
propList.forEach(function (property) {
|
|
220
|
+
err = _this.validateProperty(property, scope);
|
|
221
|
+
if (err) {
|
|
222
|
+
res.push(err);
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
return new Promise(function (resolve, reject) {
|
|
226
|
+
if (res.length !== 0) {
|
|
227
|
+
reject(err);
|
|
228
|
+
} else {
|
|
229
|
+
resolve();
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}, {
|
|
234
|
+
key: "validateProperty",
|
|
235
|
+
value: function validateProperty(scope, property) {
|
|
236
|
+
if (property === "code") {
|
|
237
|
+
if (typeof this.code === 'undefined' || this.code === null) {
|
|
238
|
+
return new _ValidationError["default"]("code", "undefined or null");
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
if (property === "message") {
|
|
242
|
+
if (typeof this.message === 'undefined' || this.message === null) {
|
|
243
|
+
return new _ValidationError["default"]("message", "undefined or null");
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
if (property === "locale") {
|
|
247
|
+
if (typeof this.locale === 'undefined' || this.locale === null) {
|
|
248
|
+
return new _ValidationError["default"]("locale", "undefined or null");
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
if (property === "severity") {
|
|
252
|
+
if (typeof this.severity === 'undefined' || this.severity === null) {
|
|
253
|
+
return new _ValidationError["default"]("severity", "undefined or null");
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
if (property === "$reserved") {
|
|
257
|
+
if (typeof this.$reserved === 'undefined' || this.$reserved === null) {
|
|
258
|
+
return new _ValidationError["default"]("$reserved", "undefined or null");
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
if (property === "$objectType") {
|
|
262
|
+
if (typeof this.$objectType === 'undefined' || this.$objectType === null) {
|
|
263
|
+
return new _ValidationError["default"]("$objectType", "undefined or null");
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
if (property === "$unknownFields") {
|
|
267
|
+
if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {
|
|
268
|
+
return new _ValidationError["default"]("$unknownFields", "undefined or null");
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return new _ValidationError["default"](property, "no such property exists");
|
|
272
|
+
}
|
|
273
|
+
}], [{
|
|
274
|
+
key: "constructFromObject",
|
|
275
|
+
value: function constructFromObject(data, obj) {
|
|
276
|
+
var callFromChild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
277
|
+
var items, item, i, itemArr, discriminator;
|
|
278
|
+
if (data) {
|
|
279
|
+
obj = obj || new Message();
|
|
280
|
+
if (data.hasOwnProperty('code') && data.code !== null && data.code !== undefined) {
|
|
281
|
+
obj.setCode(data['code']);
|
|
282
|
+
}
|
|
283
|
+
if (data.hasOwnProperty('message') && data.message !== null && data.message !== undefined) {
|
|
284
|
+
obj.setMessage(data['message']);
|
|
285
|
+
}
|
|
286
|
+
if (data.hasOwnProperty('locale') && data.locale !== null && data.locale !== undefined) {
|
|
287
|
+
obj.setLocale(data['locale']);
|
|
288
|
+
}
|
|
289
|
+
if (data.hasOwnProperty('severity') && data.severity !== null && data.severity !== undefined) {
|
|
290
|
+
obj.setSeverity(_MessageSeverity["default"].constructFromObject(data['severity']));
|
|
291
|
+
}
|
|
292
|
+
if (data.hasOwnProperty('$reserved')) {
|
|
293
|
+
obj.$reserved = data['$reserved'];
|
|
294
|
+
}
|
|
295
|
+
if (data.hasOwnProperty('$objectType')) {
|
|
296
|
+
obj.$objectType = data['$objectType'];
|
|
297
|
+
}
|
|
298
|
+
if (data.hasOwnProperty('$unknownFields')) {
|
|
299
|
+
obj.$unknownFields = data['$unknownFields'];
|
|
300
|
+
}
|
|
301
|
+
if (!callFromChild) {
|
|
302
|
+
obj.$unknownFields = _objectSpread({}, data.$unknownFields);
|
|
303
|
+
for (var property in data) {
|
|
304
|
+
if (!Object.keys(obj).includes(property) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
|
|
305
|
+
obj.$unknownFields[property] = data[property];
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
return obj;
|
|
311
|
+
}
|
|
312
|
+
}]);
|
|
313
|
+
}();
|
|
314
|
+
/**
|
|
315
|
+
* A code that uniquely identifies a message.
|
|
316
|
+
* @memberof Message
|
|
317
|
+
*/
|
|
318
|
+
function _toJsonMapType(obj, forMutation) {
|
|
319
|
+
if (obj instanceof Map) {
|
|
320
|
+
return Object.fromEntries(Array.from(obj, function (_ref) {
|
|
321
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
322
|
+
k = _ref2[0],
|
|
323
|
+
v = _ref2[1];
|
|
324
|
+
return [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v];
|
|
325
|
+
}));
|
|
326
|
+
} else if (_typeof(obj) === 'object' && obj != null && obj.constructor === Object) {
|
|
327
|
+
return Object.fromEntries(Array.from(Object.entries(obj), function (entry) {
|
|
328
|
+
return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
|
|
329
|
+
}));
|
|
330
|
+
}
|
|
331
|
+
return obj;
|
|
332
|
+
}
|
|
333
|
+
Message.prototype.code = undefined;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* The description of the message.
|
|
337
|
+
* @memberof Message
|
|
338
|
+
*/
|
|
339
|
+
Message.prototype.message = undefined;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* The locale for the message description.
|
|
343
|
+
* @memberof Message
|
|
344
|
+
* @default 'en_US'
|
|
345
|
+
*/
|
|
346
|
+
Message.prototype.locale = 'en_US';
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* @memberof Message
|
|
350
|
+
*/
|
|
351
|
+
Message.prototype.severity = undefined;
|
|
352
|
+
Message.prototype.$reserved = undefined;
|
|
353
|
+
Message.prototype.$objectType = undefined;
|
|
354
|
+
Message.prototype.$unknownFields = undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default MessageSeverity;
|
|
2
|
+
/**
|
|
3
|
+
* *
|
|
4
|
+
*/
|
|
5
|
+
type MessageSeverity = string;
|
|
6
|
+
declare namespace MessageSeverity {
|
|
7
|
+
/**
|
|
8
|
+
* Returns a <code>MessageSeverity</code> enum value from a JavaScript object name.
|
|
9
|
+
* @param {Object} obj The plain JavaScript object containing the name of the enum value.
|
|
10
|
+
* @return {MessageSeverity} The enum <code>MessageSeverity</code> value.
|
|
11
|
+
*/
|
|
12
|
+
function constructFromObject(obj: any): string;
|
|
13
|
+
/**
|
|
14
|
+
* Validates <code>MessageSeverity</code> enum value.
|
|
15
|
+
* @param {Object} obj The plain JavaScript object containing the name of the enum value.
|
|
16
|
+
* @return {null} Throws error for invalid value.
|
|
17
|
+
*/
|
|
18
|
+
function validate(obj: any): null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
/*
|
|
12
|
+
* Nutanix Objects Storage Management APIs
|
|
13
|
+
*
|
|
14
|
+
* OpenAPI spec version: 4.0.1-alpha-2
|
|
15
|
+
*
|
|
16
|
+
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
17
|
+
*
|
|
18
|
+
* Open API Dev Platform Codegen version: 16.8.0.7344-RELEASE
|
|
19
|
+
*
|
|
20
|
+
* Do not edit the class manually.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Enum class MessageSeverity.
|
|
26
|
+
* @enum {string}
|
|
27
|
+
* @readonly
|
|
28
|
+
*/
|
|
29
|
+
var MessageSeverity = {
|
|
30
|
+
/**
|
|
31
|
+
* value: "$UNKNOWN"
|
|
32
|
+
* @const
|
|
33
|
+
*/
|
|
34
|
+
$UNKNOWN: "$UNKNOWN",
|
|
35
|
+
/**
|
|
36
|
+
* value: "$REDACTED"
|
|
37
|
+
* @const
|
|
38
|
+
*/
|
|
39
|
+
$REDACTED: "$REDACTED",
|
|
40
|
+
/**
|
|
41
|
+
* Information about successful completion.
|
|
42
|
+
* @const
|
|
43
|
+
*/
|
|
44
|
+
INFO: "INFO",
|
|
45
|
+
/**
|
|
46
|
+
* Warning indicating future error.
|
|
47
|
+
* @const
|
|
48
|
+
*/
|
|
49
|
+
WARNING: "WARNING",
|
|
50
|
+
/**
|
|
51
|
+
* Error indicating failed completion.
|
|
52
|
+
* @const
|
|
53
|
+
*/
|
|
54
|
+
ERROR: "ERROR"
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Returns a <code>MessageSeverity</code> enum value from a JavaScript object name.
|
|
59
|
+
* @param {Object} obj The plain JavaScript object containing the name of the enum value.
|
|
60
|
+
* @return {MessageSeverity} The enum <code>MessageSeverity</code> value.
|
|
61
|
+
*/
|
|
62
|
+
MessageSeverity.constructFromObject = function (obj) {
|
|
63
|
+
if (typeof obj === 'string' || obj instanceof String) {
|
|
64
|
+
var enumVal = Object.keys(MessageSeverity).find(function (key) {
|
|
65
|
+
return MessageSeverity[key] === obj;
|
|
66
|
+
});
|
|
67
|
+
return enumVal === undefined || enumVal === null ? MessageSeverity.$UNKNOWN : MessageSeverity[enumVal];
|
|
68
|
+
} else {
|
|
69
|
+
throw new Error("Received object name is not an instance of String");
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Validates <code>MessageSeverity</code> enum value.
|
|
75
|
+
* @param {Object} obj The plain JavaScript object containing the name of the enum value.
|
|
76
|
+
* @return {null} Throws error for invalid value.
|
|
77
|
+
*/
|
|
78
|
+
MessageSeverity.validate = function (obj) {
|
|
79
|
+
switch (obj) {
|
|
80
|
+
case MessageSeverity.$UNKNOWN:
|
|
81
|
+
case MessageSeverity.$REDACTED:
|
|
82
|
+
case MessageSeverity.INFO:
|
|
83
|
+
case MessageSeverity.WARNING:
|
|
84
|
+
case MessageSeverity.ERROR:
|
|
85
|
+
return;
|
|
86
|
+
default:
|
|
87
|
+
throw new Error("Invalid : must be MessageSeverity.{ $UNKNOWN|$REDACTED|INFO|WARNING|ERROR }");
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
Object.freeze(MessageSeverity);
|
|
91
|
+
var _default = exports["default"] = MessageSeverity;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Metadata model module.
|
|
3
|
+
* @module Ntnx/Metadata
|
|
4
|
+
* @version 4.0.1-alpha-2
|
|
5
|
+
* @class Metadata
|
|
6
|
+
*/
|
|
7
|
+
export default class Metadata {
|
|
8
|
+
/**
|
|
9
|
+
* Constructs a <code>Metadata</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/Metadata} obj Optional instance to populate.
|
|
13
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
14
|
+
* @return {module:Ntnx/Metadata} The populated <code>Metadata</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 owner of this resource.
|
|
24
|
+
* @return {}
|
|
25
|
+
*/
|
|
26
|
+
getOwnerReferenceId(): any;
|
|
27
|
+
/**
|
|
28
|
+
* Sets A globally unique identifier that represents the owner of this resource.
|
|
29
|
+
* @param {} ownerReferenceId A globally unique identifier that represents the owner of this resource.
|
|
30
|
+
*/
|
|
31
|
+
setOwnerReferenceId(ownerReferenceId: any): void;
|
|
32
|
+
ownerReferenceId: any;
|
|
33
|
+
/**
|
|
34
|
+
* Returns The userName of the owner of this resource.
|
|
35
|
+
* @return {}
|
|
36
|
+
*/
|
|
37
|
+
getOwnerUserName(): any;
|
|
38
|
+
/**
|
|
39
|
+
* Sets The userName of the owner of this resource.
|
|
40
|
+
* @param {} ownerUserName The userName of the owner of this resource.
|
|
41
|
+
*/
|
|
42
|
+
setOwnerUserName(ownerUserName: any): void;
|
|
43
|
+
ownerUserName: any;
|
|
44
|
+
/**
|
|
45
|
+
* Returns A globally unique identifier that represents the project this resource belongs to.
|
|
46
|
+
* @return {}
|
|
47
|
+
*/
|
|
48
|
+
getProjectReferenceId(): any;
|
|
49
|
+
/**
|
|
50
|
+
* Sets A globally unique identifier that represents the project this resource belongs to.
|
|
51
|
+
* @param {} projectReferenceId A globally unique identifier that represents the project this resource belongs to.
|
|
52
|
+
*/
|
|
53
|
+
setProjectReferenceId(projectReferenceId: any): void;
|
|
54
|
+
projectReferenceId: any;
|
|
55
|
+
/**
|
|
56
|
+
* Returns The name of the project this resource belongs to.
|
|
57
|
+
* @return {}
|
|
58
|
+
*/
|
|
59
|
+
getProjectName(): any;
|
|
60
|
+
/**
|
|
61
|
+
* Sets The name of the project this resource belongs to.
|
|
62
|
+
* @param {} projectName The name of the project this resource belongs to.
|
|
63
|
+
*/
|
|
64
|
+
setProjectName(projectName: any): void;
|
|
65
|
+
projectName: any;
|
|
66
|
+
/**
|
|
67
|
+
* Returns A list of globally unique identifiers that represent all the categories the resource is associated with.
|
|
68
|
+
* @return {}
|
|
69
|
+
*/
|
|
70
|
+
getCategoryIds(): any;
|
|
71
|
+
/**
|
|
72
|
+
* Sets A list of globally unique identifiers that represent all the categories the resource is associated with.
|
|
73
|
+
* @param {} categoryIds A list of globally unique identifiers that represent all the categories the resource is associated with.
|
|
74
|
+
*/
|
|
75
|
+
setCategoryIds(categoryIds: any): void;
|
|
76
|
+
categoryIds: any;
|
|
77
|
+
get$Reserved(): {
|
|
78
|
+
$fv: string;
|
|
79
|
+
};
|
|
80
|
+
get$ObjectType(): string;
|
|
81
|
+
get$UnknownFields(): {};
|
|
82
|
+
toJson(forMutation: any): {
|
|
83
|
+
$reserved: {
|
|
84
|
+
$fv: string;
|
|
85
|
+
};
|
|
86
|
+
$objectType: string;
|
|
87
|
+
$unknownFields: {};
|
|
88
|
+
categoryIds?: any;
|
|
89
|
+
projectName?: any;
|
|
90
|
+
projectReferenceId?: any;
|
|
91
|
+
ownerUserName?: any;
|
|
92
|
+
ownerReferenceId?: any;
|
|
93
|
+
};
|
|
94
|
+
validate(scope: any, properties: any, ...args: any[]): Promise<any>;
|
|
95
|
+
validateProperty(scope: any, property: any): ValidationError;
|
|
96
|
+
#private;
|
|
97
|
+
}
|
|
98
|
+
import ValidationError from "../../../validation/ValidationError";
|