@nutanix-scratch/objects-js-client 4.0.2 → 4.0.3
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/README.md +3 -3
- package/dist/Ntnx-Objects-js-client-prod.js +1 -1
- package/dist/Ntnx-Objects-js-client.js +60 -60
- package/dist/es/ApiClient.d.ts +1 -1
- package/dist/es/ApiClient.js +4 -4
- package/dist/es/Paginable.d.ts +1 -1
- package/dist/es/Paginable.js +3 -3
- package/dist/es/apis/objectstores-endpoints.d.ts +3 -3
- package/dist/es/apis/objectstores-endpoints.js +14 -14
- package/dist/es/apis/stats-endpoints.d.ts +3 -2
- package/dist/es/apis/stats-endpoints.js +6 -6
- package/dist/es/models/common/v1/config/FQDN.d.ts +1 -1
- package/dist/es/models/common/v1/config/FQDN.js +3 -3
- package/dist/es/models/common/v1/config/Flag.d.ts +1 -1
- package/dist/es/models/common/v1/config/Flag.js +3 -3
- package/dist/es/models/common/v1/config/IPAddress.d.ts +1 -1
- package/dist/es/models/common/v1/config/IPAddress.js +3 -3
- package/dist/es/models/common/v1/config/IPv4Address.d.ts +1 -1
- package/dist/es/models/common/v1/config/IPv4Address.js +3 -3
- package/dist/es/models/common/v1/config/IPv6Address.d.ts +1 -1
- package/dist/es/models/common/v1/config/IPv6Address.js +3 -3
- package/dist/es/models/common/v1/config/KVPair.d.ts +1 -1
- package/dist/es/models/common/v1/config/KVPair.js +3 -3
- package/dist/es/models/common/v1/config/MapOfStringWrapper.d.ts +1 -1
- package/dist/es/models/common/v1/config/MapOfStringWrapper.js +3 -3
- package/dist/es/models/common/v1/config/Message.d.ts +1 -1
- package/dist/es/models/common/v1/config/Message.js +3 -3
- package/dist/es/models/common/v1/config/MessageSeverity.js +2 -2
- package/dist/es/models/common/v1/config/Metadata.d.ts +1 -1
- package/dist/es/models/common/v1/config/Metadata.js +3 -3
- package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +1 -1
- package/dist/es/models/common/v1/config/TenantAwareModel.js +3 -3
- package/dist/es/models/common/v1/response/ApiLink.d.ts +1 -1
- package/dist/es/models/common/v1/response/ApiLink.js +3 -3
- package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +1 -1
- package/dist/es/models/common/v1/response/ApiResponseMetadata.js +3 -3
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -1
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +3 -3
- package/dist/es/models/common/v1/stats/DownSamplingOperator.js +2 -2
- package/dist/es/models/common/v1/stats/TimeIntValuePair.d.ts +1 -1
- package/dist/es/models/common/v1/stats/TimeIntValuePair.js +3 -3
- package/dist/es/models/objects/v4/config/Certificate.d.ts +1 -1
- package/dist/es/models/objects/v4/config/Certificate.js +3 -3
- package/dist/es/models/objects/v4/config/CertificateProjection.d.ts +1 -1
- package/dist/es/models/objects/v4/config/CertificateProjection.js +3 -3
- package/dist/es/models/objects/v4/config/CreateCertificateApiResponse.d.ts +1 -1
- package/dist/es/models/objects/v4/config/CreateCertificateApiResponse.js +3 -3
- package/dist/es/models/objects/v4/config/CreateObjectstoreApiResponse.d.ts +1 -1
- package/dist/es/models/objects/v4/config/CreateObjectstoreApiResponse.js +3 -3
- package/dist/es/models/objects/v4/config/DeleteObjectstoreApiResponse.d.ts +1 -1
- package/dist/es/models/objects/v4/config/DeleteObjectstoreApiResponse.js +3 -3
- package/dist/es/models/objects/v4/config/GetCaApiResponse.d.ts +1 -1
- package/dist/es/models/objects/v4/config/GetCaApiResponse.js +3 -3
- package/dist/es/models/objects/v4/config/GetCertificateApiResponse.d.ts +1 -1
- package/dist/es/models/objects/v4/config/GetCertificateApiResponse.js +3 -3
- package/dist/es/models/objects/v4/config/GetObjectstoreApiResponse.d.ts +1 -1
- package/dist/es/models/objects/v4/config/GetObjectstoreApiResponse.js +3 -3
- package/dist/es/models/objects/v4/config/ListCertificatesApiResponse.d.ts +1 -1
- package/dist/es/models/objects/v4/config/ListCertificatesApiResponse.js +3 -3
- package/dist/es/models/objects/v4/config/ListObjectstoresApiResponse.d.ts +1 -1
- package/dist/es/models/objects/v4/config/ListObjectstoresApiResponse.js +3 -3
- package/dist/es/models/objects/v4/config/ObjectStore.d.ts +1 -1
- package/dist/es/models/objects/v4/config/ObjectStore.js +3 -3
- package/dist/es/models/objects/v4/config/ObjectStoreProjection.d.ts +1 -1
- package/dist/es/models/objects/v4/config/ObjectStoreProjection.js +3 -3
- package/dist/es/models/objects/v4/config/State.js +2 -2
- package/dist/es/models/objects/v4/config/UpdateObjectstoreApiResponse.d.ts +1 -1
- package/dist/es/models/objects/v4/config/UpdateObjectstoreApiResponse.js +3 -3
- package/dist/es/models/objects/v4/error/AppMessage.d.ts +1 -1
- package/dist/es/models/objects/v4/error/AppMessage.js +3 -3
- package/dist/es/models/objects/v4/error/ErrorResponse.d.ts +1 -1
- package/dist/es/models/objects/v4/error/ErrorResponse.js +3 -3
- package/dist/es/models/objects/v4/error/SchemaValidationError.d.ts +1 -1
- package/dist/es/models/objects/v4/error/SchemaValidationError.js +3 -3
- package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +1 -1
- package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.js +3 -3
- package/dist/es/models/objects/v4/stats/GetObjectstoreStatsApiResponse.d.ts +1 -1
- package/dist/es/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js +3 -3
- package/dist/es/models/objects/v4/stats/ObjectstoreStats.d.ts +1 -1
- package/dist/es/models/objects/v4/stats/ObjectstoreStats.js +3 -3
- package/dist/es/models/objects/v4/stats/TimeFloatValuePair.d.ts +1 -1
- package/dist/es/models/objects/v4/stats/TimeFloatValuePair.js +3 -3
- package/dist/es/models/prism/v4/config/TaskReference.d.ts +1 -1
- package/dist/es/models/prism/v4/config/TaskReference.js +4 -4
- package/dist/es/models/validation/ValidationError.js +2 -2
- package/dist/es/utils/ValidationUtils.js +2 -2
- package/dist/lib/ApiClient.d.ts +1 -1
- package/dist/lib/ApiClient.js +4 -4
- package/dist/lib/Paginable.d.ts +1 -1
- package/dist/lib/Paginable.js +3 -3
- package/dist/lib/apis/objectstores-endpoints.d.ts +3 -3
- package/dist/lib/apis/objectstores-endpoints.js +14 -14
- package/dist/lib/apis/stats-endpoints.d.ts +3 -2
- package/dist/lib/apis/stats-endpoints.js +6 -6
- package/dist/lib/models/common/v1/config/FQDN.d.ts +1 -1
- package/dist/lib/models/common/v1/config/FQDN.js +3 -3
- package/dist/lib/models/common/v1/config/Flag.d.ts +1 -1
- package/dist/lib/models/common/v1/config/Flag.js +3 -3
- package/dist/lib/models/common/v1/config/IPAddress.d.ts +1 -1
- package/dist/lib/models/common/v1/config/IPAddress.js +3 -3
- package/dist/lib/models/common/v1/config/IPv4Address.d.ts +1 -1
- package/dist/lib/models/common/v1/config/IPv4Address.js +3 -3
- package/dist/lib/models/common/v1/config/IPv6Address.d.ts +1 -1
- package/dist/lib/models/common/v1/config/IPv6Address.js +3 -3
- package/dist/lib/models/common/v1/config/KVPair.d.ts +1 -1
- package/dist/lib/models/common/v1/config/KVPair.js +3 -3
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.d.ts +1 -1
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.js +3 -3
- package/dist/lib/models/common/v1/config/Message.d.ts +1 -1
- package/dist/lib/models/common/v1/config/Message.js +3 -3
- package/dist/lib/models/common/v1/config/MessageSeverity.js +2 -2
- package/dist/lib/models/common/v1/config/Metadata.d.ts +1 -1
- package/dist/lib/models/common/v1/config/Metadata.js +3 -3
- package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +1 -1
- package/dist/lib/models/common/v1/config/TenantAwareModel.js +3 -3
- package/dist/lib/models/common/v1/response/ApiLink.d.ts +1 -1
- package/dist/lib/models/common/v1/response/ApiLink.js +3 -3
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +1 -1
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +3 -3
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -1
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +3 -3
- package/dist/lib/models/common/v1/stats/DownSamplingOperator.js +2 -2
- package/dist/lib/models/common/v1/stats/TimeIntValuePair.d.ts +1 -1
- package/dist/lib/models/common/v1/stats/TimeIntValuePair.js +3 -3
- package/dist/lib/models/objects/v4/config/Certificate.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/Certificate.js +3 -3
- package/dist/lib/models/objects/v4/config/CertificateProjection.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/CertificateProjection.js +3 -3
- package/dist/lib/models/objects/v4/config/CreateCertificateApiResponse.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/CreateCertificateApiResponse.js +3 -3
- package/dist/lib/models/objects/v4/config/CreateObjectstoreApiResponse.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/CreateObjectstoreApiResponse.js +3 -3
- package/dist/lib/models/objects/v4/config/DeleteObjectstoreApiResponse.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/DeleteObjectstoreApiResponse.js +3 -3
- package/dist/lib/models/objects/v4/config/GetCaApiResponse.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/GetCaApiResponse.js +3 -3
- package/dist/lib/models/objects/v4/config/GetCertificateApiResponse.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/GetCertificateApiResponse.js +3 -3
- package/dist/lib/models/objects/v4/config/GetObjectstoreApiResponse.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/GetObjectstoreApiResponse.js +3 -3
- package/dist/lib/models/objects/v4/config/ListCertificatesApiResponse.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/ListCertificatesApiResponse.js +3 -3
- package/dist/lib/models/objects/v4/config/ListObjectstoresApiResponse.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/ListObjectstoresApiResponse.js +3 -3
- package/dist/lib/models/objects/v4/config/ObjectStore.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/ObjectStore.js +3 -3
- package/dist/lib/models/objects/v4/config/ObjectStoreProjection.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/ObjectStoreProjection.js +3 -3
- package/dist/lib/models/objects/v4/config/State.js +2 -2
- package/dist/lib/models/objects/v4/config/UpdateObjectstoreApiResponse.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/UpdateObjectstoreApiResponse.js +3 -3
- package/dist/lib/models/objects/v4/error/AppMessage.d.ts +1 -1
- package/dist/lib/models/objects/v4/error/AppMessage.js +3 -3
- package/dist/lib/models/objects/v4/error/ErrorResponse.d.ts +1 -1
- package/dist/lib/models/objects/v4/error/ErrorResponse.js +3 -3
- package/dist/lib/models/objects/v4/error/SchemaValidationError.d.ts +1 -1
- package/dist/lib/models/objects/v4/error/SchemaValidationError.js +3 -3
- package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +1 -1
- package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.js +3 -3
- package/dist/lib/models/objects/v4/stats/GetObjectstoreStatsApiResponse.d.ts +1 -1
- package/dist/lib/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js +3 -3
- package/dist/lib/models/objects/v4/stats/ObjectstoreStats.d.ts +1 -1
- package/dist/lib/models/objects/v4/stats/ObjectstoreStats.js +3 -3
- package/dist/lib/models/objects/v4/stats/TimeFloatValuePair.d.ts +1 -1
- package/dist/lib/models/objects/v4/stats/TimeFloatValuePair.js +3 -3
- package/dist/lib/models/prism/v4/config/TaskReference.d.ts +1 -1
- package/dist/lib/models/prism/v4/config/TaskReference.js +4 -4
- package/dist/lib/models/validation/ValidationError.js +2 -2
- package/dist/lib/utils/ValidationUtils.js +2 -2
- package/package.json +1 -1
|
@@ -218,7 +218,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
218
218
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
219
219
|
|
|
220
220
|
"use strict";
|
|
221
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ApiClient: () => (/* binding */ ApiClient)\n/* harmony export */ });\n/* harmony import */ var superagent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! superagent */ \"./node_modules/superagent/lib/client.js\");\n/* harmony import */ var superagent__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(superagent__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\n/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uuid */ \"./node_modules/uuid/dist/esm-browser/v4.js\");\n/* harmony import */ var superagent_retry_delay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! superagent-retry-delay */ \"./node_modules/superagent-retry-delay/src/index.js\");\n/* harmony import */ var superagent_retry_delay__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(superagent_retry_delay__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! https */ \"?aee4\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(https__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! fs */ \"?e583\");\n/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! path */ \"./node_modules/path/path.js\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var buffer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! buffer */ \"?bdc3\");\n/* harmony import */ var buffer__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(buffer__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _models_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./models/common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _models_common_v1_config_Flag__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./models/common/v1/config/Flag */ \"./target/generated-sources/swagger/src/models/common/v1/config/Flag.js\");\nvar _ApiClient;\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }\nfunction _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\nsuperagent_retry_delay__WEBPACK_IMPORTED_MODULE_3___default()((superagent__WEBPACK_IMPORTED_MODULE_0___default()));\n\n\n\n\n\n\n\n/**\n* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an\n* application to use this class directly - the *Api and model classes provide the public API for the service. The\n* contents of this file should be regarded as internal but are documented for completeness.\n* @module ApiClient\n* @version 4.0.2\n*/\nvar _protocol = /*#__PURE__*/new WeakMap();\nvar _cookie = /*#__PURE__*/new WeakMap();\nvar _logger = /*#__PURE__*/new WeakMap();\nvar _verifySslFlag = /*#__PURE__*/new WeakMap();\nvar _defaultConnectTimeout = /*#__PURE__*/new WeakMap();\nvar _defaultReadTimeout = /*#__PURE__*/new WeakMap();\nvar _defaultMaxTimeout = /*#__PURE__*/new WeakMap();\nvar _host = /*#__PURE__*/new WeakMap();\nvar _negotiationCompleted = /*#__PURE__*/new WeakMap();\nvar _negotiatedVersion = /*#__PURE__*/new WeakMap();\nvar _LOG_LEVEL = /*#__PURE__*/new WeakMap();\nvar _ApiClient_brand = /*#__PURE__*/new WeakSet();\nclass ApiClient {\n /**\n * @alias module:ApiClient\n * @class\n */\n constructor() {\n /*\n * Checks whether the given content type represents JSON.<br>\n * JSON content type examples:<br>\n * <ul>\n * <li>application/json</li>\n * <li>application/json; charset=UTF8</li>\n * <li>APPLICATION/JSON</li>\n * </ul>\n * @param {String} contentType The MIME content type to check.\n * @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.\n */\n _classPrivateMethodInitSpec(this, _ApiClient_brand);\n // PRIVATE VARIABLES\n _classPrivateFieldInitSpec(this, _protocol, void 0);\n _classPrivateFieldInitSpec(this, _cookie, void 0);\n _classPrivateFieldInitSpec(this, _logger, void 0);\n _classPrivateFieldInitSpec(this, _verifySslFlag, void 0);\n _classPrivateFieldInitSpec(this, _defaultConnectTimeout, void 0);\n _classPrivateFieldInitSpec(this, _defaultReadTimeout, void 0);\n _classPrivateFieldInitSpec(this, _defaultMaxTimeout, void 0);\n _classPrivateFieldInitSpec(this, _host, void 0);\n _classPrivateFieldInitSpec(this, _negotiationCompleted, void 0);\n _classPrivateFieldInitSpec(this, _negotiatedVersion, void 0);\n _classPrivateFieldInitSpec(this, _LOG_LEVEL, void 0);\n _classPrivateFieldSet(_LOG_LEVEL, this, Object.freeze({\n DEBUG: {\n key: \"DEBUG\",\n value: Symbol(0)\n },\n INFO: {\n key: \"INFO\",\n value: Symbol(1)\n },\n WARN: {\n key: \"WARN\",\n value: Symbol(2)\n },\n ERROR: {\n key: \"ERROR\",\n value: Symbol(3)\n }\n }));\n\n /**\n * URI scheme for connecting to the cluster (HTTP or HTTPS using SSL/TLS)\n * @type {String}\n * @default https\n */\n this.scheme = 'https';\n\n /**\n * The hostname of the URL against which to resolve every API call's (relative) path.\n * @type {String}\n * @default localhost\n */\n _classPrivateFieldSet(_host, this, typeof self === 'undefined' ? 'localhost' : self.location.hostname);\n\n /**\n * The port of the base URL.\n * @type {String}\n * @default 9440\n */\n this.port = typeof self === 'undefined' ? '9440' : self.location.port;\n\n /**\n * The authentication methods to be included for all API calls.\n * @type {Array.<String>}\n */\n this.authentications = {\n 'apiKeyAuthScheme': {\n type: 'apiKey',\n 'in': 'header',\n name: 'X-ntnx-api-key'\n },\n 'basicAuthScheme': {\n type: 'basic'\n }\n };\n\n /**\n * The default HTTP headers to be included for all API calls.\n * @type {Array.<String>}\n * @default {}\n */\n this.defaultHeaders = {};\n _classPrivateFieldSet(_defaultConnectTimeout, this, 30000);\n _classPrivateFieldSet(_defaultReadTimeout, this, 30000);\n _classPrivateFieldSet(_defaultMaxTimeout, this, 10800000);\n\n /**\n * The default HTTP read timeout in milliseconds for all API calls.\n * @type {Number}\n * @default 30000\n */\n this.readTimeout = _classPrivateFieldGet(_defaultReadTimeout, this);\n\n /**\n * The default HTTP connection timeout in milliseconds for all API calls.\n * @type {Number}\n * @default 30000\n */\n this.connectTimeout = _classPrivateFieldGet(_defaultConnectTimeout, this);\n\n /**\n * If set to false an additional timestamp parameter is added to all API GET calls to\n * prevent browser caching\n * @type {Boolean}\n * @default true\n */\n this.cache = true;\n\n /**\n * Saved Cookies\n * @default null\n */\n _classPrivateFieldSet(_cookie, this, null);\n\n /**\n * The maximum number of redirects to be followed for all API calls.\n * @type {Number}\n * @default 1\n */\n this.maxRedirects = 1;\n\n /**\n * The maximum number of retry attempts to be made by the client\n * in case of server error.\n * @type {Number}\n * @default 5\n */\n this.maxRetryAttempts = 5;\n\n /**\n * The delay period (in milliseconds) between two consecutive retry attempts\n * @type {Number}\n * @default 3000\n */\n this.retryInterval = 3000;\n\n /**\n * A boolean value that indicates whether cross-site Access-Control requests should be made using auth credentials.\n * @type {Boolean}\n * @default false\n */\n this.withCredentials = false;\n if (typeof self === 'undefined') {\n this.agent = new (superagent__WEBPACK_IMPORTED_MODULE_0___default().agent)();\n }\n\n /**\n * Allow user to override superagent agent\n */\n this.requestAgent = null;\n _classPrivateFieldSet(_negotiatedVersion, this, null);\n\n /**\n * Allow SDK to fetch version info and negotiate version\n */\n this.allowVersionNegotiation = true;\n _classPrivateFieldSet(_negotiationCompleted, this, false);\n\n /**\n * Allow SDK to print debug logs\n */\n this.debug = false;\n _classPrivateFieldSet(_logger, this, null);\n\n /**\n * Username for basic auth\n */\n this.username = null;\n\n /**\n * Password for basic auth\n */\n this.password = null;\n _classPrivateFieldSet(_verifySslFlag, this, true);\n\n /*\n * Non Browser Environment : path to directory where downloaded files will be stored\n * Browser Environment : WritableStream to pipe downloaded file to\n */\n this.downloadDestination = null;\n\n /*\n * Log file to write activity logs\n */\n this.loggerFile = null;\n }\n\n /**\n * Enable/Disable SSL Verification\n * @param verifySsl (boolean)\n */\n set verifySsl(verifySsl) {\n this.requestAgent = verifySsl ? null : new (https__WEBPACK_IMPORTED_MODULE_4___default().Agent)({\n rejectUnauthorized: verifySsl\n });\n _classPrivateFieldSet(_verifySslFlag, this, verifySsl);\n }\n get verifySsl() {\n return _classPrivateFieldGet(_verifySslFlag, this);\n }\n\n /**\n * Set the hostname for base URL\n * @param {String} hostname the hostname\n */\n set host(hostname) {\n _classPrivateFieldSet(_host, this, hostname);\n // Reset negotiation flags when host changes\n _classPrivateFieldSet(_negotiationCompleted, this, false);\n _classPrivateFieldSet(_negotiatedVersion, this, null);\n }\n\n /**\n * Get the hostname for base URL\n * @returns {String} the hostname\n */\n get host() {\n return _classPrivateFieldGet(_host, this);\n }\n\n /**\n * Configure log file to write activity logs\n * @param logfile The destination file (write stream / string)\n */\n set loggerFile(logfile) {\n if (logfile !== null && typeof logfile !== 'undefined') {\n if (typeof logfile === 'string' || logfile instanceof String) {\n logfile = fs__WEBPACK_IMPORTED_MODULE_5___default().createWriteStream(logfile, {\n flags: 'a'\n });\n }\n _classPrivateFieldSet(_logger, this, new console.Console({\n stdout: logfile,\n stderr: logfile\n }));\n }\n }\n\n /**\n * Adds key value pair to default headers map, (to be added to every API call request)\n * @param {String} key The key\n * @param {String} value The corresponding value\n */\n addDefaultHeader(key, value) {\n if (key === \"Authorization\") {\n _classPrivateFieldSet(_cookie, this, null);\n }\n this.defaultHeaders[key] = value;\n }\n\n /*\n * Returns a string representation for an actual parameter.\n * @param param The actual parameter.\n * @returns {String} The string representation of <code>param</code>.\n */\n paramToString(param) {\n if (param == undefined || param == null) {\n return '';\n }\n if (param instanceof Date) {\n return param.toJSON();\n }\n return param.toString();\n }\n buildUrl(path, pathParams) {\n if (!path.match(/^\\//)) {\n path = '/' + path;\n }\n if (typeof _classPrivateFieldGet(_negotiatedVersion, this) !== 'undefined' && _classPrivateFieldGet(_negotiatedVersion, this) !== null && _classPrivateFieldGet(_negotiatedVersion, this).match(/v\\d+\\.\\d+(\\.[a|b]\\d+)?/) !== null && _classPrivateFieldGet(_negotiatedVersion, this) !== \"v4.0\") {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Changing uri\", path, \"to negotiated version\", _classPrivateFieldGet(_negotiatedVersion, this));\n var uriRegExp = new RegExp(\"(?<=/[-\\\\w]+/)v\\\\d+\\\\.\\\\d+(\\\\.[a|b]\\\\d+)?(?=/.*)\", \"i\");\n path = path.replace(uriRegExp, _classPrivateFieldGet(_negotiatedVersion, this));\n }\n\n // The protocol of the base URL, including the colon (:).\n _classPrivateFieldSet(_protocol, this, typeof self === 'undefined' ? this.scheme + ':' : self.location.protocol);\n let basePath = ''; //default\n if (_classPrivateFieldGet(_protocol, this) !== '' && this.host !== '' && this.port !== '') {\n basePath = _classPrivateFieldGet(_protocol, this) + '\\/\\/' + this.host + ':' + this.port;\n } else if (typeof self !== \"undefined\") {\n basePath = self.origin;\n }\n var url = basePath + path;\n url = url.replace(/\\{([\\w-]+)\\}/g, (fullMatch, key) => {\n var value;\n if (pathParams.hasOwnProperty(key)) {\n value = this.paramToString(pathParams[key]);\n } else {\n value = fullMatch;\n }\n return encodeURIComponent(value);\n });\n return url;\n }\n /*\n * Builds a string representation of an array-type actual parameter, according to the given collection format.\n * @param {Array} param An array parameter.\n * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.\n * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns\n * <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.\n */\n buildCollectionParam(param, collectionFormat) {\n if (param == null) {\n return null;\n }\n switch (collectionFormat) {\n case 'csv':\n return param.map(this.paramToString).join(',');\n case 'ssv':\n return param.map(this.paramToString).join(' ');\n case 'tsv':\n return param.map(this.paramToString).join('\\t');\n case 'pipes':\n return param.map(this.paramToString).join('|');\n case 'multi':\n //return the array directly as SuperAgent will handle it as expected\n return param.map(this.paramToString);\n default:\n throw new Error('Unknown collection format: ' + collectionFormat);\n }\n }\n\n /*\n * Sets API key for authentication\n *\n * @param {String} key The API key for authentication\n */\n setApiKey(key) {\n if (key == undefined || typeof key === 'string' || key instanceof String) {\n this.authentications['apiKeyAuthScheme']['apiKey'] = key;\n } else {\n this.authentications['apiKeyAuthScheme']['apiKey'] = undefined;\n }\n }\n\n /*\n * Applies authentication headers to the request.\n * @param {Object} request The request object created by a <code>superagent()</code> call.\n * @param {Array.<String>} authNames An array of authentication method names.\n */\n\n addEtagToReservedMap(response, data) {\n if (response.hasOwnProperty(\"headers\") && response.headers.hasOwnProperty(\"etag\")) {\n let etagRef = response.headers.etag;\n if (data.getData() !== undefined) {\n if (Array.isArray(data.getData()) && data.getData().length > 0) {\n for (var item of data.getData()) {\n if (item.hasOwnProperty(\"$reserved\") && item.get$Reserved() !== undefined) {\n item.get$Reserved()[\"ETag\"] = etagRef;\n }\n }\n } else if (data.getData().hasOwnProperty(\"$reserved\") && data.getData().get$Reserved() !== undefined) {\n data.getData().get$Reserved()[\"ETag\"] = etagRef;\n }\n }\n }\n return data;\n }\n\n /**\n * Get ETag from an object if exists.\n * The ETag is usually provided in the response of the GET API calls,\n * which can further be used in other HTTP operations.\n *\n * @param object Object from which ETag needs to be retrieved\n * @returns {(String|null)} returns ETag header in the object if it's an API response object, otherwise null\n */\n static getEtag(object) {\n let etag = null;\n if (object !== undefined) {\n if (object.hasOwnProperty('$reserved') && object.get$Reserved() !== undefined) {\n etag = this.getValueForCaseInsensitiveKeyMatch(object.get$Reserved(), 'ETag');\n }\n if (etag == null && object.hasOwnProperty(\"data\") && object.getData().hasOwnProperty('$reserved') && object.getData().get$Reserved() !== undefined) {\n etag = this.getValueForCaseInsensitiveKeyMatch(object.getData().get$Reserved(), 'ETag');\n }\n }\n return etag;\n }\n static getValueForCaseInsensitiveKeyMatch(object, key) {\n if (object && key) {\n const searchKey = key.toLowerCase();\n const matchedKey = Object.keys(object).find(key => key.toLowerCase() === searchKey);\n return matchedKey ? object[matchedKey] : null;\n }\n return null;\n }\n\n /**\n * Get SDK's negotiated version.\n * @returns {String} negotiated version.\n */\n getNegotiatedVersion() {\n return _classPrivateFieldGet(_negotiatedVersion, this);\n }\n /**\n * Call relevant options api and negotiate version\n * Negotiated version available via getNegotiatedVersion()\n * @param {ApiClient} selfInstance\n * @param {Array.<String>} authNames An array of allowed authentication type names i.e. basicAuthScheme\n * @returns {Promise<ApiClient>} a {@link https://www.promisejs.org/|Promise}\n */\n negotiateVersion(selfInstance, authNames) {\n return new Promise(resolve => {\n if (this.allowVersionNegotiation === true && _classPrivateFieldGet(_negotiationCompleted, this) === false) {\n this.callApiInternal('/api/objects/unversioned/info', 'OPTIONS', {}, {}, {}, {}, null, authNames, [], ['application/json'], Object).then(({\n data,\n response\n }) => {\n if (response.status === 200 && data.hasOwnProperty(\"data\") && data.data !== null) {\n const serverVersion = data.data;\n const minimumSupportedVersion = \"v4.0\";\n\n // Check if server version is below minimum supported version\n if (_assertClassBrand(_ApiClient_brand, this, _isSmallerMinorVersion).call(this, _assertClassBrand(_ApiClient_brand, this, _getVersionDetails).call(this, serverVersion), _assertClassBrand(_ApiClient_brand, this, _getVersionDetails).call(this, minimumSupportedVersion))) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).WARN, null, \"Server version\", serverVersion, \"is below minimum supported version\", minimumSupportedVersion, \". Version negotiation will not be performed.\");\n _classPrivateFieldSet(_negotiatedVersion, this, null);\n _classPrivateFieldSet(_negotiationCompleted, this, false);\n resolve(selfInstance);\n return;\n }\n _classPrivateFieldSet(_negotiatedVersion, this, _assertClassBrand(_ApiClient_brand, this, _performNegotiationBetweenVersions).call(this, \"v4.0\", serverVersion));\n _classPrivateFieldSet(_negotiationCompleted, this, true);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Negotiated Version with server :\", _classPrivateFieldGet(_negotiatedVersion, this));\n resolve(selfInstance);\n } else {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Could not fetch supported versions from server\");\n _classPrivateFieldSet(_negotiatedVersion, this, null);\n _classPrivateFieldSet(_negotiationCompleted, this, false);\n resolve(selfInstance);\n }\n }).catch(error => {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Could not fetch supported versions from server\");\n _classPrivateFieldSet(_negotiatedVersion, this, null);\n _classPrivateFieldSet(_negotiationCompleted, this, false);\n resolve(selfInstance);\n });\n } else {\n resolve(selfInstance);\n }\n });\n }\n\n // Gets a valid timeout\n // 1. Sets to provided default timeout in case invalid value is passed\n // 2. Sets to default max value of 30 minutes in case a value of more than 30 minutes is passed\n\n /**\n * Invokes the REST service using the supplied settings and parameters.\n * @param {String} path The base URL to invoke.\n * @param {String} httpMethod The HTTP method to use.\n * @param {Object.<String, String>} pathParams A map of path parameters and their values.\n * @param {Object.<String, Object>} queryParams A map of query parameters and their values.\n * @param {Object.<String, Object>} headerParams A map of header parameters and their values.\n * @param {Object.<String, Object>} formParams A map of form parameters and their values.\n * @param {Object} bodyParam The value to pass as the request body.\n * @param {Array.<String>} authNames An array of authentication type names.\n * @param {Array.<String>} contentTypes An array of request MIME types.\n * @param {Array.<String>} accepts An array of acceptable response MIME types.\n * @param {(String|Array|Object|Function)} returnType The required type to return; can be a string for simple types or the\n * constructor for a complex type.\n * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.\n */\n callApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType) {\n return this.negotiateVersion(this, authNames).then(function (selfInstance) {\n return selfInstance.callApiInternal(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType);\n });\n }\n callApiInternal(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType) {\n var url = this.buildUrl(path, pathParams);\n const isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n let binaryMediaTypes = ['application/octet-stream', 'application/pdf', 'application/zip'];\n if (accepts && accepts.length > 0 && accepts.some(accept => binaryMediaTypes.includes(accept)) && isBrowser && this.downloadDestination) {\n return new Promise((resolve, reject) => {\n // Prepare request for browser download\n const fetchParams = _assertClassBrand(_ApiClient_brand, this, _prepareDownloadBrowserParams).call(this, url, httpMethod, queryParams, headerParams, bodyParam, authNames, contentTypes, accepts);\n fetch(fetchParams.url, fetchParams.options).then(response => {\n if (!response.ok) {\n const err = new Error(`HTTP error ${response.status}`);\n err.status = response.status;\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Error downloading file:\", err);\n reject(err);\n }\n if (!(this.downloadDestination instanceof WritableStream)) {\n let errMsg = \"Incompatible downloadDestination for Browser Environment, must be WritableStream\";\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, errMsg);\n reject(errMsg);\n }\n const reader = response.body.getReader();\n const writer = this.downloadDestination.getWriter();\n const pump = () => {\n return reader.read().then(({\n done,\n value\n }) => {\n if (done) {\n writer.close();\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Finished streaming response\");\n resolve({\n data: {},\n response\n });\n }\n return writer.write(value).then(pump);\n });\n };\n return pump();\n }).catch(error => {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Caught the following error :\", error);\n reject(error);\n });\n });\n }\n var request = superagent__WEBPACK_IMPORTED_MODULE_0___default()(httpMethod, url);\n\n // override request callback to retry only required status codes\n request.oldCallback = request.callback;\n request.callback = function (err, res) {\n if (res && res.status) {\n const status = res.status;\n if (status >= 400 && !(status === 408 || status === 429 || status === 503 || status === 504)) {\n this._maxRetries = 0;\n }\n if (res.status === 401 && this.header[\"Cookie\"]) {\n this.unset(\"Cookie\");\n this._maxRetries = 1;\n }\n if (status === 429) {\n let retryAfter = res.headers['retry-after'];\n if (retryAfter) {\n let delay = parseInt(retryAfter, 10) * 1000;\n this._retryDelays[this._retries] = delay;\n }\n }\n }\n this.oldCallback(err, res);\n };\n\n // apply authentications\n _assertClassBrand(_ApiClient_brand, this, _applyAuthToRequest).call(this, request, authNames);\n\n // set query parameters\n if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {\n queryParams['_'] = new Date().getTime();\n }\n request.query(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, queryParams));\n\n // set header parameters\n request.set(this.defaultHeaders).set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, headerParams));\n if ((this.defaultHeaders['NTNX-Request-Id'] === null || this.defaultHeaders['NTNX-Request-Id'] === undefined) && (headerParams['NTNX-Request-Id'] === null || headerParams['NTNX-Request-Id'] === undefined)) {\n let requestId = (0,uuid__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n request.set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, {\n 'NTNX-Request-Id': requestId\n }));\n }\n\n // Set User-Agent header only if it is not a browser environment\n if (!isBrowser) {\n this.downloadDestination = '.';\n request.set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, {\n 'User-Agent': 'Nutanix-objects-js-client/4.0.2'\n }));\n }\n\n // set requestAgent if it is set by user\n if (this.requestAgent) {\n request.agent(this.requestAgent);\n }\n\n // set request timeouts\n var timeoutOptions = {};\n timeoutOptions[\"response\"] = _assertClassBrand(_ApiClient_brand, this, _getValidTimeout).call(this, this.connectTimeout, _classPrivateFieldGet(_defaultConnectTimeout, this));\n timeoutOptions[\"deadline\"] = _assertClassBrand(_ApiClient_brand, this, _getValidTimeout).call(this, this.readTimeout, _classPrivateFieldGet(_defaultReadTimeout, this));\n request.timeout(timeoutOptions);\n var contentType = headerParams.hasOwnProperty(\"Content-Type\") ? headerParams[\"Content-Type\"] : _assertClassBrand(_ApiClient_brand, this, _jsonPreferredMime).call(this, contentTypes);\n if (contentType) {\n // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)\n if (contentType != 'multipart/form-data') {\n request.type(contentType);\n }\n } else if (!request.header['Content-Type']) {\n request.type('application/json');\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Request URL :\", httpMethod, url);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, _assertClassBrand(_ApiClient_brand, this, _flatten), \"Request Headers :\", typeof request.header === \"undefined\" ? \"\" : request.header);\n if (contentType === 'application/x-www-form-urlencoded') {\n request.send(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, formParams));\n } else if (contentType == 'multipart/form-data') {\n var _formParams = _assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, formParams);\n for (var key in _formParams) {\n if (_formParams.hasOwnProperty(key)) {\n if (_assertClassBrand(_ApiClient_brand, this, _isFileParam).call(this, _formParams[key])) {\n // file field\n request.attach(key, _formParams[key]);\n } else {\n request.field(key, _formParams[key]);\n }\n }\n }\n } else if (contentType === 'application/octet-stream' && bodyParam !== null && typeof bodyParam !== 'undefined' && typeof bodyParam.pipe === 'function') {\n // FILE UPLOAD SUPPORT\n\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Piping octet-stream request\");\n if (typeof bodyParam.pipe === 'function') {\n bodyParam.pipe(request);\n } else if (true) {\n let webstream;\n try {\n webstream = __webpack_require__(/*! stream/web */ \"?fdee\");\n } catch (err) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Error fetching steam/web\");\n }\n if (bodyParam instanceof webstream.ReadableStream) {\n bodyParam.pipeTo(new webstream.WritableStream({\n write(chunk) {\n request.write(chunk);\n },\n close() {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"READABLE STREAM CLOSED\");\n },\n abort(err) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"READABLE STREAM ABORTED\");\n }\n }));\n } else {\n request.send(bodyParam);\n }\n } else // removed by dead control flow\n{}\n return new Promise((resolve, reject) => {\n request.on('error', err => {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Caught the following error :\", err);\n reject(err);\n }).on('response', response => {\n _assertClassBrand(_ApiClient_brand, this, _handleApiResponseForPromise).call(this, response, path, queryParams, returnType, resolve, reject);\n });\n });\n } else if (['POST', 'PUT', 'PATCH'].includes(httpMethod.toUpperCase()) && bodyParam) {\n request.send(bodyParam);\n }\n if (typeof returnType === 'Blob') {\n request.responseType('blob');\n } else if (returnType === 'String') {\n request.responseType('string');\n }\n _assertClassBrand(_ApiClient_brand, this, _attachCookies).call(this, request);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Request Body :\", typeof request._data === \"undefined\" ? \"\" : request._data);\n var accept = headerParams.hasOwnProperty(\"Accept\") && headerParams[\"Accept\"] != undefined ? headerParams[\"Accept\"] : accepts.join(', ');\n if (accept) {\n request.accept(accept);\n }\n return new Promise((resolve, reject) => {\n request.buffer(false).redirects(0).retry(this.maxRetryAttempts, this.retryInterval, []).withCredentials(this.withCredentials).on('error', err => {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Caught the following error :\", err);\n }).end((error, response) => {\n if (error) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Caught error during the request!\");\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, error);\n // Reset negotiation flags on 404 to allow future negotiation attempts\n if (error.status === 404) {\n _classPrivateFieldSet(_negotiationCompleted, this, false);\n _classPrivateFieldSet(_negotiatedVersion, this, null);\n }\n if (error.response !== null && typeof error.response !== 'undefined') {\n error.data = _assertClassBrand(_ApiClient_brand, this, _deserialize).call(this, error.response, returnType);\n } else {\n error.data = _assertClassBrand(_ApiClient_brand, this, _wrapErrorInResponse).call(this, error);\n }\n reject(error);\n } else {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Response Status :\", response.status);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, _assertClassBrand(_ApiClient_brand, this, _flatten), \"Response Headers :\", response.headers);\n let contentType = '';\n if (response.headers.hasOwnProperty('content-type')) {\n contentType = response.headers[\"content-type\"];\n }\n let fetchStream = binaryMediaTypes.includes(contentType);\n if (fetchStream) {\n /*\n * Browser environment :\n * Already handled\n * Node.js environment :\n * uses File System, downloadDestination expected to be a directory path, file is downloaded to this directory\n */\n if (!isBrowser) {\n /*\n * Non Browser environment :\n * - stream data to file\n * - fetch response headers and body (if exists)\n * - return in case of error or after stream finish\n *\n * NOTE :\n * superagent does not provide access to headers before pipe, therefore response is piped to\n * file with temporary name, which is renamed to proper filename after Content-Disposition header is available\n */\n\n let tempFilename = this.downloadDestination + '/downloaded_file_' + Date.now() + '.txt'; // temporary filename\n let stream = fs__WEBPACK_IMPORTED_MODULE_5___default().createWriteStream(tempFilename);\n _assertClassBrand(_ApiClient_brand, this, _processDownloadedFile).call(this, response, stream, tempFilename, resolve, reject, returnType);\n }\n } else if (response.status == 302) {\n /*\n * Handling 302 Redirects\n * - Reads X-Redirect-Token header from response and writes into Cookie header for redirected request\n */\n let tempFilename = this.downloadDestination + '/downloaded_file_' + Date.now() + '.txt'; // temporary filename\n let context = this;\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Redirecting to :\", response.headers.location);\n var redirectRequest = superagent__WEBPACK_IMPORTED_MODULE_0___default()(httpMethod, response.headers.location);\n redirectRequest.set(request.header);\n if (response.headers.hasOwnProperty(\"x-redirect-token\")) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Writing X-Redirect-Token into Cookie\");\n redirectRequest.set(\"Cookie\", response.headers[\"x-redirect-token\"]);\n }\n if (this.requestAgent) {\n redirectRequest.agent(this.requestAgent);\n }\n redirectRequest.redirects(0);\n redirectRequest.withCredentials(this.withCredentials);\n redirectRequest.buffer(false);\n let redirectedStream = fs__WEBPACK_IMPORTED_MODULE_5___default().createWriteStream(tempFilename);\n redirectRequest.pipe(redirectedStream);\n redirectRequest.on('response', function (redirectResponse) {\n _assertClassBrand(_ApiClient_brand, context, _log).call(context, _classPrivateFieldGet(_LOG_LEVEL, context).INFO, null, \"Received response after redirection :\", redirectResponse.status);\n _assertClassBrand(_ApiClient_brand, context, _processDownloadedFile).call(context, redirectResponse, redirectedStream, tempFilename, resolve, reject, returnType);\n });\n } else {\n _assertClassBrand(_ApiClient_brand, this, _handleApiResponseForPromise).call(this, response, path, queryParams, returnType, resolve, reject);\n }\n }\n });\n });\n }\n static addEtagReferenceToHeader(bodyParam, headerParams) {\n // set If-Match header from postBody $reserved map\n if (typeof bodyParam !== 'undefined' && bodyParam !== null) {\n if (bodyParam.hasOwnProperty('$reserved') && bodyParam.$reserved.hasOwnProperty('ETag')) {\n let eTagReference = bodyParam.$reserved['ETag'];\n if (typeof eTagReference !== 'undefined' && eTagReference !== null && eTagReference !== \"\") {\n headerParams['If-Match'] = eTagReference;\n }\n }\n }\n }\n\n /*\n * Parses an ISO-8601 string representation of a date value.\n * @param {String} str The date value as a string.\n * @returns {Date} The parsed date object.\n */\n static parseDate(str) {\n return new Date(str);\n }\n\n /*\n * Parses queryParams and path to find a given query param value\n * @param {String} path The path given to callApi method\n * @param {Object.<String, Object>} queryParams The queryParams given to callApi method\n * @param {String} param Parameter name to look for\n * @param {String} defaultValue The default value for the missing param if not present\n * @returns {String} The value of given parameter\n */\n static parseQueryParam(path, queryParams, param, defaultValue) {\n let value = null;\n if (typeof queryParams !== 'undefined' && queryParams.hasOwnProperty(param)) {\n value = queryParams[param];\n }\n if (value === null && (typeof path === 'string' || path instanceof String)) {\n const escapedParam = param.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n const regexResult = path.match(new RegExp(`${escapedParam}=([0-9]+)`));\n if (regexResult) {\n value = regexResult[1];\n }\n }\n if (value === null) {\n value = defaultValue;\n }\n return value;\n }\n\n /**\n * Converts a value to the specified type.\n * @param {(String|Object)} data The data to convert, as a string or object.\n * @param {(String|Array.<String>|Object.<String, Object>|Function)} type The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on <code>data<code> will be converted to this type.\n * @returns An instance of the specified type or null or undefined if data is null or undefined.\n */\n static convertToType(data, type) {\n if (data === null || data === undefined) return data;\n switch (type) {\n case 'Boolean':\n return Boolean(data);\n case 'Integer':\n return parseInt(data, 10);\n case 'Number':\n return parseFloat(data);\n case 'String':\n return String(data);\n case 'Date':\n return ApiClient.parseDate(String(data));\n case 'Blob':\n return data;\n default:\n if (type === Object) {\n // generic object, return directly\n return data;\n } else if (typeof type === 'function') {\n // for model type like: User\n return type.constructFromObject(data);\n } else if (Array.isArray(type)) {\n // for array type like: ['String']\n var itemType = type[0];\n return data.map(item => {\n return ApiClient.convertToType(item, itemType);\n });\n } else if (typeof type === 'object') {\n // for plain object type like: {'String': 'Integer'}\n var keyType, valueType;\n for (var k in type) {\n if (type.hasOwnProperty(k)) {\n keyType = k;\n valueType = type[k];\n break;\n }\n }\n var result = {};\n for (var k in data) {\n if (data.hasOwnProperty(k)) {\n var key = ApiClient.convertToType(k, keyType);\n var value = ApiClient.convertToType(data[k], valueType);\n result[key] = value;\n }\n }\n return result;\n } else {\n // for unknown type, return the data directly\n return data;\n }\n }\n }\n\n /**\n * Constructs a new map or array model from REST data.\n * @param data {Object|Array} The REST data.\n * @param obj {Object|Array} The target object or array.\n */\n static constructFromObject(data, obj, itemType) {\n if (Array.isArray(data)) {\n for (var i = 0; i < data.length; i++) {\n if (data.hasOwnProperty(i)) obj[i] = ApiClient.convertToType(data[i], itemType);\n }\n } else {\n for (var k in data) {\n if (data.hasOwnProperty(k)) obj[k] = ApiClient.convertToType(data[k], itemType);\n }\n }\n }\n}\n\n/**\n* The default API client implementation.\n* @type {ApiClient}\n* @memberOf ApiClient\n*/\n_ApiClient = ApiClient;\nfunction _isJsonMime(contentType) {\n return Boolean(contentType != null && contentType.match(/^application\\/json(;.*)?$/i));\n}\n/*\n* Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.\n* @param {Array.<String>} contentTypes\n* @returns {String} The chosen content type, preferring JSON.\n*/\nfunction _jsonPreferredMime(contentTypes) {\n for (var i = 0; i < contentTypes.length; i++) {\n if (_assertClassBrand(_ApiClient_brand, this, _isJsonMime).call(this, contentTypes[i])) {\n return contentTypes[i];\n }\n }\n return contentTypes[0];\n}\n/*\n* Checks whether the given parameter value represents file-like content.\n* @param param The parameter to check.\n* @returns {Boolean} <code>true</code> if <code>param</code> represents a file.\n*/\nfunction _isFileParam(param) {\n // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)\n if (true) {\n let fs;\n try {\n fs = __webpack_require__(/*! fs */ \"?e583\");\n } catch (err) {}\n if (fs && fs.ReadStream && param instanceof fs.ReadStream) {\n return true;\n }\n }\n\n // Buffer in Node.js\n if (typeof Buffer === 'function' && param instanceof Buffer) {\n return true;\n }\n\n // Blob in browser\n if (typeof buffer__WEBPACK_IMPORTED_MODULE_7__.Blob === 'function' && param instanceof buffer__WEBPACK_IMPORTED_MODULE_7__.Blob) {\n return true;\n }\n\n // File in browser (it seems File object is also instance of Blob, but keep this for safe)\n if (typeof File === 'function' && param instanceof File) {\n return true;\n }\n return false;\n}\n/*\n* Normalizes parameter values:\n* <ul>\n* <li>remove nils</li>\n* <li>keep files and arrays</li>\n* <li>format to string with `paramToString` for other cases</li>\n* </ul>\n* @param {Object.<String, Object>} params The parameters as object properties.\n* @returns {Object.<String, Object>} normalized parameters.\n*/\nfunction _normalizeParams(params) {\n var newParams = {};\n for (var key in params) {\n if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {\n var value = params[key];\n if (_assertClassBrand(_ApiClient_brand, this, _isFileParam).call(this, value) || Array.isArray(value)) {\n newParams[key] = value;\n } else {\n newParams[key] = this.paramToString(value);\n }\n }\n }\n return newParams;\n}\nfunction _applyAuthToRequest(request, authNames) {\n authNames.forEach(authName => {\n var auth = this.authentications[authName];\n switch (auth.type) {\n case 'basic':\n if (auth.username || auth.password) {\n request.auth(auth.username || '', auth.password || '');\n } else if (this.username || this.password) {\n request.auth(this.username || '', this.password || '');\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Basic Auth applied to request\");\n break;\n case 'apiKey':\n if (auth.apiKey) {\n var data = {};\n if (auth.apiKeyPrefix) {\n data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;\n } else {\n data[auth.name] = auth.apiKey;\n }\n if (auth['in'] === 'header') {\n request.set(data);\n } else {\n request.query(data);\n }\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"apiKey applied to request\");\n break;\n case 'oauth2':\n if (auth.accessToken) {\n request.set({\n 'Authorization': 'Bearer ' + auth.accessToken\n });\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"oauth2 applied to request\");\n break;\n default:\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Unknown authentication type:\", auth.type);\n throw new Error('Unknown authentication type: ' + auth.type);\n }\n });\n}\n/**\n* Wraps errors in generic response format.\n* @param {Object} error object encountered during request.\n* @returns an error object with wrapped response within error.data .\n*/\nfunction _wrapErrorInResponse(error) {\n var response = {\n data: {},\n metadata: {}\n };\n response.data.status = error.status;\n response.data.message = error.message;\n}\n/**\n* Deserializes an HTTP response body into a value of the specified type.\n* @param {Object} response A SuperAgent response object.\n* @param {(String|Array.<String>|Object.<String, Object>|Function)} returnType The type to return. Pass a string for simple types\n* or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n* return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n* all properties on <code>data<code> will be converted to this type.\n* @returns A value of the specified type.\n*/\nfunction _deserialize(response, returnType) {\n if (response == null || returnType == null || response.status == 204) {\n return null;\n }\n\n // Handle text response\n if (response.headers && ['text/event-stream', 'text/html', 'text/xml', 'text/csv', 'text/javascript', 'text/markdown', 'text/vcard'].includes(response.headers['content-type'])) {\n var data = new returnType();\n data.data = new buffer__WEBPACK_IMPORTED_MODULE_7__.Blob([response.text], {\n type: response.headers['content-type']\n });\n let flag = new _models_common_v1_config_Flag__WEBPACK_IMPORTED_MODULE_9__[\"default\"]();\n flag.name = \"hasError\";\n flag.value = false;\n let flags = [flag];\n let metadata = new _models_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_8__[\"default\"]();\n metadata.flags = flags;\n data.metadata = metadata;\n return data;\n }\n\n // Rely on SuperAgent for parsing response body.\n // See http://visionmedia.github.io/superagent/#parsing-response-bodies\n var data = response.body;\n if (data == null || typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length) {\n // SuperAgent does not always produce a body; use the unparsed response as a fallback\n data = response.text;\n }\n return _ApiClient.convertToType(data, returnType);\n}\n/**\n* Set pagination data if response is a Paginable object\n* @param {Object} data The response data already passed through deserialize\n* @param {String} path The path given to callApi method\n* @param {Object.<String, Object>} queryParams The queryParams given to callApi method\n*/\nfunction _paginateIfNeeded(data, path, queryParams) {\n // If response is not a Paginable instance, nothing to do\n if (!(data instanceof _Paginable__WEBPACK_IMPORTED_MODULE_1__[\"default\"])) {\n return;\n }\n // Retrieve current page number, defaults to 0\n const page = parseInt(this.constructor.parseQueryParam(path, queryParams, '$page', \"0\"), 10);\n // Retrieve current limit (results per page) number, defaults to 50\n const resultsPerPage = parseInt(this.constructor.parseQueryParam(path, queryParams, '$limit', \"50\"), 10);\n\n // Populate pagination data\n data.populatePaginationMetadata(this,\n // current ApiClient instance\n page, resultsPerPage);\n}\nfunction _performNegotiationBetweenVersions(sdk, server) {\n if (!sdk || !server) {\n return sdk;\n }\n let sdkProps = _assertClassBrand(_ApiClient_brand, this, _getVersionDetails).call(this, sdk);\n let serverProps = _assertClassBrand(_ApiClient_brand, this, _getVersionDetails).call(this, server);\n // if major version is different, then do not negotiate\n // maintain sdk version\n if (!sdkProps[\"family\"] === serverProps[\"family\"]) {\n return sdk;\n }\n // if sdk version is smaller than highest server version, then maintain sdk version\n if (_assertClassBrand(_ApiClient_brand, this, _isSmallerMinorVersion).call(this, sdkProps, serverProps)) {\n return sdk;\n }\n // since sdk version is higher than highest server version, use server version\n return server;\n}\nfunction _isSmallerMinorVersion(p1, p2) {\n // if revision different, then compare revision\n if (parseInt(p1[\"revision\"]) != parseInt(p2[\"revision\"])) {\n return parseInt(p1[\"revision\"]) < parseInt(p2[\"revision\"]);\n }\n // revision is same, so compare version_type (release_type + release_type_revision)\n if (p1[\"versionType\"] === \"released\") {\n return false;\n }\n let p1ReleaseType = p1[\"versionType\"].substring(0, 1);\n let p2ReleaseType = p2[\"versionType\"].substring(0, 1);\n let p1ReleaseTypeRevision = parseInt(p1[\"versionType\"].substring(1));\n let p2ReleaseTypeRevision = p2[\"versionType\"] === \"released\" ? 0 : parseInt(p2[\"versionType\"].substring(1));\n if (p1ReleaseType === p2ReleaseType) {\n // release type is same, so compare release type revision\n return p1ReleaseTypeRevision < p2ReleaseTypeRevision;\n }\n // release type is different, so alpha must be smallest and released must be largest\n return p1ReleaseType === \"a\" || p2[\"versionType\"] === \"released\";\n}\nfunction _getVersionDetails(version) {\n let ret = {};\n if (\"unversioned\" === version) {\n ret[\"family\"] = \"unversioned\";\n ret[\"versionType\"] = \"released\";\n } else {\n let versionParts = version.toString().split('.');\n if (\"unversioned\" === versionParts[0]) {\n ret[\"family\"] = \"unversioned\";\n ret[\"versionType\"] = versionParts[1];\n } else {\n ret[\"family\"] = versionParts[0].substring(1);\n ret[\"revision\"] = versionParts[1];\n if (versionParts.length == 2) {\n ret[\"versionType\"] = \"released\";\n } else {\n ret[\"versionType\"] = versionParts[2];\n }\n }\n }\n return ret;\n}\nfunction _getValidTimeout(timeout, defaultTimeout) {\n if (timeout <= 0) {\n timeout = defaultTimeout;\n } else if (timeout > _classPrivateFieldGet(_defaultMaxTimeout, this)) {\n timeout = _classPrivateFieldGet(_defaultMaxTimeout, this);\n }\n return timeout;\n}\n// If enabled, update cookie information to reuse in subsequent requests for a valid response\nfunction _updateCookies(response) {\n if (response.hasOwnProperty(\"headers\") && response.headers.hasOwnProperty(\"set-cookie\")) {\n let finalCookie = \"\";\n let cookieList = response.headers[\"set-cookie\"];\n if (cookieList.length > 0) {\n // add all cookies separated by ;\n for (let cookieItem of cookieList) {\n cookieItem = cookieItem.split(\";\")[0];\n if (cookieItem.includes(\"=\")) {\n cookieItem.trim();\n finalCookie = finalCookie.concat(cookieItem).concat(\";\");\n }\n }\n // remove trailing ;\n if (finalCookie !== \"\") {\n finalCookie = finalCookie.substr(0, finalCookie.length - 1);\n }\n }\n _classPrivateFieldSet(_cookie, this, finalCookie);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Retained cookie :\", finalCookie);\n } else {\n _classPrivateFieldSet(_cookie, this, null);\n }\n}\n// If enabled, attach saved cookies to request\nfunction _attachCookies(request) {\n if (_classPrivateFieldGet(_cookie, this) != null) {\n request.set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, {\n 'Cookie': _classPrivateFieldGet(_cookie, this)\n }));\n }\n}\nfunction _log(level, mapper, ...messages) {\n // Set default log level to INFO\n if (typeof level !== \"object\" || !(\"key\" in level) || !(\"value\" in level) || typeof level[\"value\"] !== \"symbol\") {\n level = _classPrivateFieldGet(_LOG_LEVEL, this).INFO;\n }\n if (!_assertClassBrand(_ApiClient_brand, this, _skipLogging).call(this, level)) {\n // Preprocess message to prefix with timestamp and log level\n messages = messages.map(message => {\n return typeof message === \"string\" ? message : mapper ? mapper(message) : JSON.stringify(message);\n });\n let message = messages.join(' ');\n message = new Date().toISOString() + ' ' + level.key + ' - ' + message;\n if (typeof _classPrivateFieldGet(_logger, this) !== \"undefined\" && _classPrivateFieldGet(_logger, this) !== null && typeof _classPrivateFieldGet(_logger, this).log === 'function') {\n _classPrivateFieldGet(_logger, this).log(message);\n } else {\n console.log(message);\n }\n }\n}\nfunction _skipLogging(level) {\n // Skip logging if log level is DEBUG but debug is not enabled.\n return !this.debug && level === _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG;\n}\n// A mapper function to flatten a simple non-nested (key:value) object to string\nfunction _flatten(obj) {\n if (typeof obj !== \"object\") {\n return obj;\n }\n let output = '\\n';\n if (obj) {\n Object.keys(obj).forEach(e => {\n output += e + '=[' + obj[e] + ']\\n';\n });\n }\n return output === '\\n' ? obj : output;\n}\n// handle and deserialize received response\nfunction _handleApiResponseForPromise(response, path, queryParams, returnType, resolve, reject) {\n try {\n var data = _assertClassBrand(_ApiClient_brand, this, _deserialize).call(this, response, returnType);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Response Status :\", response.status);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, _assertClassBrand(_ApiClient_brand, this, _flatten), \"Response Headers :\", response.headers);\n _assertClassBrand(_ApiClient_brand, this, _updateCookies).call(this, response || {});\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Response Body :\", data);\n if (response.status == 204 && data == null) {\n resolve({\n data,\n response\n });\n } else if (response.ok && data != null) {\n this.addEtagToReservedMap(response, data);\n _assertClassBrand(_ApiClient_brand, this, _paginateIfNeeded).call(this, data, path, queryParams);\n resolve({\n data,\n response\n });\n } else {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, data);\n reject({\n ...response.error,\n data: data\n });\n }\n } catch (err) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Caught error while processing response!\");\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, err);\n err.data = _assertClassBrand(_ApiClient_brand, this, _wrapErrorInResponse).call(this, err);\n reject(err);\n }\n}\nfunction _prepareDownloadBrowserParams(url, httpMethod, queryParams, headerParams, bodyParam, authNames, contentTypes, accepts) {\n let authHeaders = {};\n\n // Apply authentication logic\n authNames.forEach(authName => {\n const auth = this.authentications[authName];\n switch (auth.type) {\n case 'basic':\n let username = '';\n let password = '';\n if (auth.username || auth.password) {\n username = auth.username || '';\n password = auth.password || '';\n } else if (this.username || this.password) {\n username = this.username || '';\n password = this.password || '';\n }\n if (username || password) {\n const credentials = btoa(`${username}:${password}`);\n authHeaders['Authorization'] = `Basic ${credentials}`;\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Basic Auth applied to request\");\n break;\n case 'apiKey':\n if (auth.apiKey) {\n let apiKeyValue = '';\n if (auth.apiKeyPrefix) {\n apiKeyValue = auth.apiKeyPrefix + ' ' + auth.apiKey;\n } else {\n apiKeyValue = auth.apiKey;\n }\n if (auth['in'] === 'header') {\n authHeaders[auth.name] = 'Bearer ' + apiKeyValue;\n } else if (auth['in'] === 'query') {\n queryParams[auth.name] = apiKeyValue;\n }\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"apiKey applied to request\");\n break;\n case 'oauth2':\n if (auth.accessToken) {\n authHeaders['Authorization'] = 'Bearer ' + auth.accessToken;\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"oauth2 applied to request\");\n break;\n default:\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Unknown authentication type:\", auth.type);\n throw new Error('Unknown authentication type: ' + auth.type);\n }\n });\n\n // set query parameters\n if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {\n queryParams['cache'] = 'false';\n }\n\n // Build URL with query parameters\n const normalizedParams = _assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, queryParams);\n const queryString = Object.keys(normalizedParams).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(normalizedParams[key])}`).join('&');\n let finalUrl = url;\n if (queryString) {\n finalUrl += (finalUrl.includes('?') ? '&' : '?') + queryString;\n }\n const finalHeaders = {\n ...this.defaultHeaders,\n ..._assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, headerParams),\n ...authHeaders\n };\n\n // set header parameters\n if ((this.defaultHeaders['NTNX-Request-Id'] === null || this.defaultHeaders['NTNX-Request-Id'] === undefined) && (headerParams['NTNX-Request-Id'] === null || headerParams['NTNX-Request-Id'] === undefined)) {\n let requestId = (0,uuid__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n finalHeaders['NTNX-Request-Id'] = requestId;\n }\n\n //Add cookies if they exist\n if (_classPrivateFieldGet(_cookie, this) != null) {\n finalHeaders['Cookie'] = _assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, {\n 'Cookie': _classPrivateFieldGet(_cookie, this)\n });\n }\n\n // Set content type\n var contentType = headerParams.hasOwnProperty(\"Content-Type\") ? headerParams[\"Content-Type\"] : _assertClassBrand(_ApiClient_brand, this, _jsonPreferredMime).call(this, contentTypes);\n finalHeaders['Content-Type'] = contentType;\n\n // Set Accept Header\n var accept = headerParams.hasOwnProperty(\"Accept\") && headerParams[\"Accept\"] != undefined ? headerParams[\"Accept\"] : accepts.join(', ');\n if (accept) {\n finalHeaders['Accept'] = accept;\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Request URL :\", httpMethod, url);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, _assertClassBrand(_ApiClient_brand, this, _flatten), \"Request Headers :\", finalHeaders);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Request Body :\", bodyParam || \"\");\n return {\n url: finalUrl,\n options: {\n method: httpMethod,\n headers: finalHeaders,\n body: bodyParam,\n credentials: this.withCredentials ? 'include' : 'same-origin'\n }\n };\n}\nfunction _processDownloadedFile(response, stream, tempFilename, resolve, reject, returnType) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Streaming response to : \", tempFilename);\n try {\n response.on('data', chunk => {\n stream.write(chunk);\n });\n } catch (err) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Issue while downloading file\", err);\n }\n let data = new returnType();\n // Fetch filename\n let filename = \"\";\n if (typeof response.headers['content-disposition'] !== 'undefined' && response.headers['content-disposition'] !== null) {\n let match = response.headers['content-disposition'].match(/.*filename=\\\"(?<filename>.*)\\\".*/);\n let filepath = path__WEBPACK_IMPORTED_MODULE_6___default().parse(match.groups['filename']);\n filename = this.downloadDestination + '/' + filepath.name + '_' + Date.now() + filepath.ext;\n data.data = {\n \"path\": path__WEBPACK_IMPORTED_MODULE_6___default().parse(filename),\n $objectType: \"Path\"\n };\n let flag = new _models_common_v1_config_Flag__WEBPACK_IMPORTED_MODULE_9__[\"default\"]();\n flag.name = \"hasError\";\n flag.value = false;\n let flags = [flag];\n let metadata = new _models_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_8__[\"default\"]();\n metadata.flags = flags;\n data.metadata = metadata;\n }\n response.on('end', () => {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Finished streaming response\");\n if (filename.length !== 0) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Content-Disposition header found [\", filename, \"] is final filename\");\n stream.close();\n fs__WEBPACK_IMPORTED_MODULE_5___default().renameSync(tempFilename, filename);\n resolve({\n data,\n response\n });\n } else {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Content-Disposition header not found [\", tempFilename, \"] is final filename\");\n resolve({\n data,\n response\n });\n }\n });\n response.on('error', err => {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Caught the following error :\", err);\n error.data = _assertClassBrand(_ApiClient_brand, this, _wrapErrorInResponse).call(this, error);\n reject(err);\n });\n}\nApiClient.instance = new ApiClient();\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/ApiClient.js?\n}");
|
|
221
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ApiClient: () => (/* binding */ ApiClient)\n/* harmony export */ });\n/* harmony import */ var superagent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! superagent */ \"./node_modules/superagent/lib/client.js\");\n/* harmony import */ var superagent__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(superagent__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\n/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uuid */ \"./node_modules/uuid/dist/esm-browser/v4.js\");\n/* harmony import */ var superagent_retry_delay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! superagent-retry-delay */ \"./node_modules/superagent-retry-delay/src/index.js\");\n/* harmony import */ var superagent_retry_delay__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(superagent_retry_delay__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! https */ \"?aee4\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(https__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! fs */ \"?e583\");\n/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! path */ \"./node_modules/path/path.js\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var buffer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! buffer */ \"?bdc3\");\n/* harmony import */ var buffer__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(buffer__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _models_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./models/common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _models_common_v1_config_Flag__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./models/common/v1/config/Flag */ \"./target/generated-sources/swagger/src/models/common/v1/config/Flag.js\");\nvar _ApiClient;\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }\nfunction _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\nsuperagent_retry_delay__WEBPACK_IMPORTED_MODULE_3___default()((superagent__WEBPACK_IMPORTED_MODULE_0___default()));\n\n\n\n\n\n\n\n/**\n* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an\n* application to use this class directly - the *Api and model classes provide the public API for the service. The\n* contents of this file should be regarded as internal but are documented for completeness.\n* @module ApiClient\n* @version 4.0.3\n*/\nvar _protocol = /*#__PURE__*/new WeakMap();\nvar _cookie = /*#__PURE__*/new WeakMap();\nvar _logger = /*#__PURE__*/new WeakMap();\nvar _verifySslFlag = /*#__PURE__*/new WeakMap();\nvar _defaultConnectTimeout = /*#__PURE__*/new WeakMap();\nvar _defaultReadTimeout = /*#__PURE__*/new WeakMap();\nvar _defaultMaxTimeout = /*#__PURE__*/new WeakMap();\nvar _host = /*#__PURE__*/new WeakMap();\nvar _negotiationCompleted = /*#__PURE__*/new WeakMap();\nvar _negotiatedVersion = /*#__PURE__*/new WeakMap();\nvar _LOG_LEVEL = /*#__PURE__*/new WeakMap();\nvar _ApiClient_brand = /*#__PURE__*/new WeakSet();\nclass ApiClient {\n /**\n * @alias module:ApiClient\n * @class\n */\n constructor() {\n /*\n * Checks whether the given content type represents JSON.<br>\n * JSON content type examples:<br>\n * <ul>\n * <li>application/json</li>\n * <li>application/json; charset=UTF8</li>\n * <li>APPLICATION/JSON</li>\n * </ul>\n * @param {String} contentType The MIME content type to check.\n * @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.\n */\n _classPrivateMethodInitSpec(this, _ApiClient_brand);\n // PRIVATE VARIABLES\n _classPrivateFieldInitSpec(this, _protocol, void 0);\n _classPrivateFieldInitSpec(this, _cookie, void 0);\n _classPrivateFieldInitSpec(this, _logger, void 0);\n _classPrivateFieldInitSpec(this, _verifySslFlag, void 0);\n _classPrivateFieldInitSpec(this, _defaultConnectTimeout, void 0);\n _classPrivateFieldInitSpec(this, _defaultReadTimeout, void 0);\n _classPrivateFieldInitSpec(this, _defaultMaxTimeout, void 0);\n _classPrivateFieldInitSpec(this, _host, void 0);\n _classPrivateFieldInitSpec(this, _negotiationCompleted, void 0);\n _classPrivateFieldInitSpec(this, _negotiatedVersion, void 0);\n _classPrivateFieldInitSpec(this, _LOG_LEVEL, void 0);\n _classPrivateFieldSet(_LOG_LEVEL, this, Object.freeze({\n DEBUG: {\n key: \"DEBUG\",\n value: Symbol(0)\n },\n INFO: {\n key: \"INFO\",\n value: Symbol(1)\n },\n WARN: {\n key: \"WARN\",\n value: Symbol(2)\n },\n ERROR: {\n key: \"ERROR\",\n value: Symbol(3)\n }\n }));\n\n /**\n * URI scheme for connecting to the cluster (HTTP or HTTPS using SSL/TLS)\n * @type {String}\n * @default https\n */\n this.scheme = 'https';\n\n /**\n * The hostname of the URL against which to resolve every API call's (relative) path.\n * @type {String}\n * @default localhost\n */\n _classPrivateFieldSet(_host, this, typeof self === 'undefined' ? 'localhost' : self.location.hostname);\n\n /**\n * The port of the base URL.\n * @type {String}\n * @default 9440\n */\n this.port = typeof self === 'undefined' ? '9440' : self.location.port;\n\n /**\n * The authentication methods to be included for all API calls.\n * @type {Array.<String>}\n */\n this.authentications = {\n 'apiKeyAuthScheme': {\n type: 'apiKey',\n 'in': 'header',\n name: 'X-ntnx-api-key'\n },\n 'basicAuthScheme': {\n type: 'basic'\n }\n };\n\n /**\n * The default HTTP headers to be included for all API calls.\n * @type {Array.<String>}\n * @default {}\n */\n this.defaultHeaders = {};\n _classPrivateFieldSet(_defaultConnectTimeout, this, 30000);\n _classPrivateFieldSet(_defaultReadTimeout, this, 30000);\n _classPrivateFieldSet(_defaultMaxTimeout, this, 10800000);\n\n /**\n * The default HTTP read timeout in milliseconds for all API calls.\n * @type {Number}\n * @default 30000\n */\n this.readTimeout = _classPrivateFieldGet(_defaultReadTimeout, this);\n\n /**\n * The default HTTP connection timeout in milliseconds for all API calls.\n * @type {Number}\n * @default 30000\n */\n this.connectTimeout = _classPrivateFieldGet(_defaultConnectTimeout, this);\n\n /**\n * If set to false an additional timestamp parameter is added to all API GET calls to\n * prevent browser caching\n * @type {Boolean}\n * @default true\n */\n this.cache = true;\n\n /**\n * Saved Cookies\n * @default null\n */\n _classPrivateFieldSet(_cookie, this, null);\n\n /**\n * The maximum number of redirects to be followed for all API calls.\n * @type {Number}\n * @default 1\n */\n this.maxRedirects = 1;\n\n /**\n * The maximum number of retry attempts to be made by the client\n * in case of server error.\n * @type {Number}\n * @default 5\n */\n this.maxRetryAttempts = 5;\n\n /**\n * The delay period (in milliseconds) between two consecutive retry attempts\n * @type {Number}\n * @default 3000\n */\n this.retryInterval = 3000;\n\n /**\n * A boolean value that indicates whether cross-site Access-Control requests should be made using auth credentials.\n * @type {Boolean}\n * @default false\n */\n this.withCredentials = false;\n if (typeof self === 'undefined') {\n this.agent = new (superagent__WEBPACK_IMPORTED_MODULE_0___default().agent)();\n }\n\n /**\n * Allow user to override superagent agent\n */\n this.requestAgent = null;\n _classPrivateFieldSet(_negotiatedVersion, this, null);\n\n /**\n * Allow SDK to fetch version info and negotiate version\n */\n this.allowVersionNegotiation = true;\n _classPrivateFieldSet(_negotiationCompleted, this, false);\n\n /**\n * Allow SDK to print debug logs\n */\n this.debug = false;\n _classPrivateFieldSet(_logger, this, null);\n\n /**\n * Username for basic auth\n */\n this.username = null;\n\n /**\n * Password for basic auth\n */\n this.password = null;\n _classPrivateFieldSet(_verifySslFlag, this, true);\n\n /*\n * Non Browser Environment : path to directory where downloaded files will be stored\n * Browser Environment : WritableStream to pipe downloaded file to\n */\n this.downloadDestination = null;\n\n /*\n * Log file to write activity logs\n */\n this.loggerFile = null;\n }\n\n /**\n * Enable/Disable SSL Verification\n * @param verifySsl (boolean)\n */\n set verifySsl(verifySsl) {\n this.requestAgent = verifySsl ? null : new (https__WEBPACK_IMPORTED_MODULE_4___default().Agent)({\n rejectUnauthorized: verifySsl\n });\n _classPrivateFieldSet(_verifySslFlag, this, verifySsl);\n }\n get verifySsl() {\n return _classPrivateFieldGet(_verifySslFlag, this);\n }\n\n /**\n * Set the hostname for base URL\n * @param {String} hostname the hostname\n */\n set host(hostname) {\n _classPrivateFieldSet(_host, this, hostname);\n // Reset negotiation flags when host changes\n _classPrivateFieldSet(_negotiationCompleted, this, false);\n _classPrivateFieldSet(_negotiatedVersion, this, null);\n }\n\n /**\n * Get the hostname for base URL\n * @returns {String} the hostname\n */\n get host() {\n return _classPrivateFieldGet(_host, this);\n }\n\n /**\n * Configure log file to write activity logs\n * @param logfile The destination file (write stream / string)\n */\n set loggerFile(logfile) {\n if (logfile !== null && typeof logfile !== 'undefined') {\n if (typeof logfile === 'string' || logfile instanceof String) {\n logfile = fs__WEBPACK_IMPORTED_MODULE_5___default().createWriteStream(logfile, {\n flags: 'a'\n });\n }\n _classPrivateFieldSet(_logger, this, new console.Console({\n stdout: logfile,\n stderr: logfile\n }));\n }\n }\n\n /**\n * Adds key value pair to default headers map, (to be added to every API call request)\n * @param {String} key The key\n * @param {String} value The corresponding value\n */\n addDefaultHeader(key, value) {\n if (key === \"Authorization\") {\n _classPrivateFieldSet(_cookie, this, null);\n }\n this.defaultHeaders[key] = value;\n }\n\n /*\n * Returns a string representation for an actual parameter.\n * @param param The actual parameter.\n * @returns {String} The string representation of <code>param</code>.\n */\n paramToString(param) {\n if (param == undefined || param == null) {\n return '';\n }\n if (param instanceof Date) {\n return param.toJSON();\n }\n return param.toString();\n }\n buildUrl(path, pathParams) {\n if (!path.match(/^\\//)) {\n path = '/' + path;\n }\n if (typeof _classPrivateFieldGet(_negotiatedVersion, this) !== 'undefined' && _classPrivateFieldGet(_negotiatedVersion, this) !== null && _classPrivateFieldGet(_negotiatedVersion, this).match(/v\\d+\\.\\d+(\\.[a|b]\\d+)?/) !== null && _classPrivateFieldGet(_negotiatedVersion, this) !== \"v4.0\") {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Changing uri\", path, \"to negotiated version\", _classPrivateFieldGet(_negotiatedVersion, this));\n var uriRegExp = new RegExp(\"(?<=/[-\\\\w]+/)v\\\\d+\\\\.\\\\d+(\\\\.[a|b]\\\\d+)?(?=/.*)\", \"i\");\n path = path.replace(uriRegExp, _classPrivateFieldGet(_negotiatedVersion, this));\n }\n\n // The protocol of the base URL, including the colon (:).\n _classPrivateFieldSet(_protocol, this, typeof self === 'undefined' ? this.scheme + ':' : self.location.protocol);\n let basePath = ''; //default\n if (_classPrivateFieldGet(_protocol, this) !== '' && this.host !== '' && this.port !== '') {\n basePath = _classPrivateFieldGet(_protocol, this) + '\\/\\/' + this.host + ':' + this.port;\n } else if (typeof self !== \"undefined\") {\n basePath = self.origin;\n }\n var url = basePath + path;\n url = url.replace(/\\{([\\w-]+)\\}/g, (fullMatch, key) => {\n var value;\n if (pathParams.hasOwnProperty(key)) {\n value = this.paramToString(pathParams[key]);\n } else {\n value = fullMatch;\n }\n return encodeURIComponent(value);\n });\n return url;\n }\n /*\n * Builds a string representation of an array-type actual parameter, according to the given collection format.\n * @param {Array} param An array parameter.\n * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.\n * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns\n * <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.\n */\n buildCollectionParam(param, collectionFormat) {\n if (param == null) {\n return null;\n }\n switch (collectionFormat) {\n case 'csv':\n return param.map(this.paramToString).join(',');\n case 'ssv':\n return param.map(this.paramToString).join(' ');\n case 'tsv':\n return param.map(this.paramToString).join('\\t');\n case 'pipes':\n return param.map(this.paramToString).join('|');\n case 'multi':\n //return the array directly as SuperAgent will handle it as expected\n return param.map(this.paramToString);\n default:\n throw new Error('Unknown collection format: ' + collectionFormat);\n }\n }\n\n /*\n * Sets API key for authentication\n *\n * @param {String} key The API key for authentication\n */\n setApiKey(key) {\n if (key == undefined || typeof key === 'string' || key instanceof String) {\n this.authentications['apiKeyAuthScheme']['apiKey'] = key;\n } else {\n this.authentications['apiKeyAuthScheme']['apiKey'] = undefined;\n }\n }\n\n /*\n * Applies authentication headers to the request.\n * @param {Object} request The request object created by a <code>superagent()</code> call.\n * @param {Array.<String>} authNames An array of authentication method names.\n */\n\n addEtagToReservedMap(response, data) {\n if (response.hasOwnProperty(\"headers\") && response.headers.hasOwnProperty(\"etag\")) {\n let etagRef = response.headers.etag;\n if (data.getData() !== undefined) {\n if (Array.isArray(data.getData()) && data.getData().length > 0) {\n for (var item of data.getData()) {\n if (item.hasOwnProperty(\"$reserved\") && item.get$Reserved() !== undefined) {\n item.get$Reserved()[\"ETag\"] = etagRef;\n }\n }\n } else if (data.getData().hasOwnProperty(\"$reserved\") && data.getData().get$Reserved() !== undefined) {\n data.getData().get$Reserved()[\"ETag\"] = etagRef;\n }\n }\n }\n return data;\n }\n\n /**\n * Get ETag from an object if exists.\n * The ETag is usually provided in the response of the GET API calls,\n * which can further be used in other HTTP operations.\n *\n * @param object Object from which ETag needs to be retrieved\n * @returns {(String|null)} returns ETag header in the object if it's an API response object, otherwise null\n */\n static getEtag(object) {\n let etag = null;\n if (object !== undefined) {\n if (object.hasOwnProperty('$reserved') && object.get$Reserved() !== undefined) {\n etag = this.getValueForCaseInsensitiveKeyMatch(object.get$Reserved(), 'ETag');\n }\n if (etag == null && object.hasOwnProperty(\"data\") && object.getData().hasOwnProperty('$reserved') && object.getData().get$Reserved() !== undefined) {\n etag = this.getValueForCaseInsensitiveKeyMatch(object.getData().get$Reserved(), 'ETag');\n }\n }\n return etag;\n }\n static getValueForCaseInsensitiveKeyMatch(object, key) {\n if (object && key) {\n const searchKey = key.toLowerCase();\n const matchedKey = Object.keys(object).find(key => key.toLowerCase() === searchKey);\n return matchedKey ? object[matchedKey] : null;\n }\n return null;\n }\n\n /**\n * Get SDK's negotiated version.\n * @returns {String} negotiated version.\n */\n getNegotiatedVersion() {\n return _classPrivateFieldGet(_negotiatedVersion, this);\n }\n /**\n * Call relevant options api and negotiate version\n * Negotiated version available via getNegotiatedVersion()\n * @param {ApiClient} selfInstance\n * @param {Array.<String>} authNames An array of allowed authentication type names i.e. basicAuthScheme\n * @returns {Promise<ApiClient>} a {@link https://www.promisejs.org/|Promise}\n */\n negotiateVersion(selfInstance, authNames) {\n return new Promise(resolve => {\n if (this.allowVersionNegotiation === true && _classPrivateFieldGet(_negotiationCompleted, this) === false) {\n this.callApiInternal('/api/objects/unversioned/info', 'OPTIONS', {}, {}, {}, {}, null, authNames, [], ['application/json'], Object).then(({\n data,\n response\n }) => {\n if (response.status === 200 && data.hasOwnProperty(\"data\") && data.data !== null) {\n const serverVersion = data.data;\n const minimumSupportedVersion = \"v4.0\";\n\n // Check if server version is below minimum supported version\n if (_assertClassBrand(_ApiClient_brand, this, _isSmallerMinorVersion).call(this, _assertClassBrand(_ApiClient_brand, this, _getVersionDetails).call(this, serverVersion), _assertClassBrand(_ApiClient_brand, this, _getVersionDetails).call(this, minimumSupportedVersion))) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).WARN, null, \"Server version\", serverVersion, \"is below minimum supported version\", minimumSupportedVersion, \". Version negotiation will not be performed.\");\n _classPrivateFieldSet(_negotiatedVersion, this, null);\n _classPrivateFieldSet(_negotiationCompleted, this, false);\n resolve(selfInstance);\n return;\n }\n _classPrivateFieldSet(_negotiatedVersion, this, _assertClassBrand(_ApiClient_brand, this, _performNegotiationBetweenVersions).call(this, \"v4.0\", serverVersion));\n _classPrivateFieldSet(_negotiationCompleted, this, true);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Negotiated Version with server :\", _classPrivateFieldGet(_negotiatedVersion, this));\n resolve(selfInstance);\n } else {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Could not fetch supported versions from server\");\n _classPrivateFieldSet(_negotiatedVersion, this, null);\n _classPrivateFieldSet(_negotiationCompleted, this, false);\n resolve(selfInstance);\n }\n }).catch(error => {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Could not fetch supported versions from server\");\n _classPrivateFieldSet(_negotiatedVersion, this, null);\n _classPrivateFieldSet(_negotiationCompleted, this, false);\n resolve(selfInstance);\n });\n } else {\n resolve(selfInstance);\n }\n });\n }\n\n // Gets a valid timeout\n // 1. Sets to provided default timeout in case invalid value is passed\n // 2. Sets to default max value of 30 minutes in case a value of more than 30 minutes is passed\n\n /**\n * Invokes the REST service using the supplied settings and parameters.\n * @param {String} path The base URL to invoke.\n * @param {String} httpMethod The HTTP method to use.\n * @param {Object.<String, String>} pathParams A map of path parameters and their values.\n * @param {Object.<String, Object>} queryParams A map of query parameters and their values.\n * @param {Object.<String, Object>} headerParams A map of header parameters and their values.\n * @param {Object.<String, Object>} formParams A map of form parameters and their values.\n * @param {Object} bodyParam The value to pass as the request body.\n * @param {Array.<String>} authNames An array of authentication type names.\n * @param {Array.<String>} contentTypes An array of request MIME types.\n * @param {Array.<String>} accepts An array of acceptable response MIME types.\n * @param {(String|Array|Object|Function)} returnType The required type to return; can be a string for simple types or the\n * constructor for a complex type.\n * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.\n */\n callApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType) {\n return this.negotiateVersion(this, authNames).then(function (selfInstance) {\n return selfInstance.callApiInternal(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType);\n });\n }\n callApiInternal(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType) {\n var url = this.buildUrl(path, pathParams);\n const isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n let binaryMediaTypes = ['application/octet-stream', 'application/pdf', 'application/zip'];\n if (accepts && accepts.length > 0 && accepts.some(accept => binaryMediaTypes.includes(accept)) && isBrowser && this.downloadDestination) {\n return new Promise((resolve, reject) => {\n // Prepare request for browser download\n const fetchParams = _assertClassBrand(_ApiClient_brand, this, _prepareDownloadBrowserParams).call(this, url, httpMethod, queryParams, headerParams, bodyParam, authNames, contentTypes, accepts);\n fetch(fetchParams.url, fetchParams.options).then(response => {\n if (!response.ok) {\n const err = new Error(`HTTP error ${response.status}`);\n err.status = response.status;\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Error downloading file:\", err);\n reject(err);\n }\n if (!(this.downloadDestination instanceof WritableStream)) {\n let errMsg = \"Incompatible downloadDestination for Browser Environment, must be WritableStream\";\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, errMsg);\n reject(errMsg);\n }\n const reader = response.body.getReader();\n const writer = this.downloadDestination.getWriter();\n const pump = () => {\n return reader.read().then(({\n done,\n value\n }) => {\n if (done) {\n writer.close();\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Finished streaming response\");\n resolve({\n data: {},\n response\n });\n }\n return writer.write(value).then(pump);\n });\n };\n return pump();\n }).catch(error => {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Caught the following error :\", error);\n reject(error);\n });\n });\n }\n var request = superagent__WEBPACK_IMPORTED_MODULE_0___default()(httpMethod, url);\n\n // override request callback to retry only required status codes\n request.oldCallback = request.callback;\n request.callback = function (err, res) {\n if (res && res.status) {\n const status = res.status;\n if (status >= 400 && !(status === 408 || status === 429 || status === 503 || status === 504)) {\n this._maxRetries = 0;\n }\n if (res.status === 401 && this.header[\"Cookie\"]) {\n this.unset(\"Cookie\");\n this._maxRetries = 1;\n }\n if (status === 429) {\n let retryAfter = res.headers['retry-after'];\n if (retryAfter) {\n let delay = parseInt(retryAfter, 10) * 1000;\n this._retryDelays[this._retries] = delay;\n }\n }\n }\n this.oldCallback(err, res);\n };\n\n // apply authentications\n _assertClassBrand(_ApiClient_brand, this, _applyAuthToRequest).call(this, request, authNames);\n\n // set query parameters\n if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {\n queryParams['_'] = new Date().getTime();\n }\n request.query(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, queryParams));\n\n // set header parameters\n request.set(this.defaultHeaders).set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, headerParams));\n if ((this.defaultHeaders['NTNX-Request-Id'] === null || this.defaultHeaders['NTNX-Request-Id'] === undefined) && (headerParams['NTNX-Request-Id'] === null || headerParams['NTNX-Request-Id'] === undefined)) {\n let requestId = (0,uuid__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n request.set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, {\n 'NTNX-Request-Id': requestId\n }));\n }\n\n // Set User-Agent header only if it is not a browser environment\n if (!isBrowser) {\n this.downloadDestination = '.';\n request.set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, {\n 'User-Agent': 'Nutanix-objects-js-client/4.0.3'\n }));\n }\n\n // set requestAgent if it is set by user\n if (this.requestAgent) {\n request.agent(this.requestAgent);\n }\n\n // set request timeouts\n var timeoutOptions = {};\n timeoutOptions[\"response\"] = _assertClassBrand(_ApiClient_brand, this, _getValidTimeout).call(this, this.connectTimeout, _classPrivateFieldGet(_defaultConnectTimeout, this));\n timeoutOptions[\"deadline\"] = _assertClassBrand(_ApiClient_brand, this, _getValidTimeout).call(this, this.readTimeout, _classPrivateFieldGet(_defaultReadTimeout, this));\n request.timeout(timeoutOptions);\n var contentType = headerParams.hasOwnProperty(\"Content-Type\") ? headerParams[\"Content-Type\"] : _assertClassBrand(_ApiClient_brand, this, _jsonPreferredMime).call(this, contentTypes);\n if (contentType) {\n // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)\n if (contentType != 'multipart/form-data') {\n request.type(contentType);\n }\n } else if (!request.header['Content-Type']) {\n request.type('application/json');\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Request URL :\", httpMethod, url);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, _assertClassBrand(_ApiClient_brand, this, _flatten), \"Request Headers :\", typeof request.header === \"undefined\" ? \"\" : request.header);\n if (contentType === 'application/x-www-form-urlencoded') {\n request.send(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, formParams));\n } else if (contentType == 'multipart/form-data') {\n var _formParams = _assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, formParams);\n for (var key in _formParams) {\n if (_formParams.hasOwnProperty(key)) {\n if (_assertClassBrand(_ApiClient_brand, this, _isFileParam).call(this, _formParams[key])) {\n // file field\n request.attach(key, _formParams[key]);\n } else {\n request.field(key, _formParams[key]);\n }\n }\n }\n } else if (contentType === 'application/octet-stream' && bodyParam !== null && typeof bodyParam !== 'undefined' && typeof bodyParam.pipe === 'function') {\n // FILE UPLOAD SUPPORT\n\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Piping octet-stream request\");\n if (typeof bodyParam.pipe === 'function') {\n bodyParam.pipe(request);\n } else if (true) {\n let webstream;\n try {\n webstream = __webpack_require__(/*! stream/web */ \"?fdee\");\n } catch (err) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Error fetching steam/web\");\n }\n if (bodyParam instanceof webstream.ReadableStream) {\n bodyParam.pipeTo(new webstream.WritableStream({\n write(chunk) {\n request.write(chunk);\n },\n close() {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"READABLE STREAM CLOSED\");\n },\n abort(err) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"READABLE STREAM ABORTED\");\n }\n }));\n } else {\n request.send(bodyParam);\n }\n } else // removed by dead control flow\n{}\n return new Promise((resolve, reject) => {\n request.on('error', err => {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Caught the following error :\", err);\n reject(err);\n }).on('response', response => {\n _assertClassBrand(_ApiClient_brand, this, _handleApiResponseForPromise).call(this, response, path, queryParams, returnType, resolve, reject);\n });\n });\n } else if (['POST', 'PUT', 'PATCH'].includes(httpMethod.toUpperCase()) && bodyParam) {\n request.send(bodyParam);\n }\n if (typeof returnType === 'Blob') {\n request.responseType('blob');\n } else if (returnType === 'String') {\n request.responseType('string');\n }\n _assertClassBrand(_ApiClient_brand, this, _attachCookies).call(this, request);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Request Body :\", typeof request._data === \"undefined\" ? \"\" : request._data);\n var accept = headerParams.hasOwnProperty(\"Accept\") && headerParams[\"Accept\"] != undefined ? headerParams[\"Accept\"] : accepts.join(', ');\n if (accept) {\n request.accept(accept);\n }\n return new Promise((resolve, reject) => {\n request.buffer(false).redirects(0).retry(this.maxRetryAttempts, this.retryInterval, []).withCredentials(this.withCredentials).on('error', err => {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Caught the following error :\", err);\n }).end((error, response) => {\n if (error) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Caught error during the request!\");\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, error);\n // Reset negotiation flags on 404 to allow future negotiation attempts\n if (error.status === 404) {\n _classPrivateFieldSet(_negotiationCompleted, this, false);\n _classPrivateFieldSet(_negotiatedVersion, this, null);\n }\n if (error.response !== null && typeof error.response !== 'undefined') {\n error.data = _assertClassBrand(_ApiClient_brand, this, _deserialize).call(this, error.response, returnType);\n } else {\n error.data = _assertClassBrand(_ApiClient_brand, this, _wrapErrorInResponse).call(this, error);\n }\n reject(error);\n } else {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Response Status :\", response.status);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, _assertClassBrand(_ApiClient_brand, this, _flatten), \"Response Headers :\", response.headers);\n let contentType = '';\n if (response.headers.hasOwnProperty('content-type')) {\n contentType = response.headers[\"content-type\"];\n }\n let fetchStream = binaryMediaTypes.includes(contentType);\n if (fetchStream) {\n /*\n * Browser environment :\n * Already handled\n * Node.js environment :\n * uses File System, downloadDestination expected to be a directory path, file is downloaded to this directory\n */\n if (!isBrowser) {\n /*\n * Non Browser environment :\n * - stream data to file\n * - fetch response headers and body (if exists)\n * - return in case of error or after stream finish\n *\n * NOTE :\n * superagent does not provide access to headers before pipe, therefore response is piped to\n * file with temporary name, which is renamed to proper filename after Content-Disposition header is available\n */\n\n let tempFilename = this.downloadDestination + '/downloaded_file_' + Date.now() + '.txt'; // temporary filename\n let stream = fs__WEBPACK_IMPORTED_MODULE_5___default().createWriteStream(tempFilename);\n _assertClassBrand(_ApiClient_brand, this, _processDownloadedFile).call(this, response, stream, tempFilename, resolve, reject, returnType);\n }\n } else if (response.status == 302) {\n /*\n * Handling 302 Redirects\n * - Reads X-Redirect-Token header from response and writes into Cookie header for redirected request\n */\n let tempFilename = this.downloadDestination + '/downloaded_file_' + Date.now() + '.txt'; // temporary filename\n let context = this;\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Redirecting to :\", response.headers.location);\n var redirectRequest = superagent__WEBPACK_IMPORTED_MODULE_0___default()(httpMethod, response.headers.location);\n redirectRequest.set(request.header);\n if (response.headers.hasOwnProperty(\"x-redirect-token\")) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Writing X-Redirect-Token into Cookie\");\n redirectRequest.set(\"Cookie\", response.headers[\"x-redirect-token\"]);\n }\n if (this.requestAgent) {\n redirectRequest.agent(this.requestAgent);\n }\n redirectRequest.redirects(0);\n redirectRequest.withCredentials(this.withCredentials);\n redirectRequest.buffer(false);\n let redirectedStream = fs__WEBPACK_IMPORTED_MODULE_5___default().createWriteStream(tempFilename);\n redirectRequest.pipe(redirectedStream);\n redirectRequest.on('response', function (redirectResponse) {\n _assertClassBrand(_ApiClient_brand, context, _log).call(context, _classPrivateFieldGet(_LOG_LEVEL, context).INFO, null, \"Received response after redirection :\", redirectResponse.status);\n _assertClassBrand(_ApiClient_brand, context, _processDownloadedFile).call(context, redirectResponse, redirectedStream, tempFilename, resolve, reject, returnType);\n });\n } else {\n _assertClassBrand(_ApiClient_brand, this, _handleApiResponseForPromise).call(this, response, path, queryParams, returnType, resolve, reject);\n }\n }\n });\n });\n }\n static addEtagReferenceToHeader(bodyParam, headerParams) {\n // set If-Match header from postBody $reserved map\n if (typeof bodyParam !== 'undefined' && bodyParam !== null) {\n if (bodyParam.hasOwnProperty('$reserved') && bodyParam.$reserved.hasOwnProperty('ETag')) {\n let eTagReference = bodyParam.$reserved['ETag'];\n if (typeof eTagReference !== 'undefined' && eTagReference !== null && eTagReference !== \"\") {\n headerParams['If-Match'] = eTagReference;\n }\n }\n }\n }\n\n /*\n * Parses an ISO-8601 string representation of a date value.\n * @param {String} str The date value as a string.\n * @returns {Date} The parsed date object.\n */\n static parseDate(str) {\n return new Date(str);\n }\n\n /*\n * Parses queryParams and path to find a given query param value\n * @param {String} path The path given to callApi method\n * @param {Object.<String, Object>} queryParams The queryParams given to callApi method\n * @param {String} param Parameter name to look for\n * @param {String} defaultValue The default value for the missing param if not present\n * @returns {String} The value of given parameter\n */\n static parseQueryParam(path, queryParams, param, defaultValue) {\n let value = null;\n if (typeof queryParams !== 'undefined' && queryParams.hasOwnProperty(param)) {\n value = queryParams[param];\n }\n if (value === null && (typeof path === 'string' || path instanceof String)) {\n const escapedParam = param.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n const regexResult = path.match(new RegExp(`${escapedParam}=([0-9]+)`));\n if (regexResult) {\n value = regexResult[1];\n }\n }\n if (value === null) {\n value = defaultValue;\n }\n return value;\n }\n\n /**\n * Converts a value to the specified type.\n * @param {(String|Object)} data The data to convert, as a string or object.\n * @param {(String|Array.<String>|Object.<String, Object>|Function)} type The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on <code>data<code> will be converted to this type.\n * @returns An instance of the specified type or null or undefined if data is null or undefined.\n */\n static convertToType(data, type) {\n if (data === null || data === undefined) return data;\n switch (type) {\n case 'Boolean':\n return Boolean(data);\n case 'Integer':\n return parseInt(data, 10);\n case 'Number':\n return parseFloat(data);\n case 'String':\n return String(data);\n case 'Date':\n return ApiClient.parseDate(String(data));\n case 'Blob':\n return data;\n default:\n if (type === Object) {\n // generic object, return directly\n return data;\n } else if (typeof type === 'function') {\n // for model type like: User\n return type.constructFromObject(data);\n } else if (Array.isArray(type)) {\n // for array type like: ['String']\n var itemType = type[0];\n return data.map(item => {\n return ApiClient.convertToType(item, itemType);\n });\n } else if (typeof type === 'object') {\n // for plain object type like: {'String': 'Integer'}\n var keyType, valueType;\n for (var k in type) {\n if (type.hasOwnProperty(k)) {\n keyType = k;\n valueType = type[k];\n break;\n }\n }\n var result = {};\n for (var k in data) {\n if (data.hasOwnProperty(k)) {\n var key = ApiClient.convertToType(k, keyType);\n var value = ApiClient.convertToType(data[k], valueType);\n result[key] = value;\n }\n }\n return result;\n } else {\n // for unknown type, return the data directly\n return data;\n }\n }\n }\n\n /**\n * Constructs a new map or array model from REST data.\n * @param data {Object|Array} The REST data.\n * @param obj {Object|Array} The target object or array.\n */\n static constructFromObject(data, obj, itemType) {\n if (Array.isArray(data)) {\n for (var i = 0; i < data.length; i++) {\n if (data.hasOwnProperty(i)) obj[i] = ApiClient.convertToType(data[i], itemType);\n }\n } else {\n for (var k in data) {\n if (data.hasOwnProperty(k)) obj[k] = ApiClient.convertToType(data[k], itemType);\n }\n }\n }\n}\n\n/**\n* The default API client implementation.\n* @type {ApiClient}\n* @memberOf ApiClient\n*/\n_ApiClient = ApiClient;\nfunction _isJsonMime(contentType) {\n return Boolean(contentType != null && contentType.match(/^application\\/json(;.*)?$/i));\n}\n/*\n* Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.\n* @param {Array.<String>} contentTypes\n* @returns {String} The chosen content type, preferring JSON.\n*/\nfunction _jsonPreferredMime(contentTypes) {\n for (var i = 0; i < contentTypes.length; i++) {\n if (_assertClassBrand(_ApiClient_brand, this, _isJsonMime).call(this, contentTypes[i])) {\n return contentTypes[i];\n }\n }\n return contentTypes[0];\n}\n/*\n* Checks whether the given parameter value represents file-like content.\n* @param param The parameter to check.\n* @returns {Boolean} <code>true</code> if <code>param</code> represents a file.\n*/\nfunction _isFileParam(param) {\n // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)\n if (true) {\n let fs;\n try {\n fs = __webpack_require__(/*! fs */ \"?e583\");\n } catch (err) {}\n if (fs && fs.ReadStream && param instanceof fs.ReadStream) {\n return true;\n }\n }\n\n // Buffer in Node.js\n if (typeof Buffer === 'function' && param instanceof Buffer) {\n return true;\n }\n\n // Blob in browser\n if (typeof buffer__WEBPACK_IMPORTED_MODULE_7__.Blob === 'function' && param instanceof buffer__WEBPACK_IMPORTED_MODULE_7__.Blob) {\n return true;\n }\n\n // File in browser (it seems File object is also instance of Blob, but keep this for safe)\n if (typeof File === 'function' && param instanceof File) {\n return true;\n }\n return false;\n}\n/*\n* Normalizes parameter values:\n* <ul>\n* <li>remove nils</li>\n* <li>keep files and arrays</li>\n* <li>format to string with `paramToString` for other cases</li>\n* </ul>\n* @param {Object.<String, Object>} params The parameters as object properties.\n* @returns {Object.<String, Object>} normalized parameters.\n*/\nfunction _normalizeParams(params) {\n var newParams = {};\n for (var key in params) {\n if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {\n var value = params[key];\n if (_assertClassBrand(_ApiClient_brand, this, _isFileParam).call(this, value) || Array.isArray(value)) {\n newParams[key] = value;\n } else {\n newParams[key] = this.paramToString(value);\n }\n }\n }\n return newParams;\n}\nfunction _applyAuthToRequest(request, authNames) {\n authNames.forEach(authName => {\n var auth = this.authentications[authName];\n switch (auth.type) {\n case 'basic':\n if (auth.username || auth.password) {\n request.auth(auth.username || '', auth.password || '');\n } else if (this.username || this.password) {\n request.auth(this.username || '', this.password || '');\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Basic Auth applied to request\");\n break;\n case 'apiKey':\n if (auth.apiKey) {\n var data = {};\n if (auth.apiKeyPrefix) {\n data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;\n } else {\n data[auth.name] = auth.apiKey;\n }\n if (auth['in'] === 'header') {\n request.set(data);\n } else {\n request.query(data);\n }\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"apiKey applied to request\");\n break;\n case 'oauth2':\n if (auth.accessToken) {\n request.set({\n 'Authorization': 'Bearer ' + auth.accessToken\n });\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"oauth2 applied to request\");\n break;\n default:\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Unknown authentication type:\", auth.type);\n throw new Error('Unknown authentication type: ' + auth.type);\n }\n });\n}\n/**\n* Wraps errors in generic response format.\n* @param {Object} error object encountered during request.\n* @returns an error object with wrapped response within error.data .\n*/\nfunction _wrapErrorInResponse(error) {\n var response = {\n data: {},\n metadata: {}\n };\n response.data.status = error.status;\n response.data.message = error.message;\n}\n/**\n* Deserializes an HTTP response body into a value of the specified type.\n* @param {Object} response A SuperAgent response object.\n* @param {(String|Array.<String>|Object.<String, Object>|Function)} returnType The type to return. Pass a string for simple types\n* or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n* return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n* all properties on <code>data<code> will be converted to this type.\n* @returns A value of the specified type.\n*/\nfunction _deserialize(response, returnType) {\n if (response == null || returnType == null || response.status == 204) {\n return null;\n }\n\n // Handle text response\n if (response.headers && ['text/event-stream', 'text/html', 'text/xml', 'text/csv', 'text/javascript', 'text/markdown', 'text/vcard'].includes(response.headers['content-type'])) {\n var data = new returnType();\n data.data = new buffer__WEBPACK_IMPORTED_MODULE_7__.Blob([response.text], {\n type: response.headers['content-type']\n });\n let flag = new _models_common_v1_config_Flag__WEBPACK_IMPORTED_MODULE_9__[\"default\"]();\n flag.name = \"hasError\";\n flag.value = false;\n let flags = [flag];\n let metadata = new _models_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_8__[\"default\"]();\n metadata.flags = flags;\n data.metadata = metadata;\n return data;\n }\n\n // Rely on SuperAgent for parsing response body.\n // See http://visionmedia.github.io/superagent/#parsing-response-bodies\n var data = response.body;\n if (data == null || typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length) {\n // SuperAgent does not always produce a body; use the unparsed response as a fallback\n data = response.text;\n }\n return _ApiClient.convertToType(data, returnType);\n}\n/**\n* Set pagination data if response is a Paginable object\n* @param {Object} data The response data already passed through deserialize\n* @param {String} path The path given to callApi method\n* @param {Object.<String, Object>} queryParams The queryParams given to callApi method\n*/\nfunction _paginateIfNeeded(data, path, queryParams) {\n // If response is not a Paginable instance, nothing to do\n if (!(data instanceof _Paginable__WEBPACK_IMPORTED_MODULE_1__[\"default\"])) {\n return;\n }\n // Retrieve current page number, defaults to 0\n const page = parseInt(this.constructor.parseQueryParam(path, queryParams, '$page', \"0\"), 10);\n // Retrieve current limit (results per page) number, defaults to 50\n const resultsPerPage = parseInt(this.constructor.parseQueryParam(path, queryParams, '$limit', \"50\"), 10);\n\n // Populate pagination data\n data.populatePaginationMetadata(this,\n // current ApiClient instance\n page, resultsPerPage);\n}\nfunction _performNegotiationBetweenVersions(sdk, server) {\n if (!sdk || !server) {\n return sdk;\n }\n let sdkProps = _assertClassBrand(_ApiClient_brand, this, _getVersionDetails).call(this, sdk);\n let serverProps = _assertClassBrand(_ApiClient_brand, this, _getVersionDetails).call(this, server);\n // if major version is different, then do not negotiate\n // maintain sdk version\n if (!sdkProps[\"family\"] === serverProps[\"family\"]) {\n return sdk;\n }\n // if sdk version is smaller than highest server version, then maintain sdk version\n if (_assertClassBrand(_ApiClient_brand, this, _isSmallerMinorVersion).call(this, sdkProps, serverProps)) {\n return sdk;\n }\n // since sdk version is higher than highest server version, use server version\n return server;\n}\nfunction _isSmallerMinorVersion(p1, p2) {\n // if revision different, then compare revision\n if (parseInt(p1[\"revision\"]) != parseInt(p2[\"revision\"])) {\n return parseInt(p1[\"revision\"]) < parseInt(p2[\"revision\"]);\n }\n // revision is same, so compare version_type (release_type + release_type_revision)\n if (p1[\"versionType\"] === \"released\") {\n return false;\n }\n let p1ReleaseType = p1[\"versionType\"].substring(0, 1);\n let p2ReleaseType = p2[\"versionType\"].substring(0, 1);\n let p1ReleaseTypeRevision = parseInt(p1[\"versionType\"].substring(1));\n let p2ReleaseTypeRevision = p2[\"versionType\"] === \"released\" ? 0 : parseInt(p2[\"versionType\"].substring(1));\n if (p1ReleaseType === p2ReleaseType) {\n // release type is same, so compare release type revision\n return p1ReleaseTypeRevision < p2ReleaseTypeRevision;\n }\n // release type is different, so alpha must be smallest and released must be largest\n return p1ReleaseType === \"a\" || p2[\"versionType\"] === \"released\";\n}\nfunction _getVersionDetails(version) {\n let ret = {};\n if (\"unversioned\" === version) {\n ret[\"family\"] = \"unversioned\";\n ret[\"versionType\"] = \"released\";\n } else {\n let versionParts = version.toString().split('.');\n if (\"unversioned\" === versionParts[0]) {\n ret[\"family\"] = \"unversioned\";\n ret[\"versionType\"] = versionParts[1];\n } else {\n ret[\"family\"] = versionParts[0].substring(1);\n ret[\"revision\"] = versionParts[1];\n if (versionParts.length == 2) {\n ret[\"versionType\"] = \"released\";\n } else {\n ret[\"versionType\"] = versionParts[2];\n }\n }\n }\n return ret;\n}\nfunction _getValidTimeout(timeout, defaultTimeout) {\n if (timeout <= 0) {\n timeout = defaultTimeout;\n } else if (timeout > _classPrivateFieldGet(_defaultMaxTimeout, this)) {\n timeout = _classPrivateFieldGet(_defaultMaxTimeout, this);\n }\n return timeout;\n}\n// If enabled, update cookie information to reuse in subsequent requests for a valid response\nfunction _updateCookies(response) {\n if (response.hasOwnProperty(\"headers\") && response.headers.hasOwnProperty(\"set-cookie\")) {\n let finalCookie = \"\";\n let cookieList = response.headers[\"set-cookie\"];\n if (cookieList.length > 0) {\n // add all cookies separated by ;\n for (let cookieItem of cookieList) {\n cookieItem = cookieItem.split(\";\")[0];\n if (cookieItem.includes(\"=\")) {\n cookieItem.trim();\n finalCookie = finalCookie.concat(cookieItem).concat(\";\");\n }\n }\n // remove trailing ;\n if (finalCookie !== \"\") {\n finalCookie = finalCookie.substr(0, finalCookie.length - 1);\n }\n }\n _classPrivateFieldSet(_cookie, this, finalCookie);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Retained cookie :\", finalCookie);\n } else {\n _classPrivateFieldSet(_cookie, this, null);\n }\n}\n// If enabled, attach saved cookies to request\nfunction _attachCookies(request) {\n if (_classPrivateFieldGet(_cookie, this) != null) {\n request.set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, {\n 'Cookie': _classPrivateFieldGet(_cookie, this)\n }));\n }\n}\nfunction _log(level, mapper, ...messages) {\n // Set default log level to INFO\n if (typeof level !== \"object\" || !(\"key\" in level) || !(\"value\" in level) || typeof level[\"value\"] !== \"symbol\") {\n level = _classPrivateFieldGet(_LOG_LEVEL, this).INFO;\n }\n if (!_assertClassBrand(_ApiClient_brand, this, _skipLogging).call(this, level)) {\n // Preprocess message to prefix with timestamp and log level\n messages = messages.map(message => {\n return typeof message === \"string\" ? message : mapper ? mapper(message) : JSON.stringify(message);\n });\n let message = messages.join(' ');\n message = new Date().toISOString() + ' ' + level.key + ' - ' + message;\n if (typeof _classPrivateFieldGet(_logger, this) !== \"undefined\" && _classPrivateFieldGet(_logger, this) !== null && typeof _classPrivateFieldGet(_logger, this).log === 'function') {\n _classPrivateFieldGet(_logger, this).log(message);\n } else {\n console.log(message);\n }\n }\n}\nfunction _skipLogging(level) {\n // Skip logging if log level is DEBUG but debug is not enabled.\n return !this.debug && level === _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG;\n}\n// A mapper function to flatten a simple non-nested (key:value) object to string\nfunction _flatten(obj) {\n if (typeof obj !== \"object\") {\n return obj;\n }\n let output = '\\n';\n if (obj) {\n Object.keys(obj).forEach(e => {\n output += e + '=[' + obj[e] + ']\\n';\n });\n }\n return output === '\\n' ? obj : output;\n}\n// handle and deserialize received response\nfunction _handleApiResponseForPromise(response, path, queryParams, returnType, resolve, reject) {\n try {\n var data = _assertClassBrand(_ApiClient_brand, this, _deserialize).call(this, response, returnType);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Response Status :\", response.status);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, _assertClassBrand(_ApiClient_brand, this, _flatten), \"Response Headers :\", response.headers);\n _assertClassBrand(_ApiClient_brand, this, _updateCookies).call(this, response || {});\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Response Body :\", data);\n if (response.status == 204 && data == null) {\n resolve({\n data,\n response\n });\n } else if (response.ok && data != null) {\n this.addEtagToReservedMap(response, data);\n _assertClassBrand(_ApiClient_brand, this, _paginateIfNeeded).call(this, data, path, queryParams);\n resolve({\n data,\n response\n });\n } else {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, data);\n reject({\n ...response.error,\n data: data\n });\n }\n } catch (err) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Caught error while processing response!\");\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, err);\n err.data = _assertClassBrand(_ApiClient_brand, this, _wrapErrorInResponse).call(this, err);\n reject(err);\n }\n}\nfunction _prepareDownloadBrowserParams(url, httpMethod, queryParams, headerParams, bodyParam, authNames, contentTypes, accepts) {\n let authHeaders = {};\n\n // Apply authentication logic\n authNames.forEach(authName => {\n const auth = this.authentications[authName];\n switch (auth.type) {\n case 'basic':\n let username = '';\n let password = '';\n if (auth.username || auth.password) {\n username = auth.username || '';\n password = auth.password || '';\n } else if (this.username || this.password) {\n username = this.username || '';\n password = this.password || '';\n }\n if (username || password) {\n const credentials = btoa(`${username}:${password}`);\n authHeaders['Authorization'] = `Basic ${credentials}`;\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Basic Auth applied to request\");\n break;\n case 'apiKey':\n if (auth.apiKey) {\n let apiKeyValue = '';\n if (auth.apiKeyPrefix) {\n apiKeyValue = auth.apiKeyPrefix + ' ' + auth.apiKey;\n } else {\n apiKeyValue = auth.apiKey;\n }\n if (auth['in'] === 'header') {\n authHeaders[auth.name] = 'Bearer ' + apiKeyValue;\n } else if (auth['in'] === 'query') {\n queryParams[auth.name] = apiKeyValue;\n }\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"apiKey applied to request\");\n break;\n case 'oauth2':\n if (auth.accessToken) {\n authHeaders['Authorization'] = 'Bearer ' + auth.accessToken;\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"oauth2 applied to request\");\n break;\n default:\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Unknown authentication type:\", auth.type);\n throw new Error('Unknown authentication type: ' + auth.type);\n }\n });\n\n // set query parameters\n if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {\n queryParams['cache'] = 'false';\n }\n\n // Build URL with query parameters\n const normalizedParams = _assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, queryParams);\n const queryString = Object.keys(normalizedParams).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(normalizedParams[key])}`).join('&');\n let finalUrl = url;\n if (queryString) {\n finalUrl += (finalUrl.includes('?') ? '&' : '?') + queryString;\n }\n const finalHeaders = {\n ...this.defaultHeaders,\n ..._assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, headerParams),\n ...authHeaders\n };\n\n // set header parameters\n if ((this.defaultHeaders['NTNX-Request-Id'] === null || this.defaultHeaders['NTNX-Request-Id'] === undefined) && (headerParams['NTNX-Request-Id'] === null || headerParams['NTNX-Request-Id'] === undefined)) {\n let requestId = (0,uuid__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n finalHeaders['NTNX-Request-Id'] = requestId;\n }\n\n //Add cookies if they exist\n if (_classPrivateFieldGet(_cookie, this) != null) {\n finalHeaders['Cookie'] = _assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, {\n 'Cookie': _classPrivateFieldGet(_cookie, this)\n });\n }\n\n // Set content type\n var contentType = headerParams.hasOwnProperty(\"Content-Type\") ? headerParams[\"Content-Type\"] : _assertClassBrand(_ApiClient_brand, this, _jsonPreferredMime).call(this, contentTypes);\n finalHeaders['Content-Type'] = contentType;\n\n // Set Accept Header\n var accept = headerParams.hasOwnProperty(\"Accept\") && headerParams[\"Accept\"] != undefined ? headerParams[\"Accept\"] : accepts.join(', ');\n if (accept) {\n finalHeaders['Accept'] = accept;\n }\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Request URL :\", httpMethod, url);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, _assertClassBrand(_ApiClient_brand, this, _flatten), \"Request Headers :\", finalHeaders);\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, \"Request Body :\", bodyParam || \"\");\n return {\n url: finalUrl,\n options: {\n method: httpMethod,\n headers: finalHeaders,\n body: bodyParam,\n credentials: this.withCredentials ? 'include' : 'same-origin'\n }\n };\n}\nfunction _processDownloadedFile(response, stream, tempFilename, resolve, reject, returnType) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Streaming response to : \", tempFilename);\n try {\n response.on('data', chunk => {\n stream.write(chunk);\n });\n } catch (err) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Issue while downloading file\", err);\n }\n let data = new returnType();\n // Fetch filename\n let filename = \"\";\n if (typeof response.headers['content-disposition'] !== 'undefined' && response.headers['content-disposition'] !== null) {\n let match = response.headers['content-disposition'].match(/.*filename=\\\"(?<filename>.*)\\\".*/);\n let filepath = path__WEBPACK_IMPORTED_MODULE_6___default().parse(match.groups['filename']);\n filename = this.downloadDestination + '/' + filepath.name + '_' + Date.now() + filepath.ext;\n data.data = {\n \"path\": path__WEBPACK_IMPORTED_MODULE_6___default().parse(filename),\n $objectType: \"Path\"\n };\n let flag = new _models_common_v1_config_Flag__WEBPACK_IMPORTED_MODULE_9__[\"default\"]();\n flag.name = \"hasError\";\n flag.value = false;\n let flags = [flag];\n let metadata = new _models_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_8__[\"default\"]();\n metadata.flags = flags;\n data.metadata = metadata;\n }\n response.on('end', () => {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Finished streaming response\");\n if (filename.length !== 0) {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, \"Content-Disposition header found [\", filename, \"] is final filename\");\n stream.close();\n fs__WEBPACK_IMPORTED_MODULE_5___default().renameSync(tempFilename, filename);\n resolve({\n data,\n response\n });\n } else {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Content-Disposition header not found [\", tempFilename, \"] is final filename\");\n resolve({\n data,\n response\n });\n }\n });\n response.on('error', err => {\n _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, \"Caught the following error :\", err);\n error.data = _assertClassBrand(_ApiClient_brand, this, _wrapErrorInResponse).call(this, error);\n reject(err);\n });\n}\nApiClient.instance = new ApiClient();\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/ApiClient.js?\n}");
|
|
222
222
|
|
|
223
223
|
/***/ },
|
|
224
224
|
|
|
@@ -229,7 +229,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
229
229
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
230
230
|
|
|
231
231
|
"use strict";
|
|
232
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Paginable)\n/* harmony export */ });\n/* harmony import */ var _ApiClient__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ApiClient */ \"./target/generated-sources/swagger/src/ApiClient.js\");\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.
|
|
232
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Paginable)\n/* harmony export */ });\n/* harmony import */ var _ApiClient__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ApiClient */ \"./target/generated-sources/swagger/src/ApiClient.js\");\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n/**\n* A model that represents a paginable response from a list endpoint.\n* @module Paginable\n* @version 4.0.3\n*/\nclass Paginable {\n /**\n * Constructs a new <code>Paginable</code>.\n * @alias module:Paginable\n * @class\n */\n constructor() {}\n\n /**\n * Constructs a <code>Paginable</code> from a plain Javascript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} metadata The plain Javascript object bearing properties of interest.\n * @param {module:Paginable} obj Optional instance to populate.\n * @return {module:Paginable} The populated <code>Paginable</code> instance.\n */\n static constructFromObject(metadata, obj) {\n if (metadata) {\n obj = obj || new Paginable();\n if (metadata.hasOwnProperty('links') && metadata['links'] !== null && metadata['links'] !== undefined) {\n for (const link of metadata['links']) {\n if (link.hasOwnProperty('rel') && link.hasOwnProperty('href')) {\n switch (link['rel']) {\n case 'first':\n obj.linkFirst = link['href'];\n break;\n case 'prev':\n obj.linkPrev = link['href'];\n break;\n case 'next':\n obj.linkNext = link['href'];\n break;\n case 'last':\n obj.linkLast = link['href'];\n break;\n default:\n break;\n }\n }\n }\n }\n if (metadata.hasOwnProperty('totalAvailableResults')) {\n obj.resultsTotal = metadata['totalAvailableResults'];\n }\n }\n return obj;\n }\n\n /**\n * Get the first page of the set, if any\n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, resolves with another Paginable\n * or rejects with error message if any issue (link not available, ...)\n */\n getFirstPage() {\n if (this.isFirstPage()) {\n return Promise.reject('Cannot navigate to first page : already on first page');\n }\n if (this.linkFirst === null) {\n return Promise.reject('No link to first page provided in previous API response');\n }\n return this._getLink(this.linkFirst);\n }\n\n /**\n * Get the previous page of the set, if any\n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, resolves with another Paginable\n * or rejects with error message if any issue (link not available, ...)\n */\n getPrevPage() {\n if (this.isFirstPage()) {\n return Promise.reject('Cannot navigate to previous page : already on first page');\n }\n if (this.linkPrev === null) {\n return Promise.reject('No link to previous page provided in previous API response');\n }\n return this._getLink(this.linkPrev);\n }\n\n /**\n * Get the next page of the set, if any\n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, resolves with another Paginable\n * or rejects with error message if any issue (link not available, ...)\n */\n getNextPage() {\n if (this.isLastPage()) {\n return Promise.reject('Cannot navigate to next page : already on last page');\n }\n if (this.linkNext === null) {\n return Promise.reject('No link to next page provided in previous API response');\n }\n return this._getLink(this.linkNext);\n }\n\n /**\n * Get the last page of the set, if any\n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, resolves with another Paginable\n * or rejects with error message if any issue (link not available, ...)\n */\n getLastPage() {\n if (this.isLastPage()) {\n return Promise.reject('Cannot navigate to last page : already on last page');\n }\n if (this.linkLast === null) {\n return Promise.reject('No link to last page provided in previous API response');\n }\n return this._getLink(this.linkLast);\n }\n\n /**\n * Get the current page number\n * @return {Number} the current page number, starts at 0\n */\n currentPage() {\n if (this.page === null) {\n return 0;\n }\n return this.page;\n }\n\n /**\n * Get the total number of pages\n * @return {Number} the total number of pages available\n */\n countPages() {\n if (this.resultsPerPage === null || this.resultsTotal === null || this.resultsPerPage === 0) {\n return 1;\n }\n return Math.ceil(this.resultsTotal / this.resultsPerPage);\n }\n\n /**\n * Check if current page is first page\n * @return {Boolean} True if current page is 0, false otherwise\n */\n isFirstPage() {\n return this.currentPage() === 0;\n }\n\n /**\n * Check if current page is last page\n * @return {Boolean} True if current page is countPages()-1, false otherwise\n */\n isLastPage() {\n return this.currentPage() === this.countPages() - 1;\n }\n populatePaginationMetadata(apiClient, page, resultsPerPage) {\n this.apiClient = apiClient;\n this.page = page;\n this.resultsPerPage = resultsPerPage;\n }\n _getLink(path) {\n // If no ApiClient defined, instantiate default one\n if (this.apiClient === null) {\n this.apiClient = _ApiClient__WEBPACK_IMPORTED_MODULE_0__.ApiClient.instance;\n }\n const postBody = {};\n const pathParams = {};\n const queryParams = {};\n const headerParams = {};\n const formParams = {};\n const authNames = [];\n const contentTypes = [];\n const accepts = ['application/json'];\n const returnType = this.constructor;\n return this.apiClient.callApi(path, 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n}\n\n/**\n* The link to first page, if any\n* @type {String}\n* @memberOf Paginable\n*/\nPaginable.prototype.linkFirst = null;\n\n/**\n* The link to previous page, if any\n* @type {String}\n* @memberOf Paginable\n*/\nPaginable.prototype.linkPrev = null;\n\n/**\n* The link to next page, if any\n* @type {String}\n* @memberOf Paginable\n*/\nPaginable.prototype.linkNext = null;\n\n/**\n* The link to last page, if any\n* @type {String}\n* @memberOf Paginable\n*/\nPaginable.prototype.linkLast = null;\n\n/**\n* The ApiClient instance to use for further query\n* @type {ApiClient}\n* @memberOf Paginable\n*/\nPaginable.prototype.apiClient = null;\n\n/**\n* Current page number\n* @type {Number}\n* @memberOf Paginable\n*/\nPaginable.prototype.page = null;\n\n/**\n* Number of results per page\n* @type {Number}\n* @memberOf Paginable\n*/\nPaginable.prototype.resultsPerPage = null;\n\n/**\n* Number of total results available\n* @type {Number}\n* @memberOf Paginable\n*/\nPaginable.prototype.resultsTotal = null;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/Paginable.js?\n}");
|
|
233
233
|
|
|
234
234
|
/***/ },
|
|
235
235
|
|
|
@@ -240,7 +240,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
240
240
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
241
241
|
|
|
242
242
|
"use strict";
|
|
243
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ObjectStoresApi: () => (/* binding */ ObjectStoresApi)\n/* harmony export */ });\n/* harmony import */ var _ApiClient__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ApiClient */ \"./target/generated-sources/swagger/src/ApiClient.js\");\n/* harmony import */ var _models_objects_v4_config_GetCertificateApiResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../models/objects/v4/config/GetCertificateApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/GetCertificateApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_ObjectStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../models/objects/v4/config/ObjectStore */ \"./target/generated-sources/swagger/src/models/objects/v4/config/ObjectStore.js\");\n/* harmony import */ var _models_objects_v4_config_CreateObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../models/objects/v4/config/CreateObjectstoreApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/CreateObjectstoreApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_ListCertificatesApiResponse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../models/objects/v4/config/ListCertificatesApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/ListCertificatesApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_DeleteObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../models/objects/v4/config/DeleteObjectstoreApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/DeleteObjectstoreApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_UpdateObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../models/objects/v4/config/UpdateObjectstoreApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/UpdateObjectstoreApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_GetObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../models/objects/v4/config/GetObjectstoreApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/GetObjectstoreApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_CreateCertificateApiResponse__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../models/objects/v4/config/CreateCertificateApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/CreateCertificateApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_GetCaApiResponse__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../models/objects/v4/config/GetCaApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/GetCaApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_ListObjectstoresApiResponse__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../models/objects/v4/config/ListObjectstoresApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/ListObjectstoresApiResponse.js\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! path */ \"./node_modules/path/path.js\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_11__);\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * ObjectStores service.\n * @version 4.0.2\n * @class ObjectStoresApi\n */\nclass ObjectStoresApi {\n #headersToSkip;\n\n /**\n * Make the default {@link ApiClient} class available for developers to be able to extend it and bring\n * their own fetch methods into the SDK\n */\n static get ApiClient() {\n return _ApiClient__WEBPACK_IMPORTED_MODULE_0__.ApiClient;\n }\n\n /**\n * Constructs a new ObjectStoresApi. \n * @alias module:api/ObjectStoresApi\n * @class\n * @param {module:ApiClient} [apiClient] Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\n constructor(apiClient) {\n this.apiClient = apiClient || _ApiClient__WEBPACK_IMPORTED_MODULE_0__.ApiClient.instance;\n this.#headersToSkip = new Set();\n this.#headersToSkip.add('authorization');\n this.#headersToSkip.add('cookie');\n this.#headersToSkip.add('host');\n this.#headersToSkip.add('user-agent');\n }\n\n /**\n * Create a SSL certificate for an Object store\n * This operation creates a new default certificate and keys. It also creates the alternate FQDNs and alternate IPs for the Object store. The certificate of an Object store can be created when it is in a OBJECT_STORE_AVAILABLE or OBJECT_STORE_CERT_CREATION_FAILED state. If the publicCert, privateKey, and ca values are provided in the request body, these values are used to create the new certificate. If these values are not provided, a new certificate will be generated if 'shouldGenerate' is set to true and if it is set to false, the existing certificate will be used as the new certificate. Optionally, a list of additional alternate FQDNs and alternate IPs can be provided. These alternateFqdns and alternateIps must be included in the CA certificate if it has been provided. \n * @param { Partial<String | ReadableStream> } body Accepts file path as a string or a file stream\n * @param { String } objectStoreExtId The UUID of the Object store.\n * @param {Object} args Additional Arguments\n * @return {Promise<CreateCertificateApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link CreateCertificateApiResponse } and HTTP response\n */\n createCertificate(objectStoreExtId, body, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n let postBody = null;\n let fs;\n try {\n fs = __webpack_require__(/*! fs */ \"?41da\");\n } catch (err) {}\n if (typeof body.pipe === 'function') {\n postBody = body;\n argMap[\"Content-Length\"] = fs.statSync(body.path).size;\n if (!argMap.hasOwnProperty(\"Content-Disposition\")) {\n argMap[\"Content-Disposition\"] = 'attachment; filename=\"' + path__WEBPACK_IMPORTED_MODULE_11___default().parse(body.path).base + '\"';\n }\n } else if (typeof body === 'string') {\n // body is a path string\n let path;\n try {\n path = __webpack_require__(/*! path */ \"./node_modules/path/path.js\");\n } catch (err) {\n throw new Error('Cannot find module \\'path\\'. Ensure you are using a Node.js environment. If not, use ReadableStream for body parameter.');\n }\n try {\n postBody = fs.createReadStream(body);\n argMap[\"Content-Length\"] = fs.statSync(body).size;\n if (!argMap.hasOwnProperty(\"Content-Disposition\")) {\n argMap[\"Content-Disposition\"] = 'attachment; filename=\"' + path.basename(body) + '\"';\n }\n } catch (err) {\n throw new Error('Cannot read file: ' + body + '. Error: ' + err.message);\n }\n } else {\n postBody = body;\n }\n // verify the required parameter 'objectStoreExtId' is set\n if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {\n throw new Error(\"Missing the required parameter 'objectStoreExtId' when calling createCertificate\");\n }\n // verify the required parameter 'body' is set\n if (typeof postBody === 'undefined' || postBody === null) {\n throw new Error(\"Invalid body when calling createCertificate\");\n }\n const pathParams = {\n 'objectStoreExtId': objectStoreExtId\n };\n const queryParams = {};\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n _ApiClient__WEBPACK_IMPORTED_MODULE_0__.ApiClient.addEtagReferenceToHeader(body, headerParams);\n const authNames = ['basicAuthScheme'];\n const contentTypes = ['application/octet-stream'];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_CreateCertificateApiResponse__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Create an Object store\n * Run the prechecks, create and start the deployment of an Object store on Prism Central.\n * @param { Required<Pick<ObjectStore, 'name'>> & Partial<ObjectStore> } body specification\n * @param {Object} args Additional Arguments\n * @return {Promise<CreateObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link CreateObjectstoreApiResponse } and HTTP response\n */\n createObjectstore(body, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n let postBody = null;\n if (body instanceof _models_objects_v4_config_ObjectStore__WEBPACK_IMPORTED_MODULE_2__[\"default\"] && typeof body.toJson === 'function') {\n postBody = body.toJson();\n } else {\n postBody = body;\n }\n // verify the required parameter 'body' is set\n if (typeof postBody === 'undefined' || postBody === null) {\n throw new Error(\"Invalid body when calling createObjectstore\");\n }\n const pathParams = {};\n const queryParams = {};\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n _ApiClient__WEBPACK_IMPORTED_MODULE_0__.ApiClient.addEtagReferenceToHeader(body, headerParams);\n const authNames = ['basicAuthScheme'];\n const contentTypes = ['application/json'];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_CreateObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Delete an Object store\n * Send a request to delete an Object store for the provided UUID and clean up its data. An Object store can only be deleted when it is in the state UNDEPLOYED_OBJECT_STORE, OBJECT_STORE_AVAILABLE, OBJECT_STORE_DEPLOYMENT_FAILED or OBJECT_STORE_DELETION_FAILED and does not contain any buckets. \n * @param { String } extId The UUID of the Object store.\n * @param {Object} args Additional Arguments\n * @return {Promise<DeleteObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link DeleteObjectstoreApiResponse } and HTTP response\n */\n deleteObjectstoreById(extId, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n const postBody = null;\n // verify the required parameter 'extId' is set\n if (typeof extId === 'undefined' || extId === null) {\n throw new Error(\"Missing the required parameter 'extId' when calling deleteObjectstoreById\");\n }\n const pathParams = {\n 'extId': extId\n };\n const queryParams = {};\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n const authNames = ['basicAuthScheme'];\n const contentTypes = [];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_DeleteObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{extId}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Download the certificate authority\n * Download the certificate authority of an Object store certificate.\n * @param { String } objectStoreExtId The UUID of the Object store.\n * @param { String } certificateExtId The UUID of the certificate of an Object store.\n * @param {Object} args Additional Arguments\n * @return {Promise<GetCaApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetCaApiResponse } and HTTP response\n */\n getCaByCertificateId(objectStoreExtId, certificateExtId, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n const postBody = null;\n // verify the required parameter 'objectStoreExtId' is set\n if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {\n throw new Error(\"Missing the required parameter 'objectStoreExtId' when calling getCaByCertificateId\");\n }\n // verify the required parameter 'certificateExtId' is set\n if (typeof certificateExtId === 'undefined' || certificateExtId === null) {\n throw new Error(\"Missing the required parameter 'certificateExtId' when calling getCaByCertificateId\");\n }\n const pathParams = {\n 'objectStoreExtId': objectStoreExtId,\n 'certificateExtId': certificateExtId\n };\n const queryParams = {};\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n const authNames = ['basicAuthScheme'];\n const contentTypes = [];\n const accepts = ['application/octet-stream', 'application/json'];\n const returnType = _models_objects_v4_config_GetCaApiResponse__WEBPACK_IMPORTED_MODULE_9__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates/{certificateExtId}/certificate-authority', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Get the details of an Object store certificate\n * Get the details of the SSL certificate which can be used to connect to an Object store.\n * @param { String } objectStoreExtId The UUID of the Object store.\n * @param { String } extId The UUID of the certificate of an Object store.\n * @param {Object} args Additional Arguments\n * @return {Promise<GetCertificateApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetCertificateApiResponse } and HTTP response\n */\n getCertificateById(objectStoreExtId, extId, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n const postBody = null;\n // verify the required parameter 'objectStoreExtId' is set\n if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {\n throw new Error(\"Missing the required parameter 'objectStoreExtId' when calling getCertificateById\");\n }\n // verify the required parameter 'extId' is set\n if (typeof extId === 'undefined' || extId === null) {\n throw new Error(\"Missing the required parameter 'extId' when calling getCertificateById\");\n }\n const pathParams = {\n 'objectStoreExtId': objectStoreExtId,\n 'extId': extId\n };\n const queryParams = {};\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n const authNames = ['basicAuthScheme'];\n const contentTypes = [];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_GetCertificateApiResponse__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates/{extId}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Get an Object store\n * Get an Object store for the provided UUID. `state` string (State of the Object store) Enum for the state of the Object store. | Enum | Description | | ----------- | ----------- | | `\\"DEPLOYING_OBJECT_STORE\\"` | The Object store will be in this state during an ongoing deployment of the Object store. The Object store will be unavailable through S3 APIs in this state. The Object store will move to the OBJECT_STORE_AVAILABLE state if the deployment succeeds, and to the OBJECT_STORE_DEPLOYMENT_FAILED state if the deployment fails. | | `\\"OBJECT_STORE_OPERATION_FAILED\\"` | The Object store is in this state when there is an error while performing an operation on the Object store. The Object store may not be available through S3 APIs in this state. | | `\\"OBJECT_STORE_CERT_CREATION_FAILED\\"` | An Object store enters this state if there is an error while creating the Object store certificate. Creating a new certificate can be retried from this state. The Object store may not be available through S3 APIs in this state. | | `\\"OBJECT_STORE_OPERATION_PENDING\\"` | The Object store is in this state during an ongoing operation on the Object store. The Object store may not be available through S3 APIs in this state. The Object store will enter the OBJECT_STORE_OPERATION_FAILED state if the operation fails, or the OBJECT_STORE_AVAILABLE state if the operation is successful. | | `\\"UNDEPLOYED_OBJECT_STORE\\"` | The Object store is in this state if it has not been deployed. | | `\\"CREATING_OBJECT_STORE_CERT\\"` | The Object store is in this state during a certificate creation for the Object store. The Object store will be unavailable through S3 APIs in this state. It will move to the OBJECT_STORE_AVAILABLE state if the certificate was created successfully, or to the OBJECT_STORE_CERT_CREATION_FAILED state if an error occurs while creating the certificate. | | `\\"OBJECT_STORE_AVAILABLE\\"` | An Object store is in this state if its deployment was successful, and there are no ongoing operations on the Object store. The Object store will be available through S3 APIs in this state. In this state, the Object store can be deleted or a new certificate can be created for this Object store. | | `\\"OBJECT_STORE_DELETION_FAILED\\"` | An Object store enters this state if there is an error deleting the Object store. The Object store will not be available through S3 APIs in this state. Deleting the Object store can be retried from this state. | | `\\"OBJECT_STORE_DEPLOYMENT_FAILED\\"` | An Object store enters this state when its deployment fails. The Object store deployment can be retried or the Object store can be deleted from this state. | | `\\"DELETING_OBJECT_STORE\\"` | A deployed Object store is in this state when the Object store is being deleted. The Object store will be unavailable through S3 APIs in this state. It can be either deleted or move to the OBJECT_STORE_DELETION_FAILED state if the deletion fails. | \n * @param { String } extId The UUID of the Object store.\n * @param {Object} args Additional Arguments\n * @return {Promise<GetObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetObjectstoreApiResponse } and HTTP response\n */\n getObjectstoreById(extId, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n const postBody = null;\n // verify the required parameter 'extId' is set\n if (typeof extId === 'undefined' || extId === null) {\n throw new Error(\"Missing the required parameter 'extId' when calling getObjectstoreById\");\n }\n const pathParams = {\n 'extId': extId\n };\n const queryParams = {};\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n const authNames = ['basicAuthScheme'];\n const contentTypes = [];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_GetObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{extId}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Get a list of the SSL certificates of an Object store\n * Get a list of the SSL certificates which can be used to access an Object store.\n * @param { String } objectStoreExtId The UUID of the Object store.\n * @param {Object} opts Optional parameters defined for the operation\n * @param { Number } opts.$page A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.\n * @param { Number } opts.$limit A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.\n * @param { String } opts.$filter A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions.<br>\n * For example, filter '$filter=name eq 'karbon-ntnx-1.0' would filter the result on cluster name 'karbon-ntnx1.0', filter '$filter=startswith(name, 'C')' would filter on cluster name starting with 'C'.\n * @param { String } opts.$select A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned.\n * @param {Object} args Additional Arguments\n * @return {Promise<ListCertificatesApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link ListCertificatesApiResponse } and HTTP response\n */\n listCertificatesByObjectstoreId(objectStoreExtId, opts, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n opts = opts || {};\n const postBody = null;\n // verify the required parameter 'objectStoreExtId' is set\n if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {\n throw new Error(\"Missing the required parameter 'objectStoreExtId' when calling listCertificatesByObjectstoreId\");\n }\n const pathParams = {\n 'objectStoreExtId': objectStoreExtId\n };\n const queryParams = {\n ...(opts.hasOwnProperty('$page') ? {\n '$page': opts['$page']\n } : {}),\n ...(opts.hasOwnProperty('$limit') ? {\n '$limit': opts['$limit']\n } : {}),\n ...(opts.hasOwnProperty('$filter') ? {\n '$filter': opts['$filter']\n } : {}),\n ...(opts.hasOwnProperty('$select') ? {\n '$select': opts['$select']\n } : {})\n };\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n const authNames = ['basicAuthScheme'];\n const contentTypes = [];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_ListCertificatesApiResponse__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Get a list of the Object stores\n * Get a list of all the Object store details on the registered Prism Central.\n * @param {Object} opts Optional parameters defined for the operation\n * @param { Number } opts.$page A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.\n * @param { Number } opts.$limit A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.\n * @param { String } opts.$filter A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions.<br>\n * For example, filter '$filter=name eq 'karbon-ntnx-1.0' would filter the result on cluster name 'karbon-ntnx1.0', filter '$filter=startswith(name, 'C')' would filter on cluster name starting with 'C'.\n * @param { String } opts.$orderby A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, '$orderby=templateName desc' would get all templates sorted by templateName in descending order.\n * @param { String } opts.$expand A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby.\n * @param { String } opts.$select A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned.\n * @param {Object} args Additional Arguments\n * @return {Promise<ListObjectstoresApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link ListObjectstoresApiResponse } and HTTP response\n */\n listObjectstores(opts, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n opts = opts || {};\n const postBody = null;\n const pathParams = {};\n const queryParams = {\n ...(opts.hasOwnProperty('$page') ? {\n '$page': opts['$page']\n } : {}),\n ...(opts.hasOwnProperty('$limit') ? {\n '$limit': opts['$limit']\n } : {}),\n ...(opts.hasOwnProperty('$filter') ? {\n '$filter': opts['$filter']\n } : {}),\n ...(opts.hasOwnProperty('$orderby') ? {\n '$orderby': opts['$orderby']\n } : {}),\n ...(opts.hasOwnProperty('$expand') ? {\n '$expand': opts['$expand']\n } : {}),\n ...(opts.hasOwnProperty('$select') ? {\n '$select': opts['$select']\n } : {})\n };\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n const authNames = ['basicAuthScheme'];\n const contentTypes = [];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_ListObjectstoresApiResponse__WEBPACK_IMPORTED_MODULE_10__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Update an Object store\n * Update an Object store. The deployment of an Object store can be restarted from the state OBJECT_STORE_DEPLOYMENT_FAILED. \n * @param { Required<Pick<ObjectStore, 'name'>> & Partial<ObjectStore> } body specification\n * @param { String } extId The UUID of the Object store.\n * @param {Object} args Additional Arguments\n * @return {Promise<UpdateObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link UpdateObjectstoreApiResponse } and HTTP response\n */\n updateObjectstoreById(extId, body, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n let postBody = null;\n if (body instanceof _models_objects_v4_config_ObjectStore__WEBPACK_IMPORTED_MODULE_2__[\"default\"] && typeof body.toJson === 'function') {\n postBody = body.toJson();\n } else {\n postBody = body;\n }\n // verify the required parameter 'extId' is set\n if (typeof extId === 'undefined' || extId === null) {\n throw new Error(\"Missing the required parameter 'extId' when calling updateObjectstoreById\");\n }\n // verify the required parameter 'body' is set\n if (typeof postBody === 'undefined' || postBody === null) {\n throw new Error(\"Invalid body when calling updateObjectstoreById\");\n }\n const pathParams = {\n 'extId': extId\n };\n const queryParams = {};\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n _ApiClient__WEBPACK_IMPORTED_MODULE_0__.ApiClient.addEtagReferenceToHeader(body, headerParams);\n const authNames = ['basicAuthScheme'];\n const contentTypes = ['application/json'];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_UpdateObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_6__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{extId}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n}\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/apis/objectstores-endpoints.js?\n}");
|
|
243
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ObjectStoresApi: () => (/* binding */ ObjectStoresApi)\n/* harmony export */ });\n/* harmony import */ var _ApiClient__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ApiClient */ \"./target/generated-sources/swagger/src/ApiClient.js\");\n/* harmony import */ var _models_objects_v4_config_GetCertificateApiResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../models/objects/v4/config/GetCertificateApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/GetCertificateApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_ObjectStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../models/objects/v4/config/ObjectStore */ \"./target/generated-sources/swagger/src/models/objects/v4/config/ObjectStore.js\");\n/* harmony import */ var _models_objects_v4_config_CreateObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../models/objects/v4/config/CreateObjectstoreApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/CreateObjectstoreApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_ListCertificatesApiResponse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../models/objects/v4/config/ListCertificatesApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/ListCertificatesApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_DeleteObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../models/objects/v4/config/DeleteObjectstoreApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/DeleteObjectstoreApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_UpdateObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../models/objects/v4/config/UpdateObjectstoreApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/UpdateObjectstoreApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_GetObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../models/objects/v4/config/GetObjectstoreApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/GetObjectstoreApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_CreateCertificateApiResponse__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../models/objects/v4/config/CreateCertificateApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/CreateCertificateApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_GetCaApiResponse__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../models/objects/v4/config/GetCaApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/GetCaApiResponse.js\");\n/* harmony import */ var _models_objects_v4_config_ListObjectstoresApiResponse__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../models/objects/v4/config/ListObjectstoresApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/config/ListObjectstoresApiResponse.js\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! path */ \"./node_modules/path/path.js\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_11__);\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * ObjectStores service.\n * @version 4.0.3\n * @class ObjectStoresApi\n */\nclass ObjectStoresApi {\n #headersToSkip;\n\n /**\n * Make the default {@link ApiClient} class available for developers to be able to extend it and bring\n * their own fetch methods into the SDK\n */\n static get ApiClient() {\n return _ApiClient__WEBPACK_IMPORTED_MODULE_0__.ApiClient;\n }\n\n /**\n * Constructs a new ObjectStoresApi. \n * @alias module:api/ObjectStoresApi\n * @class\n * @param {module:ApiClient} [apiClient] Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\n constructor(apiClient) {\n this.apiClient = apiClient || _ApiClient__WEBPACK_IMPORTED_MODULE_0__.ApiClient.instance;\n this.#headersToSkip = new Set();\n this.#headersToSkip.add('authorization');\n this.#headersToSkip.add('cookie');\n this.#headersToSkip.add('host');\n this.#headersToSkip.add('user-agent');\n }\n\n /**\n * Create a SSL certificate for an Object store\n * This operation creates a new default certificate and keys. It also creates the alternate FQDNs and alternate IPs for the Object store. The certificate of an Object store can be created when it is in a OBJECT_STORE_AVAILABLE or OBJECT_STORE_CERT_CREATION_FAILED state. If the publicCert, privateKey, and ca values are provided in the request body, these values are used to create the new certificate. If these values are not provided, a new certificate will be generated if 'shouldGenerate' is set to true and if it is set to false, the existing certificate will be used as the new certificate. Optionally, a list of additional alternate FQDNs and alternate IPs can be provided. These alternateFqdns and alternateIps must be included in the CA certificate if it has been provided. \n * @param { Partial<String | ReadableStream> } body Accepts file path as a string or a file stream\n * @param { String } objectStoreExtId The UUID of the Object store.\n * @param {Object} args Additional Arguments\n * @return {Promise<CreateCertificateApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link CreateCertificateApiResponse } and HTTP response\n */\n createCertificate(objectStoreExtId, body, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n let postBody = null;\n let fs;\n try {\n fs = __webpack_require__(/*! fs */ \"?41da\");\n } catch (err) {}\n if (typeof body.pipe === 'function') {\n postBody = body;\n argMap[\"Content-Length\"] = fs.statSync(body.path).size;\n if (!argMap.hasOwnProperty(\"Content-Disposition\")) {\n argMap[\"Content-Disposition\"] = 'attachment; filename=\"' + path__WEBPACK_IMPORTED_MODULE_11___default().parse(body.path).base + '\"';\n }\n } else if (typeof body === 'string') {\n // body is a path string\n let path;\n try {\n path = __webpack_require__(/*! path */ \"./node_modules/path/path.js\");\n } catch (err) {\n throw new Error('Cannot find module \\'path\\'. Ensure you are using a Node.js environment. If not, use ReadableStream for body parameter.');\n }\n try {\n postBody = fs.createReadStream(body);\n argMap[\"Content-Length\"] = fs.statSync(body).size;\n if (!argMap.hasOwnProperty(\"Content-Disposition\")) {\n argMap[\"Content-Disposition\"] = 'attachment; filename=\"' + path.basename(body) + '\"';\n }\n } catch (err) {\n throw new Error('Cannot read file: ' + body + '. Error: ' + err.message);\n }\n } else {\n postBody = body;\n }\n // verify the required parameter 'objectStoreExtId' is set\n if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {\n throw new Error(\"Missing the required parameter 'objectStoreExtId' when calling createCertificate\");\n }\n // verify the required parameter 'body' is set\n if (typeof postBody === 'undefined' || postBody === null) {\n throw new Error(\"Invalid body when calling createCertificate\");\n }\n const pathParams = {\n 'objectStoreExtId': objectStoreExtId\n };\n const queryParams = {};\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n _ApiClient__WEBPACK_IMPORTED_MODULE_0__.ApiClient.addEtagReferenceToHeader(body, headerParams);\n const authNames = ['apiKeyAuthScheme', 'basicAuthScheme'];\n const contentTypes = ['application/octet-stream'];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_CreateCertificateApiResponse__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Create an Object store\n * Run the prechecks, create and start the deployment of an Object store on Prism Central.\n * @param { Required<Pick<ObjectStore, 'name'>> & Partial<ObjectStore> } body specification\n * @param {Object} args Additional Arguments\n * @return {Promise<CreateObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link CreateObjectstoreApiResponse } and HTTP response\n */\n createObjectstore(body, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n let postBody = null;\n if (body instanceof _models_objects_v4_config_ObjectStore__WEBPACK_IMPORTED_MODULE_2__[\"default\"] && typeof body.toJson === 'function') {\n postBody = body.toJson();\n } else {\n postBody = body;\n }\n // verify the required parameter 'body' is set\n if (typeof postBody === 'undefined' || postBody === null) {\n throw new Error(\"Invalid body when calling createObjectstore\");\n }\n const pathParams = {};\n const queryParams = {};\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n _ApiClient__WEBPACK_IMPORTED_MODULE_0__.ApiClient.addEtagReferenceToHeader(body, headerParams);\n const authNames = ['apiKeyAuthScheme', 'basicAuthScheme'];\n const contentTypes = ['application/json'];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_CreateObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Delete an Object store\n * Send a request to delete an Object store for the provided UUID and clean up its data. An Object store can only be deleted when it is in the state UNDEPLOYED_OBJECT_STORE, OBJECT_STORE_AVAILABLE, OBJECT_STORE_DEPLOYMENT_FAILED or OBJECT_STORE_DELETION_FAILED and does not contain any buckets. \n * @param { String } extId The UUID of the Object store.\n * @param {Object} args Additional Arguments\n * @return {Promise<DeleteObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link DeleteObjectstoreApiResponse } and HTTP response\n */\n deleteObjectstoreById(extId, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n const postBody = null;\n // verify the required parameter 'extId' is set\n if (typeof extId === 'undefined' || extId === null) {\n throw new Error(\"Missing the required parameter 'extId' when calling deleteObjectstoreById\");\n }\n const pathParams = {\n 'extId': extId\n };\n const queryParams = {};\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n const authNames = ['apiKeyAuthScheme', 'basicAuthScheme'];\n const contentTypes = [];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_DeleteObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{extId}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Download the certificate authority\n * Download the certificate authority of an Object store certificate.\n * @param { String } objectStoreExtId The UUID of the Object store.\n * @param { String } certificateExtId The UUID of the certificate of an Object store.\n * @param {Object} args Additional Arguments\n * @return {Promise<GetCaApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetCaApiResponse } and HTTP response\n */\n getCaByCertificateId(objectStoreExtId, certificateExtId, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n const postBody = null;\n // verify the required parameter 'objectStoreExtId' is set\n if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {\n throw new Error(\"Missing the required parameter 'objectStoreExtId' when calling getCaByCertificateId\");\n }\n // verify the required parameter 'certificateExtId' is set\n if (typeof certificateExtId === 'undefined' || certificateExtId === null) {\n throw new Error(\"Missing the required parameter 'certificateExtId' when calling getCaByCertificateId\");\n }\n const pathParams = {\n 'objectStoreExtId': objectStoreExtId,\n 'certificateExtId': certificateExtId\n };\n const queryParams = {};\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n const authNames = ['apiKeyAuthScheme', 'basicAuthScheme'];\n const contentTypes = [];\n const accepts = ['application/octet-stream', 'application/json'];\n const returnType = _models_objects_v4_config_GetCaApiResponse__WEBPACK_IMPORTED_MODULE_9__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates/{certificateExtId}/certificate-authority', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Get the details of an Object store certificate\n * Get the details of the SSL certificate which can be used to connect to an Object store.\n * @param { String } objectStoreExtId The UUID of the Object store.\n * @param { String } extId The UUID of the certificate of an Object store.\n * @param {Object} args Additional Arguments\n * @return {Promise<GetCertificateApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetCertificateApiResponse } and HTTP response\n */\n getCertificateById(objectStoreExtId, extId, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n const postBody = null;\n // verify the required parameter 'objectStoreExtId' is set\n if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {\n throw new Error(\"Missing the required parameter 'objectStoreExtId' when calling getCertificateById\");\n }\n // verify the required parameter 'extId' is set\n if (typeof extId === 'undefined' || extId === null) {\n throw new Error(\"Missing the required parameter 'extId' when calling getCertificateById\");\n }\n const pathParams = {\n 'objectStoreExtId': objectStoreExtId,\n 'extId': extId\n };\n const queryParams = {};\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n const authNames = ['apiKeyAuthScheme', 'basicAuthScheme'];\n const contentTypes = [];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_GetCertificateApiResponse__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates/{extId}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Get an Object store\n * Get an Object store for the provided UUID. `state` string (State of the Object store) Enum for the state of the Object store. | Enum | Description | | ----------- | ----------- | | `\\"DEPLOYING_OBJECT_STORE\\"` | The Object store will be in this state during an ongoing deployment of the Object store. The Object store will be unavailable through S3 APIs in this state. The Object store will move to the OBJECT_STORE_AVAILABLE state if the deployment succeeds, and to the OBJECT_STORE_DEPLOYMENT_FAILED state if the deployment fails. | | `\\"OBJECT_STORE_OPERATION_FAILED\\"` | The Object store is in this state when there is an error while performing an operation on the Object store. The Object store may not be available through S3 APIs in this state. | | `\\"OBJECT_STORE_CERT_CREATION_FAILED\\"` | An Object store enters this state if there is an error while creating the Object store certificate. Creating a new certificate can be retried from this state. The Object store may not be available through S3 APIs in this state. | | `\\"OBJECT_STORE_OPERATION_PENDING\\"` | The Object store is in this state during an ongoing operation on the Object store. The Object store may not be available through S3 APIs in this state. The Object store will enter the OBJECT_STORE_OPERATION_FAILED state if the operation fails, or the OBJECT_STORE_AVAILABLE state if the operation is successful. | | `\\"UNDEPLOYED_OBJECT_STORE\\"` | The Object store is in this state if it has not been deployed. | | `\\"CREATING_OBJECT_STORE_CERT\\"` | The Object store is in this state during a certificate creation for the Object store. The Object store will be unavailable through S3 APIs in this state. It will move to the OBJECT_STORE_AVAILABLE state if the certificate was created successfully, or to the OBJECT_STORE_CERT_CREATION_FAILED state if an error occurs while creating the certificate. | | `\\"OBJECT_STORE_AVAILABLE\\"` | An Object store is in this state if its deployment was successful, and there are no ongoing operations on the Object store. The Object store will be available through S3 APIs in this state. In this state, the Object store can be deleted or a new certificate can be created for this Object store. | | `\\"OBJECT_STORE_DELETION_FAILED\\"` | An Object store enters this state if there is an error deleting the Object store. The Object store will not be available through S3 APIs in this state. Deleting the Object store can be retried from this state. | | `\\"OBJECT_STORE_DEPLOYMENT_FAILED\\"` | An Object store enters this state when its deployment fails. The Object store deployment can be retried or the Object store can be deleted from this state. | | `\\"DELETING_OBJECT_STORE\\"` | A deployed Object store is in this state when the Object store is being deleted. The Object store will be unavailable through S3 APIs in this state. It can be either deleted or move to the OBJECT_STORE_DELETION_FAILED state if the deletion fails. | \n * @param { String } extId The UUID of the Object store.\n * @param {Object} args Additional Arguments\n * @return {Promise<GetObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetObjectstoreApiResponse } and HTTP response\n */\n getObjectstoreById(extId, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n const postBody = null;\n // verify the required parameter 'extId' is set\n if (typeof extId === 'undefined' || extId === null) {\n throw new Error(\"Missing the required parameter 'extId' when calling getObjectstoreById\");\n }\n const pathParams = {\n 'extId': extId\n };\n const queryParams = {};\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n const authNames = ['apiKeyAuthScheme', 'basicAuthScheme'];\n const contentTypes = [];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_GetObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{extId}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Get a list of the SSL certificates of an Object store\n * Get a list of the SSL certificates which can be used to access an Object store.\n * @param { String } objectStoreExtId The UUID of the Object store.\n * @param {Object} opts Optional parameters defined for the operation\n * @param { Number } opts.$page A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.\n * @param { Number } opts.$limit A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.\n * @param { String } opts.$filter A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions.<br>\n * For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'.\n * @param { String } opts.$select A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned.\n * @param {Object} args Additional Arguments\n * @return {Promise<ListCertificatesApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link ListCertificatesApiResponse } and HTTP response\n */\n listCertificatesByObjectstoreId(objectStoreExtId, opts, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n opts = opts || {};\n const postBody = null;\n // verify the required parameter 'objectStoreExtId' is set\n if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {\n throw new Error(\"Missing the required parameter 'objectStoreExtId' when calling listCertificatesByObjectstoreId\");\n }\n const pathParams = {\n 'objectStoreExtId': objectStoreExtId\n };\n const queryParams = {\n ...(opts.hasOwnProperty('$page') ? {\n '$page': opts['$page']\n } : {}),\n ...(opts.hasOwnProperty('$limit') ? {\n '$limit': opts['$limit']\n } : {}),\n ...(opts.hasOwnProperty('$filter') ? {\n '$filter': opts['$filter']\n } : {}),\n ...(opts.hasOwnProperty('$select') ? {\n '$select': opts['$select']\n } : {})\n };\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n const authNames = ['apiKeyAuthScheme', 'basicAuthScheme'];\n const contentTypes = [];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_ListCertificatesApiResponse__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Get a list of the Object stores\n * Get a list of all the Object store details on the registered Prism Central.\n * @param {Object} opts Optional parameters defined for the operation\n * @param { Number } opts.$page A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.\n * @param { Number } opts.$limit A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.\n * @param { String } opts.$filter A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions.<br>\n * For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'.\n * @param { String } opts.$orderby A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, '$orderby=templateName desc' would get all templates sorted by templateName in descending order.\n * @param { String } opts.$expand A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby.\n * @param { String } opts.$select A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned.\n * @param {Object} args Additional Arguments\n * @return {Promise<ListObjectstoresApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link ListObjectstoresApiResponse } and HTTP response\n */\n listObjectstores(opts, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n opts = opts || {};\n const postBody = null;\n const pathParams = {};\n const queryParams = {\n ...(opts.hasOwnProperty('$page') ? {\n '$page': opts['$page']\n } : {}),\n ...(opts.hasOwnProperty('$limit') ? {\n '$limit': opts['$limit']\n } : {}),\n ...(opts.hasOwnProperty('$filter') ? {\n '$filter': opts['$filter']\n } : {}),\n ...(opts.hasOwnProperty('$orderby') ? {\n '$orderby': opts['$orderby']\n } : {}),\n ...(opts.hasOwnProperty('$expand') ? {\n '$expand': opts['$expand']\n } : {}),\n ...(opts.hasOwnProperty('$select') ? {\n '$select': opts['$select']\n } : {})\n };\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n const authNames = ['apiKeyAuthScheme', 'basicAuthScheme'];\n const contentTypes = [];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_ListObjectstoresApiResponse__WEBPACK_IMPORTED_MODULE_10__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n\n /**\n * Update an Object store\n * Update an Object store. The deployment of an Object store can be restarted from the state OBJECT_STORE_DEPLOYMENT_FAILED. \n * @param { Required<Pick<ObjectStore, 'name'>> & Partial<ObjectStore> } body specification\n * @param { String } extId The UUID of the Object store.\n * @param {Object} args Additional Arguments\n * @return {Promise<UpdateObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link UpdateObjectstoreApiResponse } and HTTP response\n */\n updateObjectstoreById(extId, body, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n let postBody = null;\n if (body instanceof _models_objects_v4_config_ObjectStore__WEBPACK_IMPORTED_MODULE_2__[\"default\"] && typeof body.toJson === 'function') {\n postBody = body.toJson();\n } else {\n postBody = body;\n }\n // verify the required parameter 'extId' is set\n if (typeof extId === 'undefined' || extId === null) {\n throw new Error(\"Missing the required parameter 'extId' when calling updateObjectstoreById\");\n }\n // verify the required parameter 'body' is set\n if (typeof postBody === 'undefined' || postBody === null) {\n throw new Error(\"Invalid body when calling updateObjectstoreById\");\n }\n const pathParams = {\n 'extId': extId\n };\n const queryParams = {};\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n _ApiClient__WEBPACK_IMPORTED_MODULE_0__.ApiClient.addEtagReferenceToHeader(body, headerParams);\n const authNames = ['apiKeyAuthScheme', 'basicAuthScheme'];\n const contentTypes = ['application/json'];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_config_UpdateObjectstoreApiResponse__WEBPACK_IMPORTED_MODULE_6__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{extId}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n}\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/apis/objectstores-endpoints.js?\n}");
|
|
244
244
|
|
|
245
245
|
/***/ },
|
|
246
246
|
|
|
@@ -251,7 +251,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
251
251
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
252
252
|
|
|
253
253
|
"use strict";
|
|
254
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ StatsApi: () => (/* binding */ StatsApi)\n/* harmony export */ });\n/* harmony import */ var _ApiClient__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ApiClient */ \"./target/generated-sources/swagger/src/ApiClient.js\");\n/* harmony import */ var _models_objects_v4_stats_GetObjectstoreStatsApiResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../models/objects/v4/stats/GetObjectstoreStatsApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js\");\n/* harmony import */ var _models_common_v1_stats_DownSamplingOperator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../models/common/v1/stats/DownSamplingOperator */ \"./target/generated-sources/swagger/src/models/common/v1/stats/DownSamplingOperator.js\");\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.
|
|
254
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ StatsApi: () => (/* binding */ StatsApi)\n/* harmony export */ });\n/* harmony import */ var _ApiClient__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ApiClient */ \"./target/generated-sources/swagger/src/ApiClient.js\");\n/* harmony import */ var _models_objects_v4_stats_GetObjectstoreStatsApiResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../models/objects/v4/stats/GetObjectstoreStatsApiResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js\");\n/* harmony import */ var _models_common_v1_stats_DownSamplingOperator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../models/common/v1/stats/DownSamplingOperator */ \"./target/generated-sources/swagger/src/models/common/v1/stats/DownSamplingOperator.js\");\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * Stats service.\n * @version 4.0.3\n * @class StatsApi\n */\nclass StatsApi {\n #headersToSkip;\n\n /**\n * Make the default {@link ApiClient} class available for developers to be able to extend it and bring\n * their own fetch methods into the SDK\n */\n static get ApiClient() {\n return _ApiClient__WEBPACK_IMPORTED_MODULE_0__.ApiClient;\n }\n\n /**\n * Constructs a new StatsApi. \n * @alias module:api/StatsApi\n * @class\n * @param {module:ApiClient} [apiClient] Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\n constructor(apiClient) {\n this.apiClient = apiClient || _ApiClient__WEBPACK_IMPORTED_MODULE_0__.ApiClient.instance;\n this.#headersToSkip = new Set();\n this.#headersToSkip.add('authorization');\n this.#headersToSkip.add('cookie');\n this.#headersToSkip.add('host');\n this.#headersToSkip.add('user-agent');\n }\n\n /**\n * Get the Object store stats\n * Get the time series stats of an Object store. If $samplingInterval is not set, a value of 120 seconds will be used. If $statType is not set, the operator \\"SUM\\" will be used. The stats can be fetched for an Object store when it is in the state \\"OBJECT_STORE_AVAILABLE\\".\n * @param { String } extId The UUID of the Object store.\n * @param { Date } $startTime The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n * @param { Date } $endTime The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n * @param {Object} opts Optional parameters defined for the operation\n * @param { Number } opts.$samplingInterval The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30.\n * @param { DownSamplingOperator } opts.$statType The operator to use while performing down-sampling on stats data. Allowed values are SUM, MIN, MAX, AVG, COUNT and LAST.\n * @param { String } opts.$select A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned.\n * @param {Object} args Additional Arguments\n * @return {Promise<GetObjectstoreStatsApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetObjectstoreStatsApiResponse } and HTTP response\n */\n getObjectstoreStatsById(extId, $startTime, $endTime, opts, ...args) {\n let argMap = args.length > 0 ? args[0] : {};\n opts = opts || {};\n const postBody = null;\n // verify the required parameter 'extId' is set\n if (typeof extId === 'undefined' || extId === null) {\n throw new Error(\"Missing the required parameter 'extId' when calling getObjectstoreStatsById\");\n }\n // verify the required parameter '$startTime' is set\n if (typeof $startTime === 'undefined' || $startTime === null) {\n throw new Error(\"Missing the required parameter '$startTime' when calling getObjectstoreStatsById\");\n }\n // verify the required parameter '$endTime' is set\n if (typeof $endTime === 'undefined' || $endTime === null) {\n throw new Error(\"Missing the required parameter '$endTime' when calling getObjectstoreStatsById\");\n }\n const pathParams = {\n 'extId': extId\n };\n const queryParams = {\n ...{\n '$startTime': $startTime\n },\n ...{\n '$endTime': $endTime\n },\n ...(opts.hasOwnProperty('$samplingInterval') ? {\n '$samplingInterval': opts['$samplingInterval']\n } : {}),\n ...(opts.hasOwnProperty('$statType') ? {\n '$statType': opts['$statType']\n } : {}),\n ...(opts.hasOwnProperty('$select') ? {\n '$select': opts['$select']\n } : {})\n };\n let headersToInclude = {};\n Object.keys(argMap).forEach(header => {\n if (!this.#headersToSkip.has(header.toLowerCase())) {\n headersToInclude[header] = argMap[header];\n }\n });\n const headerParams = {\n ...headersToInclude\n };\n const formParams = {};\n const authNames = ['apiKeyAuthScheme', 'basicAuthScheme'];\n const contentTypes = [];\n const accepts = ['application/json'];\n const returnType = _models_objects_v4_stats_GetObjectstoreStatsApiResponse__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n return this.apiClient.callApi('/api/objects/v4.0/stats/object-stores/{extId}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);\n }\n}\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/apis/stats-endpoints.js?\n}");
|
|
255
255
|
|
|
256
256
|
/***/ },
|
|
257
257
|
|
|
@@ -273,7 +273,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
273
273
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
274
274
|
|
|
275
275
|
"use strict";
|
|
276
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ FQDN)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The FQDN model module.\n * @module Ntnx/FQDN\n * @version 4.0.2\n * @class FQDN\n */\nvar _FQDN_brand = /*#__PURE__*/new WeakSet();\nclass FQDN {\n /**\n * Constructs a new <code>FQDN</code>.\n * A fully qualified domain name that specifies its exact location in the tree hierarchy of the Domain Name System. \n * @alias module:Ntnx/FQDN\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _FQDN_brand);\n this.$objectType = \"common.v1.config.FQDN\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>FQDN</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/FQDN} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/FQDN} The populated <code>FQDN</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new FQDN();\n if (data.hasOwnProperty('value') && data.value !== null && data.value !== undefined) {\n obj.setValue(data['value']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns The fully qualified domain name of the host. \n * @return {string}\n */\n getValue() {\n return this.value;\n }\n\n /**\n * Sets The fully qualified domain name of the host. \n * @param {string} value The fully qualified domain name of the host. \n */\n setValue(value) {\n this.value = value;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"value\") {\n if (typeof this.value === 'undefined' || this.value === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validatePattern(this.value, /^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\\\.)+[a-zA-ZÀ-ÿ]{2,63}$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"does not satisfy required pattern: /^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\\\.)+[a-zA-ZÀ-ÿ]{2,63}$/\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * The fully qualified domain name of the host. \n * @memberof FQDN\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nFQDN.prototype.value = undefined;\nFQDN.prototype.$reserved = undefined;\nFQDN.prototype.$objectType = undefined;\nFQDN.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/FQDN.js?\n}");
|
|
276
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ FQDN)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The FQDN model module.\n * @module Ntnx/FQDN\n * @version 4.0.3\n * @class FQDN\n */\nvar _FQDN_brand = /*#__PURE__*/new WeakSet();\nclass FQDN {\n /**\n * Constructs a new <code>FQDN</code>.\n * A fully qualified domain name that specifies its exact location in the tree hierarchy of the Domain Name System. \n * @alias module:Ntnx/FQDN\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _FQDN_brand);\n this.$objectType = \"common.v1.config.FQDN\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>FQDN</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/FQDN} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/FQDN} The populated <code>FQDN</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new FQDN();\n if (data.hasOwnProperty('value') && data.value !== null && data.value !== undefined) {\n obj.setValue(data['value']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns The fully qualified domain name of the host. \n * @return {string}\n */\n getValue() {\n return this.value;\n }\n\n /**\n * Sets The fully qualified domain name of the host. \n * @param {string} value The fully qualified domain name of the host. \n */\n setValue(value) {\n this.value = value;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"value\") {\n if (typeof this.value === 'undefined' || this.value === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validatePattern(this.value, /^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\\\.)+[a-zA-ZÀ-ÿ]{2,63}$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"does not satisfy required pattern: /^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\\\.)+[a-zA-ZÀ-ÿ]{2,63}$/\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * The fully qualified domain name of the host. \n * @memberof FQDN\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nFQDN.prototype.value = undefined;\nFQDN.prototype.$reserved = undefined;\nFQDN.prototype.$objectType = undefined;\nFQDN.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/FQDN.js?\n}");
|
|
277
277
|
|
|
278
278
|
/***/ },
|
|
279
279
|
|
|
@@ -284,7 +284,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
284
284
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
285
285
|
|
|
286
286
|
"use strict";
|
|
287
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Flag)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The Flag model module.\n * @module Ntnx/Flag\n * @version 4.0.2\n * @class Flag\n */\nvar _Flag_brand = /*#__PURE__*/new WeakSet();\nclass Flag {\n /**\n * Constructs a new <code>Flag</code>.\n * Many entities in the Nutanix APIs carry flags. This object captures all the flags associated with that entity through this object. The field that hosts this type of object must have an attribute called x-bounded-map-keys that tells which flags are actually present for that entity. \n * @alias module:Ntnx/Flag\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _Flag_brand);\n this.$objectType = \"common.v1.config.Flag\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>Flag</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/Flag} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/Flag} The populated <code>Flag</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new Flag();\n if (data.hasOwnProperty('name') && data.name !== null && data.name !== undefined) {\n obj.setName(data['name']);\n }\n if (data.hasOwnProperty('value') && data.value !== null && data.value !== undefined) {\n obj.setValue(data['value']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns Name of the flag. \n * @return {string}\n */\n getName() {\n return this.name;\n }\n\n /**\n * Sets Name of the flag. \n * @param {string} name Name of the flag. \n */\n setName(name) {\n this.name = name;\n }\n\n /**\n * Returns Value of the flag. \n * @return {boolean}\n */\n getValue() {\n return this.value;\n }\n\n /**\n * Sets Value of the flag. \n * @param {boolean} value Value of the flag. \n */\n setValue(value) {\n this.value = value;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"name\") {\n if (typeof this.name === 'undefined' || this.name === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"name\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMaxLength(this.name, 128)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"name\", \"does not satisfy required maxLength constraint: 128\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMinLength(this.name, 3)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"name\", \"does not satisfy required minLength constraint: 3\");\n }\n }\n if (property === \"value\") {\n if (typeof this.value === 'undefined' || this.value === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * Name of the flag. \n * @memberof Flag\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nFlag.prototype.name = undefined;\n\n/**\n * Value of the flag. \n * @memberof Flag\n * @default false\n */\nFlag.prototype.value = false;\nFlag.prototype.$reserved = undefined;\nFlag.prototype.$objectType = undefined;\nFlag.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/Flag.js?\n}");
|
|
287
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Flag)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The Flag model module.\n * @module Ntnx/Flag\n * @version 4.0.3\n * @class Flag\n */\nvar _Flag_brand = /*#__PURE__*/new WeakSet();\nclass Flag {\n /**\n * Constructs a new <code>Flag</code>.\n * Many entities in the Nutanix APIs carry flags. This object captures all the flags associated with that entity through this object. The field that hosts this type of object must have an attribute called x-bounded-map-keys that tells which flags are actually present for that entity. \n * @alias module:Ntnx/Flag\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _Flag_brand);\n this.$objectType = \"common.v1.config.Flag\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>Flag</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/Flag} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/Flag} The populated <code>Flag</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new Flag();\n if (data.hasOwnProperty('name') && data.name !== null && data.name !== undefined) {\n obj.setName(data['name']);\n }\n if (data.hasOwnProperty('value') && data.value !== null && data.value !== undefined) {\n obj.setValue(data['value']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns Name of the flag. \n * @return {string}\n */\n getName() {\n return this.name;\n }\n\n /**\n * Sets Name of the flag. \n * @param {string} name Name of the flag. \n */\n setName(name) {\n this.name = name;\n }\n\n /**\n * Returns Value of the flag. \n * @return {boolean}\n */\n getValue() {\n return this.value;\n }\n\n /**\n * Sets Value of the flag. \n * @param {boolean} value Value of the flag. \n */\n setValue(value) {\n this.value = value;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"name\") {\n if (typeof this.name === 'undefined' || this.name === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"name\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMaxLength(this.name, 128)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"name\", \"does not satisfy required maxLength constraint: 128\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMinLength(this.name, 3)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"name\", \"does not satisfy required minLength constraint: 3\");\n }\n }\n if (property === \"value\") {\n if (typeof this.value === 'undefined' || this.value === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * Name of the flag. \n * @memberof Flag\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nFlag.prototype.name = undefined;\n\n/**\n * Value of the flag. \n * @memberof Flag\n * @default false\n */\nFlag.prototype.value = false;\nFlag.prototype.$reserved = undefined;\nFlag.prototype.$objectType = undefined;\nFlag.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/Flag.js?\n}");
|
|
288
288
|
|
|
289
289
|
/***/ },
|
|
290
290
|
|
|
@@ -295,7 +295,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
295
295
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
296
296
|
|
|
297
297
|
"use strict";
|
|
298
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ IPAddress)\n/* harmony export */ });\n/* harmony import */ var _IPv4Address__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IPv4Address */ \"./target/generated-sources/swagger/src/models/common/v1/config/IPv4Address.js\");\n/* harmony import */ var _IPv6Address__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./IPv6Address */ \"./target/generated-sources/swagger/src/models/common/v1/config/IPv6Address.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n/**\n * The IPAddress model module.\n * @module Ntnx/IPAddress\n * @version 4.0.2\n * @class IPAddress\n */\nvar _IPAddress_brand = /*#__PURE__*/new WeakSet();\nclass IPAddress {\n /**\n * Constructs a new <code>IPAddress</code>.\n * An unique address that identifies a device on the internet or a local network in IPv4 or IPv6 format. \n * @alias module:Ntnx/IPAddress\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _IPAddress_brand);\n this.$objectType = \"common.v1.config.IPAddress\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>IPAddress</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/IPAddress} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/IPAddress} The populated <code>IPAddress</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new IPAddress();\n if (data.hasOwnProperty('ipv4') && data.ipv4 !== null && data.ipv4 !== undefined) {\n obj.setIpv4(_IPv4Address__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['ipv4']));\n }\n if (data.hasOwnProperty('ipv6') && data.ipv6 !== null && data.ipv6 !== undefined) {\n obj.setIpv6(_IPv6Address__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['ipv6']));\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {IPv4Address}\n */\n getIpv4() {\n return this.ipv4;\n }\n\n /**\n * @param {IPv4Address} ipv4\n */\n setIpv4(ipv4) {\n this.ipv4 = ipv4;\n }\n\n /**\n * @return {IPv6Address}\n */\n getIpv6() {\n return this.ipv6;\n }\n\n /**\n * @param {IPv6Address} ipv6\n */\n setIpv6(ipv6) {\n this.ipv6 = ipv6;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n hasIpv4() {\n return !(typeof this.ipv4 === 'undefined' || this.ipv4 === null);\n }\n hasIpv6() {\n return !(typeof this.ipv6 === 'undefined' || this.ipv6 === null);\n }\n isValid() {\n return this.hasIpv4() || this.hasIpv6();\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getIpv4() !== 'undefined' && this.getIpv4() !== null ? {\n 'ipv4': this.getIpv4().toJson(false)\n } : {}),\n ...(typeof this.getIpv6() !== 'undefined' && this.getIpv6() !== null ? {\n 'ipv6': this.getIpv6().toJson(false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getIpv4() !== 'undefined' && this.getIpv4() !== null ? {\n 'ipv4': this.getIpv4().toJson(false)\n } : {}),\n ...(typeof this.getIpv6() !== 'undefined' && this.getIpv6() !== null ? {\n 'ipv6': this.getIpv6().toJson(false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"ipv4\") {\n if (typeof this.ipv4 === 'undefined' || this.ipv4 === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"ipv4\", \"undefined or null\");\n }\n }\n if (property === \"ipv6\") {\n if (typeof this.ipv6 === 'undefined' || this.ipv6 === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"ipv6\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof IPAddress\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nIPAddress.prototype.ipv4 = undefined;\n\n/**\n * @memberof IPAddress\n */\nIPAddress.prototype.ipv6 = undefined;\nIPAddress.prototype.$reserved = undefined;\nIPAddress.prototype.$objectType = undefined;\nIPAddress.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/IPAddress.js?\n}");
|
|
298
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ IPAddress)\n/* harmony export */ });\n/* harmony import */ var _IPv4Address__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IPv4Address */ \"./target/generated-sources/swagger/src/models/common/v1/config/IPv4Address.js\");\n/* harmony import */ var _IPv6Address__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./IPv6Address */ \"./target/generated-sources/swagger/src/models/common/v1/config/IPv6Address.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n/**\n * The IPAddress model module.\n * @module Ntnx/IPAddress\n * @version 4.0.3\n * @class IPAddress\n */\nvar _IPAddress_brand = /*#__PURE__*/new WeakSet();\nclass IPAddress {\n /**\n * Constructs a new <code>IPAddress</code>.\n * An unique address that identifies a device on the internet or a local network in IPv4 or IPv6 format. \n * @alias module:Ntnx/IPAddress\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _IPAddress_brand);\n this.$objectType = \"common.v1.config.IPAddress\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>IPAddress</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/IPAddress} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/IPAddress} The populated <code>IPAddress</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new IPAddress();\n if (data.hasOwnProperty('ipv4') && data.ipv4 !== null && data.ipv4 !== undefined) {\n obj.setIpv4(_IPv4Address__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['ipv4']));\n }\n if (data.hasOwnProperty('ipv6') && data.ipv6 !== null && data.ipv6 !== undefined) {\n obj.setIpv6(_IPv6Address__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['ipv6']));\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {IPv4Address}\n */\n getIpv4() {\n return this.ipv4;\n }\n\n /**\n * @param {IPv4Address} ipv4\n */\n setIpv4(ipv4) {\n this.ipv4 = ipv4;\n }\n\n /**\n * @return {IPv6Address}\n */\n getIpv6() {\n return this.ipv6;\n }\n\n /**\n * @param {IPv6Address} ipv6\n */\n setIpv6(ipv6) {\n this.ipv6 = ipv6;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n hasIpv4() {\n return !(typeof this.ipv4 === 'undefined' || this.ipv4 === null);\n }\n hasIpv6() {\n return !(typeof this.ipv6 === 'undefined' || this.ipv6 === null);\n }\n isValid() {\n return this.hasIpv4() || this.hasIpv6();\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getIpv4() !== 'undefined' && this.getIpv4() !== null ? {\n 'ipv4': this.getIpv4().toJson(false)\n } : {}),\n ...(typeof this.getIpv6() !== 'undefined' && this.getIpv6() !== null ? {\n 'ipv6': this.getIpv6().toJson(false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getIpv4() !== 'undefined' && this.getIpv4() !== null ? {\n 'ipv4': this.getIpv4().toJson(false)\n } : {}),\n ...(typeof this.getIpv6() !== 'undefined' && this.getIpv6() !== null ? {\n 'ipv6': this.getIpv6().toJson(false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"ipv4\") {\n if (typeof this.ipv4 === 'undefined' || this.ipv4 === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"ipv4\", \"undefined or null\");\n }\n }\n if (property === \"ipv6\") {\n if (typeof this.ipv6 === 'undefined' || this.ipv6 === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"ipv6\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof IPAddress\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nIPAddress.prototype.ipv4 = undefined;\n\n/**\n * @memberof IPAddress\n */\nIPAddress.prototype.ipv6 = undefined;\nIPAddress.prototype.$reserved = undefined;\nIPAddress.prototype.$objectType = undefined;\nIPAddress.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/IPAddress.js?\n}");
|
|
299
299
|
|
|
300
300
|
/***/ },
|
|
301
301
|
|
|
@@ -306,7 +306,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
306
306
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
307
307
|
|
|
308
308
|
"use strict";
|
|
309
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ IPv4Address)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The IPv4Address model module.\n * @module Ntnx/IPv4Address\n * @version 4.0.2\n * @class IPv4Address\n * \n * @param { string } value The IPv4 address of the host. \n */\nvar _IPv4Address_brand = /*#__PURE__*/new WeakSet();\nclass IPv4Address {\n /**\n * Constructs a new <code>IPv4Address</code>.\n * An unique address that identifies a device on the internet or a local network in IPv4 format. \n * @alias module:Ntnx/IPv4Address\n * \n * @param { string } value The IPv4 address of the host. \n */\n constructor(value) {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _IPv4Address_brand);\n this.value = value;\n this.$objectType = \"common.v1.config.IPv4Address\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>IPv4Address</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/IPv4Address} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/IPv4Address} The populated <code>IPv4Address</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new IPv4Address();\n if (data.hasOwnProperty('value') && data.value !== null && data.value !== undefined) {\n obj.setValue(data['value']);\n }\n if (data.hasOwnProperty('prefixLength') && data.prefixLength !== null && data.prefixLength !== undefined) {\n obj.setPrefixLength(data['prefixLength']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns The IPv4 address of the host. \n * @return {string}\n */\n getValue() {\n return this.value;\n }\n\n /**\n * Sets The IPv4 address of the host. \n * @param {string} value The IPv4 address of the host. \n */\n setValue(value) {\n this.value = value;\n }\n\n /**\n * Returns The prefix length of the network to which this host IPv4 address belongs. \n * minimum: 0\n * maximum: 32\n * @return {Number}\n */\n getPrefixLength() {\n return this.prefixLength;\n }\n\n /**\n * Sets The prefix length of the network to which this host IPv4 address belongs. \n * @param {Number} prefixLength The prefix length of the network to which this host IPv4 address belongs. \n */\n setPrefixLength(prefixLength) {\n this.prefixLength = prefixLength;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getPrefixLength() !== 'undefined' && this.getPrefixLength() !== null ? {\n 'prefixLength': this.getPrefixLength()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getPrefixLength() !== 'undefined' && this.getPrefixLength() !== null ? {\n 'prefixLength': this.getPrefixLength()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [\"value\"];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"value\") {\n if (typeof this.value === 'undefined' || this.value === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validatePattern(this.value, /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"does not satisfy required pattern: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/\");\n }\n }\n if (property === \"prefixLength\") {\n if (typeof this.prefixLength === 'undefined' || this.prefixLength === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"prefixLength\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMaximum(this.prefixLength, 32)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"prefixLength\", \"does not satisfy required maximum constraint: 32\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMinimum(this.prefixLength, 0)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"prefixLength\", \"does not satisfy required minimum constraint: 0\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * The IPv4 address of the host. \n * @memberof IPv4Address\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nIPv4Address.prototype.value = undefined;\n\n/**\n * The prefix length of the network to which this host IPv4 address belongs. \n * @memberof IPv4Address\n * @default 32\n */\nIPv4Address.prototype.prefixLength = 32;\nIPv4Address.prototype.$reserved = undefined;\nIPv4Address.prototype.$objectType = undefined;\nIPv4Address.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/IPv4Address.js?\n}");
|
|
309
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ IPv4Address)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The IPv4Address model module.\n * @module Ntnx/IPv4Address\n * @version 4.0.3\n * @class IPv4Address\n * \n * @param { string } value The IPv4 address of the host. \n */\nvar _IPv4Address_brand = /*#__PURE__*/new WeakSet();\nclass IPv4Address {\n /**\n * Constructs a new <code>IPv4Address</code>.\n * An unique address that identifies a device on the internet or a local network in IPv4 format. \n * @alias module:Ntnx/IPv4Address\n * \n * @param { string } value The IPv4 address of the host. \n */\n constructor(value) {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _IPv4Address_brand);\n this.value = value;\n this.$objectType = \"common.v1.config.IPv4Address\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>IPv4Address</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/IPv4Address} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/IPv4Address} The populated <code>IPv4Address</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new IPv4Address();\n if (data.hasOwnProperty('value') && data.value !== null && data.value !== undefined) {\n obj.setValue(data['value']);\n }\n if (data.hasOwnProperty('prefixLength') && data.prefixLength !== null && data.prefixLength !== undefined) {\n obj.setPrefixLength(data['prefixLength']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns The IPv4 address of the host. \n * @return {string}\n */\n getValue() {\n return this.value;\n }\n\n /**\n * Sets The IPv4 address of the host. \n * @param {string} value The IPv4 address of the host. \n */\n setValue(value) {\n this.value = value;\n }\n\n /**\n * Returns The prefix length of the network to which this host IPv4 address belongs. \n * minimum: 0\n * maximum: 32\n * @return {Number}\n */\n getPrefixLength() {\n return this.prefixLength;\n }\n\n /**\n * Sets The prefix length of the network to which this host IPv4 address belongs. \n * @param {Number} prefixLength The prefix length of the network to which this host IPv4 address belongs. \n */\n setPrefixLength(prefixLength) {\n this.prefixLength = prefixLength;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getPrefixLength() !== 'undefined' && this.getPrefixLength() !== null ? {\n 'prefixLength': this.getPrefixLength()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getPrefixLength() !== 'undefined' && this.getPrefixLength() !== null ? {\n 'prefixLength': this.getPrefixLength()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [\"value\"];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"value\") {\n if (typeof this.value === 'undefined' || this.value === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validatePattern(this.value, /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"does not satisfy required pattern: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/\");\n }\n }\n if (property === \"prefixLength\") {\n if (typeof this.prefixLength === 'undefined' || this.prefixLength === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"prefixLength\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMaximum(this.prefixLength, 32)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"prefixLength\", \"does not satisfy required maximum constraint: 32\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMinimum(this.prefixLength, 0)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"prefixLength\", \"does not satisfy required minimum constraint: 0\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * The IPv4 address of the host. \n * @memberof IPv4Address\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nIPv4Address.prototype.value = undefined;\n\n/**\n * The prefix length of the network to which this host IPv4 address belongs. \n * @memberof IPv4Address\n * @default 32\n */\nIPv4Address.prototype.prefixLength = 32;\nIPv4Address.prototype.$reserved = undefined;\nIPv4Address.prototype.$objectType = undefined;\nIPv4Address.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/IPv4Address.js?\n}");
|
|
310
310
|
|
|
311
311
|
/***/ },
|
|
312
312
|
|
|
@@ -317,7 +317,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
317
317
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
318
318
|
|
|
319
319
|
"use strict";
|
|
320
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ IPv6Address)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The IPv6Address model module.\n * @module Ntnx/IPv6Address\n * @version 4.0.2\n * @class IPv6Address\n * \n * @param { string } value The IPv6 address of the host. \n */\nvar _IPv6Address_brand = /*#__PURE__*/new WeakSet();\nclass IPv6Address {\n /**\n * Constructs a new <code>IPv6Address</code>.\n * An unique address that identifies a device on the internet or a local network in IPv6 format. \n * @alias module:Ntnx/IPv6Address\n * \n * @param { string } value The IPv6 address of the host. \n */\n constructor(value) {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _IPv6Address_brand);\n this.value = value;\n this.$objectType = \"common.v1.config.IPv6Address\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>IPv6Address</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/IPv6Address} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/IPv6Address} The populated <code>IPv6Address</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new IPv6Address();\n if (data.hasOwnProperty('value') && data.value !== null && data.value !== undefined) {\n obj.setValue(data['value']);\n }\n if (data.hasOwnProperty('prefixLength') && data.prefixLength !== null && data.prefixLength !== undefined) {\n obj.setPrefixLength(data['prefixLength']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns The IPv6 address of the host. \n * @return {string}\n */\n getValue() {\n return this.value;\n }\n\n /**\n * Sets The IPv6 address of the host. \n * @param {string} value The IPv6 address of the host. \n */\n setValue(value) {\n this.value = value;\n }\n\n /**\n * Returns The prefix length of the network to which this host IPv6 address belongs. \n * minimum: 0\n * maximum: 128\n * @return {Number}\n */\n getPrefixLength() {\n return this.prefixLength;\n }\n\n /**\n * Sets The prefix length of the network to which this host IPv6 address belongs. \n * @param {Number} prefixLength The prefix length of the network to which this host IPv6 address belongs. \n */\n setPrefixLength(prefixLength) {\n this.prefixLength = prefixLength;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getPrefixLength() !== 'undefined' && this.getPrefixLength() !== null ? {\n 'prefixLength': this.getPrefixLength()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getPrefixLength() !== 'undefined' && this.getPrefixLength() !== null ? {\n 'prefixLength': this.getPrefixLength()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [\"value\"];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"value\") {\n if (typeof this.value === 'undefined' || this.value === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validatePattern(this.value, /^(?:(?:(?:[A-Fa-f0-9]{1,4}:){6}|(?=(?:[A-Fa-f0-9]{0,4}:){0,6}(?:[0-9]{1,3}\\\\.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){0,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[A-Fa-f0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}|(?=(?:[A-Fa-f0-9]{0,4}:){0,7}[A-Fa-f0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[A-Fa-f0-9]{1,4}:){7}:|:(:[A-Fa-f0-9]{1,4}){7})$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"does not satisfy required pattern: /^(?:(?:(?:[A-Fa-f0-9]{1,4}:){6}|(?=(?:[A-Fa-f0-9]{0,4}:){0,6}(?:[0-9]{1,3}\\\\.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){0,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[A-Fa-f0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}|(?=(?:[A-Fa-f0-9]{0,4}:){0,7}[A-Fa-f0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[A-Fa-f0-9]{1,4}:){7}:|:(:[A-Fa-f0-9]{1,4}){7})$/\");\n }\n }\n if (property === \"prefixLength\") {\n if (typeof this.prefixLength === 'undefined' || this.prefixLength === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"prefixLength\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMaximum(this.prefixLength, 128)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"prefixLength\", \"does not satisfy required maximum constraint: 128\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMinimum(this.prefixLength, 0)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"prefixLength\", \"does not satisfy required minimum constraint: 0\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * The IPv6 address of the host. \n * @memberof IPv6Address\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nIPv6Address.prototype.value = undefined;\n\n/**\n * The prefix length of the network to which this host IPv6 address belongs. \n * @memberof IPv6Address\n * @default 128\n */\nIPv6Address.prototype.prefixLength = 128;\nIPv6Address.prototype.$reserved = undefined;\nIPv6Address.prototype.$objectType = undefined;\nIPv6Address.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/IPv6Address.js?\n}");
|
|
320
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ IPv6Address)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The IPv6Address model module.\n * @module Ntnx/IPv6Address\n * @version 4.0.3\n * @class IPv6Address\n * \n * @param { string } value The IPv6 address of the host. \n */\nvar _IPv6Address_brand = /*#__PURE__*/new WeakSet();\nclass IPv6Address {\n /**\n * Constructs a new <code>IPv6Address</code>.\n * An unique address that identifies a device on the internet or a local network in IPv6 format. \n * @alias module:Ntnx/IPv6Address\n * \n * @param { string } value The IPv6 address of the host. \n */\n constructor(value) {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _IPv6Address_brand);\n this.value = value;\n this.$objectType = \"common.v1.config.IPv6Address\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>IPv6Address</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/IPv6Address} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/IPv6Address} The populated <code>IPv6Address</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new IPv6Address();\n if (data.hasOwnProperty('value') && data.value !== null && data.value !== undefined) {\n obj.setValue(data['value']);\n }\n if (data.hasOwnProperty('prefixLength') && data.prefixLength !== null && data.prefixLength !== undefined) {\n obj.setPrefixLength(data['prefixLength']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns The IPv6 address of the host. \n * @return {string}\n */\n getValue() {\n return this.value;\n }\n\n /**\n * Sets The IPv6 address of the host. \n * @param {string} value The IPv6 address of the host. \n */\n setValue(value) {\n this.value = value;\n }\n\n /**\n * Returns The prefix length of the network to which this host IPv6 address belongs. \n * minimum: 0\n * maximum: 128\n * @return {Number}\n */\n getPrefixLength() {\n return this.prefixLength;\n }\n\n /**\n * Sets The prefix length of the network to which this host IPv6 address belongs. \n * @param {Number} prefixLength The prefix length of the network to which this host IPv6 address belongs. \n */\n setPrefixLength(prefixLength) {\n this.prefixLength = prefixLength;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getPrefixLength() !== 'undefined' && this.getPrefixLength() !== null ? {\n 'prefixLength': this.getPrefixLength()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getPrefixLength() !== 'undefined' && this.getPrefixLength() !== null ? {\n 'prefixLength': this.getPrefixLength()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [\"value\"];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"value\") {\n if (typeof this.value === 'undefined' || this.value === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validatePattern(this.value, /^(?:(?:(?:[A-Fa-f0-9]{1,4}:){6}|(?=(?:[A-Fa-f0-9]{0,4}:){0,6}(?:[0-9]{1,3}\\\\.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){0,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[A-Fa-f0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}|(?=(?:[A-Fa-f0-9]{0,4}:){0,7}[A-Fa-f0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[A-Fa-f0-9]{1,4}:){7}:|:(:[A-Fa-f0-9]{1,4}){7})$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"does not satisfy required pattern: /^(?:(?:(?:[A-Fa-f0-9]{1,4}:){6}|(?=(?:[A-Fa-f0-9]{0,4}:){0,6}(?:[0-9]{1,3}\\\\.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){0,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[A-Fa-f0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}|(?=(?:[A-Fa-f0-9]{0,4}:){0,7}[A-Fa-f0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[A-Fa-f0-9]{1,4}:){7}:|:(:[A-Fa-f0-9]{1,4}){7})$/\");\n }\n }\n if (property === \"prefixLength\") {\n if (typeof this.prefixLength === 'undefined' || this.prefixLength === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"prefixLength\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMaximum(this.prefixLength, 128)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"prefixLength\", \"does not satisfy required maximum constraint: 128\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMinimum(this.prefixLength, 0)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"prefixLength\", \"does not satisfy required minimum constraint: 0\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * The IPv6 address of the host. \n * @memberof IPv6Address\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nIPv6Address.prototype.value = undefined;\n\n/**\n * The prefix length of the network to which this host IPv6 address belongs. \n * @memberof IPv6Address\n * @default 128\n */\nIPv6Address.prototype.prefixLength = 128;\nIPv6Address.prototype.$reserved = undefined;\nIPv6Address.prototype.$objectType = undefined;\nIPv6Address.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/IPv6Address.js?\n}");
|
|
321
321
|
|
|
322
322
|
/***/ },
|
|
323
323
|
|
|
@@ -328,7 +328,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
328
328
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
329
329
|
|
|
330
330
|
"use strict";
|
|
331
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ KVPair)\n/* harmony export */ });\n/* harmony import */ var _MapOfStringWrapper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MapOfStringWrapper */ \"./target/generated-sources/swagger/src/models/common/v1/config/MapOfStringWrapper.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n/**\n * The KVPair model module.\n * @module Ntnx/KVPair\n * @version 4.0.2\n * @class KVPair\n */\nvar _KVPair_brand = /*#__PURE__*/new WeakSet();\nclass KVPair {\n /**\n * Constructs a new <code>KVPair</code>.\n * A map describing a set of keys and their corresponding values. \n * @alias module:Ntnx/KVPair\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _KVPair_brand);\n this.$objectType = \"common.v1.config.KVPair\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>KVPair</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/KVPair} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/KVPair} The populated <code>KVPair</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new KVPair();\n if (data.hasOwnProperty('name') && data.name !== null && data.name !== undefined) {\n obj.setName(data['name']);\n }\n if (data.hasOwnProperty('value') && data.value !== null && data.value !== undefined) {\n if (Array.isArray(data['value'])) {\n if (data['value'].length === 0) {\n obj.setValue([]);\n } else {\n itemArr = [];\n items = data['value'];\n if (items[0].hasOwnProperty('$objectType')) {\n discriminator = items[0]['$objectType'];\n } else {\n discriminator = typeof items[0];\n }\n for (i = 0; i < items.length; i++) {\n switch (discriminator) {\n case 'string':\n itemArr.push(items[i]);\n break;\n case 'common.v1.config.MapOfStringWrapper':\n item = _MapOfStringWrapper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n break;\n case 'integer':\n itemArr.push(items[i]);\n break;\n case 'number':\n itemArr.push(items[i]);\n break;\n default:\n throw \"Unknown list of type \" + discriminator + \" in data\";\n }\n }\n obj.setValue(itemArr);\n }\n } else {\n if (data['value'].hasOwnProperty('$objectType')) {\n discriminator = data['value']['$objectType'];\n } else {\n discriminator = typeof data['value'];\n }\n switch (discriminator) {\n case 'string':\n obj.setValue(data['value']);\n break;\n case 'boolean':\n obj.setValue(data['value']);\n break;\n case 'number':\n obj.setValue(data['value']);\n break;\n case 'object':\n obj.setValue(new Map(Object.entries(data['value'])));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns The key of the key-value pair. \n * @return {string}\n */\n getName() {\n return this.name;\n }\n\n /**\n * Sets The key of the key-value pair. \n * @param {string} name The key of the key-value pair. \n */\n setName(name) {\n this.name = name;\n }\n\n /**\n * Returns The value associated with the key for this key-value pair\n * @return {string | Number | boolean | string[] | Object<string, string> | MapOfStringWrapper[] | integer[]}\n */\n getValue() {\n return this.value;\n }\n\n /**\n * Sets The value associated with the key for this key-value pair\n * @param {string | Number | boolean | string[] | Object<string, string> | MapOfStringWrapper[] | integer[]} value The value associated with the key for this key-value pair\n */\n setValue(value) {\n this.value = value;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': typeof this.getValue().toJson !== \"undefined\" ? this.getValue().toJson(false) : Array.isArray(this.getValue()) ? this.getValue().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_KVPair_brand, this, _toJsonMapType).call(this, this.getValue(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': typeof this.getValue().toJson !== \"undefined\" ? this.getValue().toJson() : Array.isArray(this.getValue()) ? this.getValue().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_KVPair_brand, this, _toJsonMapType).call(this, this.getValue())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"name\") {\n if (typeof this.name === 'undefined' || this.name === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"name\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].validateMaxLength(this.name, 128)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"name\", \"does not satisfy required maxLength constraint: 128\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].validateMinLength(this.name, 3)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"name\", \"does not satisfy required minLength constraint: 3\");\n }\n }\n if (property === \"value\") {\n if (typeof this.value === 'undefined' || this.value === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"value\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * The key of the key-value pair. \n * @memberof KVPair\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nKVPair.prototype.name = undefined;\n\n/**\n * The value associated with the key for this key-value pair\n * @memberof KVPair\n */\nKVPair.prototype.value = undefined;\nKVPair.prototype.$reserved = undefined;\nKVPair.prototype.$objectType = undefined;\nKVPair.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/KVPair.js?\n}");
|
|
331
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ KVPair)\n/* harmony export */ });\n/* harmony import */ var _MapOfStringWrapper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MapOfStringWrapper */ \"./target/generated-sources/swagger/src/models/common/v1/config/MapOfStringWrapper.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n/**\n * The KVPair model module.\n * @module Ntnx/KVPair\n * @version 4.0.3\n * @class KVPair\n */\nvar _KVPair_brand = /*#__PURE__*/new WeakSet();\nclass KVPair {\n /**\n * Constructs a new <code>KVPair</code>.\n * A map describing a set of keys and their corresponding values. \n * @alias module:Ntnx/KVPair\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _KVPair_brand);\n this.$objectType = \"common.v1.config.KVPair\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>KVPair</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/KVPair} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/KVPair} The populated <code>KVPair</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new KVPair();\n if (data.hasOwnProperty('name') && data.name !== null && data.name !== undefined) {\n obj.setName(data['name']);\n }\n if (data.hasOwnProperty('value') && data.value !== null && data.value !== undefined) {\n if (Array.isArray(data['value'])) {\n if (data['value'].length === 0) {\n obj.setValue([]);\n } else {\n itemArr = [];\n items = data['value'];\n if (items[0].hasOwnProperty('$objectType')) {\n discriminator = items[0]['$objectType'];\n } else {\n discriminator = typeof items[0];\n }\n for (i = 0; i < items.length; i++) {\n switch (discriminator) {\n case 'string':\n itemArr.push(items[i]);\n break;\n case 'common.v1.config.MapOfStringWrapper':\n item = _MapOfStringWrapper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n break;\n case 'integer':\n itemArr.push(items[i]);\n break;\n case 'number':\n itemArr.push(items[i]);\n break;\n default:\n throw \"Unknown list of type \" + discriminator + \" in data\";\n }\n }\n obj.setValue(itemArr);\n }\n } else {\n if (data['value'].hasOwnProperty('$objectType')) {\n discriminator = data['value']['$objectType'];\n } else {\n discriminator = typeof data['value'];\n }\n switch (discriminator) {\n case 'string':\n obj.setValue(data['value']);\n break;\n case 'boolean':\n obj.setValue(data['value']);\n break;\n case 'number':\n obj.setValue(data['value']);\n break;\n case 'object':\n obj.setValue(new Map(Object.entries(data['value'])));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns The key of the key-value pair. \n * @return {string}\n */\n getName() {\n return this.name;\n }\n\n /**\n * Sets The key of the key-value pair. \n * @param {string} name The key of the key-value pair. \n */\n setName(name) {\n this.name = name;\n }\n\n /**\n * Returns The value associated with the key for this key-value pair\n * @return {string | Number | boolean | string[] | Object<string, string> | MapOfStringWrapper[] | integer[]}\n */\n getValue() {\n return this.value;\n }\n\n /**\n * Sets The value associated with the key for this key-value pair\n * @param {string | Number | boolean | string[] | Object<string, string> | MapOfStringWrapper[] | integer[]} value The value associated with the key for this key-value pair\n */\n setValue(value) {\n this.value = value;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': typeof this.getValue().toJson !== \"undefined\" ? this.getValue().toJson(false) : Array.isArray(this.getValue()) ? this.getValue().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_KVPair_brand, this, _toJsonMapType).call(this, this.getValue(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': typeof this.getValue().toJson !== \"undefined\" ? this.getValue().toJson() : Array.isArray(this.getValue()) ? this.getValue().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_KVPair_brand, this, _toJsonMapType).call(this, this.getValue())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"name\") {\n if (typeof this.name === 'undefined' || this.name === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"name\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].validateMaxLength(this.name, 128)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"name\", \"does not satisfy required maxLength constraint: 128\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].validateMinLength(this.name, 3)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"name\", \"does not satisfy required minLength constraint: 3\");\n }\n }\n if (property === \"value\") {\n if (typeof this.value === 'undefined' || this.value === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"value\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * The key of the key-value pair. \n * @memberof KVPair\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nKVPair.prototype.name = undefined;\n\n/**\n * The value associated with the key for this key-value pair\n * @memberof KVPair\n */\nKVPair.prototype.value = undefined;\nKVPair.prototype.$reserved = undefined;\nKVPair.prototype.$objectType = undefined;\nKVPair.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/KVPair.js?\n}");
|
|
332
332
|
|
|
333
333
|
/***/ },
|
|
334
334
|
|
|
@@ -339,7 +339,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
339
339
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
340
340
|
|
|
341
341
|
"use strict";
|
|
342
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ MapOfStringWrapper)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The MapOfStringWrapper model module.\n * @module Ntnx/MapOfStringWrapper\n * @version 4.0.2\n * @class MapOfStringWrapper\n */\nvar _MapOfStringWrapper_brand = /*#__PURE__*/new WeakSet();\nclass MapOfStringWrapper {\n /**\n * Constructs a new <code>MapOfStringWrapper</code>.\n * A wrapper schema containing a map with string keys and values. \n * @alias module:Ntnx/MapOfStringWrapper\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _MapOfStringWrapper_brand);\n this.$objectType = \"common.v1.config.MapOfStringWrapper\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>MapOfStringWrapper</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/MapOfStringWrapper} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/MapOfStringWrapper} The populated <code>MapOfStringWrapper</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new MapOfStringWrapper();\n if (data.hasOwnProperty('map') && data.map !== null && data.map !== undefined) {\n obj.setMap(data['map']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns A map with string keys and values. \n * @return {Object<string, string>}\n */\n getMap() {\n return this.map;\n }\n\n /**\n * Sets A map with string keys and values. \n * @param {Object<string, string>} map A map with string keys and values. \n */\n setMap(map) {\n this.map = map;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMap() !== 'undefined' && this.getMap() !== null ? {\n 'map': _assertClassBrand(_MapOfStringWrapper_brand, this, _toJsonMapType).call(this, this.getMap(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMap() !== 'undefined' && this.getMap() !== null ? {\n 'map': _assertClassBrand(_MapOfStringWrapper_brand, this, _toJsonMapType).call(this, this.getMap())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"map\") {\n if (typeof this.map === 'undefined' || this.map === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"map\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * A map with string keys and values. \n * @memberof MapOfStringWrapper\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nMapOfStringWrapper.prototype.map = undefined;\nMapOfStringWrapper.prototype.$reserved = undefined;\nMapOfStringWrapper.prototype.$objectType = undefined;\nMapOfStringWrapper.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/MapOfStringWrapper.js?\n}");
|
|
342
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ MapOfStringWrapper)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The MapOfStringWrapper model module.\n * @module Ntnx/MapOfStringWrapper\n * @version 4.0.3\n * @class MapOfStringWrapper\n */\nvar _MapOfStringWrapper_brand = /*#__PURE__*/new WeakSet();\nclass MapOfStringWrapper {\n /**\n * Constructs a new <code>MapOfStringWrapper</code>.\n * A wrapper schema containing a map with string keys and values. \n * @alias module:Ntnx/MapOfStringWrapper\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _MapOfStringWrapper_brand);\n this.$objectType = \"common.v1.config.MapOfStringWrapper\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>MapOfStringWrapper</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/MapOfStringWrapper} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/MapOfStringWrapper} The populated <code>MapOfStringWrapper</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new MapOfStringWrapper();\n if (data.hasOwnProperty('map') && data.map !== null && data.map !== undefined) {\n obj.setMap(data['map']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns A map with string keys and values. \n * @return {Object<string, string>}\n */\n getMap() {\n return this.map;\n }\n\n /**\n * Sets A map with string keys and values. \n * @param {Object<string, string>} map A map with string keys and values. \n */\n setMap(map) {\n this.map = map;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMap() !== 'undefined' && this.getMap() !== null ? {\n 'map': _assertClassBrand(_MapOfStringWrapper_brand, this, _toJsonMapType).call(this, this.getMap(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMap() !== 'undefined' && this.getMap() !== null ? {\n 'map': _assertClassBrand(_MapOfStringWrapper_brand, this, _toJsonMapType).call(this, this.getMap())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"map\") {\n if (typeof this.map === 'undefined' || this.map === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"map\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * A map with string keys and values. \n * @memberof MapOfStringWrapper\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nMapOfStringWrapper.prototype.map = undefined;\nMapOfStringWrapper.prototype.$reserved = undefined;\nMapOfStringWrapper.prototype.$objectType = undefined;\nMapOfStringWrapper.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/MapOfStringWrapper.js?\n}");
|
|
343
343
|
|
|
344
344
|
/***/ },
|
|
345
345
|
|
|
@@ -350,7 +350,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
350
350
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
351
351
|
|
|
352
352
|
"use strict";
|
|
353
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Message)\n/* harmony export */ });\n/* harmony import */ var _MessageSeverity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MessageSeverity */ \"./target/generated-sources/swagger/src/models/common/v1/config/MessageSeverity.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n/**\n * The Message model module.\n * @module Ntnx/Message\n * @version 4.0.2\n * @class Message\n */\nvar _Message_brand = /*#__PURE__*/new WeakSet();\nclass Message {\n /**\n * Constructs a new <code>Message</code>.\n * @alias module:Ntnx/Message\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _Message_brand);\n this.$objectType = \"common.v1.config.Message\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>Message</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/Message} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/Message} The populated <code>Message</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new Message();\n if (data.hasOwnProperty('code') && data.code !== null && data.code !== undefined) {\n obj.setCode(data['code']);\n }\n if (data.hasOwnProperty('message') && data.message !== null && data.message !== undefined) {\n obj.setMessage(data['message']);\n }\n if (data.hasOwnProperty('locale') && data.locale !== null && data.locale !== undefined) {\n obj.setLocale(data['locale']);\n }\n if (data.hasOwnProperty('severity') && data.severity !== null && data.severity !== undefined) {\n obj.setSeverity(_MessageSeverity__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['severity']));\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns A code that uniquely identifies a message. \n * @return {string}\n */\n getCode() {\n return this.code;\n }\n\n /**\n * Sets A code that uniquely identifies a message. \n * @param {string} code A code that uniquely identifies a message. \n */\n setCode(code) {\n this.code = code;\n }\n\n /**\n * Returns The description of the message. \n * @return {string}\n */\n getMessage() {\n return this.message;\n }\n\n /**\n * Sets The description of the message. \n * @param {string} message The description of the message. \n */\n setMessage(message) {\n this.message = message;\n }\n\n /**\n * Returns The locale for the message description. \n * @return {string}\n */\n getLocale() {\n return this.locale;\n }\n\n /**\n * Sets The locale for the message description. \n * @param {string} locale The locale for the message description. \n */\n setLocale(locale) {\n this.locale = locale;\n }\n\n /**\n * @return {MessageSeverity}\n */\n getSeverity() {\n return this.severity;\n }\n\n /**\n * @param {MessageSeverity} severity\n */\n setSeverity(severity) {\n this.severity = severity;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getCode() !== 'undefined' && this.getCode() !== null ? {\n 'code': this.getCode()\n } : {}),\n ...(typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {\n 'message': this.getMessage()\n } : {}),\n ...(typeof this.getLocale() !== 'undefined' && this.getLocale() !== null ? {\n 'locale': this.getLocale()\n } : {}),\n ...(typeof this.getSeverity() !== 'undefined' && this.getSeverity() !== null ? {\n 'severity': this.getSeverity()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getCode() !== 'undefined' && this.getCode() !== null ? {\n 'code': this.getCode()\n } : {}),\n ...(typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {\n 'message': this.getMessage()\n } : {}),\n ...(typeof this.getLocale() !== 'undefined' && this.getLocale() !== null ? {\n 'locale': this.getLocale()\n } : {}),\n ...(typeof this.getSeverity() !== 'undefined' && this.getSeverity() !== null ? {\n 'severity': this.getSeverity()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"code\") {\n if (typeof this.code === 'undefined' || this.code === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"code\", \"undefined or null\");\n }\n }\n if (property === \"message\") {\n if (typeof this.message === 'undefined' || this.message === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"message\", \"undefined or null\");\n }\n }\n if (property === \"locale\") {\n if (typeof this.locale === 'undefined' || this.locale === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"locale\", \"undefined or null\");\n }\n }\n if (property === \"severity\") {\n if (typeof this.severity === 'undefined' || this.severity === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"severity\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * A code that uniquely identifies a message. \n * @memberof Message\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nMessage.prototype.code = undefined;\n\n/**\n * The description of the message. \n * @memberof Message\n */\nMessage.prototype.message = undefined;\n\n/**\n * The locale for the message description. \n * @memberof Message\n * @default 'en_US'\n */\nMessage.prototype.locale = 'en_US';\n\n/**\n * @memberof Message\n */\nMessage.prototype.severity = undefined;\nMessage.prototype.$reserved = undefined;\nMessage.prototype.$objectType = undefined;\nMessage.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/Message.js?\n}");
|
|
353
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Message)\n/* harmony export */ });\n/* harmony import */ var _MessageSeverity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MessageSeverity */ \"./target/generated-sources/swagger/src/models/common/v1/config/MessageSeverity.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n/**\n * The Message model module.\n * @module Ntnx/Message\n * @version 4.0.3\n * @class Message\n */\nvar _Message_brand = /*#__PURE__*/new WeakSet();\nclass Message {\n /**\n * Constructs a new <code>Message</code>.\n * @alias module:Ntnx/Message\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _Message_brand);\n this.$objectType = \"common.v1.config.Message\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>Message</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/Message} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/Message} The populated <code>Message</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new Message();\n if (data.hasOwnProperty('code') && data.code !== null && data.code !== undefined) {\n obj.setCode(data['code']);\n }\n if (data.hasOwnProperty('message') && data.message !== null && data.message !== undefined) {\n obj.setMessage(data['message']);\n }\n if (data.hasOwnProperty('locale') && data.locale !== null && data.locale !== undefined) {\n obj.setLocale(data['locale']);\n }\n if (data.hasOwnProperty('severity') && data.severity !== null && data.severity !== undefined) {\n obj.setSeverity(_MessageSeverity__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['severity']));\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns A code that uniquely identifies a message. \n * @return {string}\n */\n getCode() {\n return this.code;\n }\n\n /**\n * Sets A code that uniquely identifies a message. \n * @param {string} code A code that uniquely identifies a message. \n */\n setCode(code) {\n this.code = code;\n }\n\n /**\n * Returns The description of the message. \n * @return {string}\n */\n getMessage() {\n return this.message;\n }\n\n /**\n * Sets The description of the message. \n * @param {string} message The description of the message. \n */\n setMessage(message) {\n this.message = message;\n }\n\n /**\n * Returns The locale for the message description. \n * @return {string}\n */\n getLocale() {\n return this.locale;\n }\n\n /**\n * Sets The locale for the message description. \n * @param {string} locale The locale for the message description. \n */\n setLocale(locale) {\n this.locale = locale;\n }\n\n /**\n * @return {MessageSeverity}\n */\n getSeverity() {\n return this.severity;\n }\n\n /**\n * @param {MessageSeverity} severity\n */\n setSeverity(severity) {\n this.severity = severity;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getCode() !== 'undefined' && this.getCode() !== null ? {\n 'code': this.getCode()\n } : {}),\n ...(typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {\n 'message': this.getMessage()\n } : {}),\n ...(typeof this.getLocale() !== 'undefined' && this.getLocale() !== null ? {\n 'locale': this.getLocale()\n } : {}),\n ...(typeof this.getSeverity() !== 'undefined' && this.getSeverity() !== null ? {\n 'severity': this.getSeverity()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getCode() !== 'undefined' && this.getCode() !== null ? {\n 'code': this.getCode()\n } : {}),\n ...(typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {\n 'message': this.getMessage()\n } : {}),\n ...(typeof this.getLocale() !== 'undefined' && this.getLocale() !== null ? {\n 'locale': this.getLocale()\n } : {}),\n ...(typeof this.getSeverity() !== 'undefined' && this.getSeverity() !== null ? {\n 'severity': this.getSeverity()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"code\") {\n if (typeof this.code === 'undefined' || this.code === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"code\", \"undefined or null\");\n }\n }\n if (property === \"message\") {\n if (typeof this.message === 'undefined' || this.message === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"message\", \"undefined or null\");\n }\n }\n if (property === \"locale\") {\n if (typeof this.locale === 'undefined' || this.locale === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"locale\", \"undefined or null\");\n }\n }\n if (property === \"severity\") {\n if (typeof this.severity === 'undefined' || this.severity === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"severity\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * A code that uniquely identifies a message. \n * @memberof Message\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nMessage.prototype.code = undefined;\n\n/**\n * The description of the message. \n * @memberof Message\n */\nMessage.prototype.message = undefined;\n\n/**\n * The locale for the message description. \n * @memberof Message\n * @default 'en_US'\n */\nMessage.prototype.locale = 'en_US';\n\n/**\n * @memberof Message\n */\nMessage.prototype.severity = undefined;\nMessage.prototype.$reserved = undefined;\nMessage.prototype.$objectType = undefined;\nMessage.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/Message.js?\n}");
|
|
354
354
|
|
|
355
355
|
/***/ },
|
|
356
356
|
|
|
@@ -361,7 +361,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
361
361
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
362
362
|
|
|
363
363
|
"use strict";
|
|
364
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.
|
|
364
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * Enum class MessageSeverity.\n * @enum {string}\n * @readonly\n */\nconst MessageSeverity = {\n /** \n * Unknown value.\n * @const\n */\n $UNKNOWN: \"$UNKNOWN\",\n /** \n * Redacted value.\n * @const\n */\n $REDACTED: \"$REDACTED\",\n /** \n * Information about successful completion.\n * @const\n */\n INFO: \"INFO\",\n /** \n * Warning indicating future error.\n * @const\n */\n WARNING: \"WARNING\",\n /** \n * Error indicating failed completion.\n * @const\n */\n ERROR: \"ERROR\"\n};\n\n/**\n* Returns a <code>MessageSeverity</code> enum value from a JavaScript object name.\n* @param {Object} obj The plain JavaScript object containing the name of the enum value.\n* @return {MessageSeverity} The enum <code>MessageSeverity</code> value.\n*/\nMessageSeverity.constructFromObject = function (obj) {\n if (typeof obj === 'string' || obj instanceof String) {\n let enumVal = Object.keys(MessageSeverity).find(key => MessageSeverity[key] === obj);\n return enumVal === undefined || enumVal === null ? MessageSeverity.$UNKNOWN : MessageSeverity[enumVal];\n } else {\n throw new Error(\"Received object name is not an instance of String\");\n }\n};\n\n/**\n* Validates <code>MessageSeverity</code> enum value.\n* @param {Object} obj The plain JavaScript object containing the name of the enum value.\n* @return {null} Throws error for invalid value.\n*/\nMessageSeverity.validate = function (obj) {\n switch (obj) {\n case MessageSeverity.$UNKNOWN:\n case MessageSeverity.$REDACTED:\n case MessageSeverity.INFO:\n case MessageSeverity.WARNING:\n case MessageSeverity.ERROR:\n return;\n default:\n throw new Error(\"Invalid : must be MessageSeverity.{ $UNKNOWN|$REDACTED|INFO|WARNING|ERROR }\");\n }\n};\nObject.freeze(MessageSeverity);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MessageSeverity);\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/MessageSeverity.js?\n}");
|
|
365
365
|
|
|
366
366
|
/***/ },
|
|
367
367
|
|
|
@@ -372,7 +372,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
372
372
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
373
373
|
|
|
374
374
|
"use strict";
|
|
375
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Metadata)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The Metadata model module.\n * @module Ntnx/Metadata\n * @version 4.0.2\n * @class Metadata\n */\nvar _Metadata_brand = /*#__PURE__*/new WeakSet();\nclass Metadata {\n /**\n * Constructs a new <code>Metadata</code>.\n * Metadata associated with this resource. \n * @alias module:Ntnx/Metadata\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _Metadata_brand);\n this.$objectType = \"common.v1.config.Metadata\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>Metadata</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/Metadata} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/Metadata} The populated <code>Metadata</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new Metadata();\n if (data.hasOwnProperty('ownerReferenceId') && data.ownerReferenceId !== null && data.ownerReferenceId !== undefined) {\n obj.setOwnerReferenceId(data['ownerReferenceId']);\n }\n if (data.hasOwnProperty('ownerUserName') && data.ownerUserName !== null && data.ownerUserName !== undefined) {\n obj.setOwnerUserName(data['ownerUserName']);\n }\n if (data.hasOwnProperty('projectReferenceId') && data.projectReferenceId !== null && data.projectReferenceId !== undefined) {\n obj.setProjectReferenceId(data['projectReferenceId']);\n }\n if (data.hasOwnProperty('projectName') && data.projectName !== null && data.projectName !== undefined) {\n obj.setProjectName(data['projectName']);\n }\n if (data.hasOwnProperty('categoryIds') && data.categoryIds !== null && data.categoryIds !== undefined) {\n itemArr = [];\n items = data.categoryIds;\n for (i = 0; i < items.length; i++) {\n itemArr.push(items[i]);\n }\n obj.setCategoryIds(itemArr);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns A globally unique identifier that represents the owner of this resource. \n * @return {string}\n */\n getOwnerReferenceId() {\n return this.ownerReferenceId;\n }\n\n /**\n * Sets A globally unique identifier that represents the owner of this resource. \n * @param {string} ownerReferenceId A globally unique identifier that represents the owner of this resource. \n */\n setOwnerReferenceId(ownerReferenceId) {\n this.ownerReferenceId = ownerReferenceId;\n }\n\n /**\n * Returns The userName of the owner of this resource. \n * @return {string}\n */\n getOwnerUserName() {\n return this.ownerUserName;\n }\n\n /**\n * Sets The userName of the owner of this resource. \n * @param {string} ownerUserName The userName of the owner of this resource. \n */\n setOwnerUserName(ownerUserName) {\n this.ownerUserName = ownerUserName;\n }\n\n /**\n * Returns A globally unique identifier that represents the project this resource belongs to. \n * @return {string}\n */\n getProjectReferenceId() {\n return this.projectReferenceId;\n }\n\n /**\n * Sets A globally unique identifier that represents the project this resource belongs to. \n * @param {string} projectReferenceId A globally unique identifier that represents the project this resource belongs to. \n */\n setProjectReferenceId(projectReferenceId) {\n this.projectReferenceId = projectReferenceId;\n }\n\n /**\n * Returns The name of the project this resource belongs to. \n * @return {string}\n */\n getProjectName() {\n return this.projectName;\n }\n\n /**\n * Sets The name of the project this resource belongs to. \n * @param {string} projectName The name of the project this resource belongs to. \n */\n setProjectName(projectName) {\n this.projectName = projectName;\n }\n\n /**\n * Returns A list of globally unique identifiers that represent all the categories the resource is associated with. \n * @return {string[]}\n */\n getCategoryIds() {\n return this.categoryIds;\n }\n\n /**\n * Sets A list of globally unique identifiers that represent all the categories the resource is associated with. \n * @param {string[]} categoryIds A list of globally unique identifiers that represent all the categories the resource is associated with. \n */\n setCategoryIds(categoryIds) {\n this.categoryIds = categoryIds;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getOwnerReferenceId() !== 'undefined' && this.getOwnerReferenceId() !== null ? {\n 'ownerReferenceId': this.getOwnerReferenceId()\n } : {}),\n ...(typeof this.getOwnerUserName() !== 'undefined' && this.getOwnerUserName() !== null ? {\n 'ownerUserName': this.getOwnerUserName()\n } : {}),\n ...(typeof this.getProjectReferenceId() !== 'undefined' && this.getProjectReferenceId() !== null ? {\n 'projectReferenceId': this.getProjectReferenceId()\n } : {}),\n ...(typeof this.getProjectName() !== 'undefined' && this.getProjectName() !== null ? {\n 'projectName': this.getProjectName()\n } : {}),\n ...(typeof this.getCategoryIds() !== 'undefined' && this.getCategoryIds() !== null ? {\n 'categoryIds': this.getCategoryIds()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getOwnerReferenceId() !== 'undefined' && this.getOwnerReferenceId() !== null ? {\n 'ownerReferenceId': this.getOwnerReferenceId()\n } : {}),\n ...(typeof this.getOwnerUserName() !== 'undefined' && this.getOwnerUserName() !== null ? {\n 'ownerUserName': this.getOwnerUserName()\n } : {}),\n ...(typeof this.getProjectReferenceId() !== 'undefined' && this.getProjectReferenceId() !== null ? {\n 'projectReferenceId': this.getProjectReferenceId()\n } : {}),\n ...(typeof this.getProjectName() !== 'undefined' && this.getProjectName() !== null ? {\n 'projectName': this.getProjectName()\n } : {}),\n ...(typeof this.getCategoryIds() !== 'undefined' && this.getCategoryIds() !== null ? {\n 'categoryIds': this.getCategoryIds()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"ownerReferenceId\") {\n if (typeof this.ownerReferenceId === 'undefined' || this.ownerReferenceId === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"ownerReferenceId\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"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}$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"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}$/\");\n }\n }\n if (property === \"ownerUserName\") {\n if (typeof this.ownerUserName === 'undefined' || this.ownerUserName === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"ownerUserName\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMaxLength(this.ownerUserName, 128)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"ownerUserName\", \"does not satisfy required maxLength constraint: 128\");\n }\n }\n if (property === \"projectReferenceId\") {\n if (typeof this.projectReferenceId === 'undefined' || this.projectReferenceId === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"projectReferenceId\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"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}$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"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}$/\");\n }\n }\n if (property === \"projectName\") {\n if (typeof this.projectName === 'undefined' || this.projectName === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"projectName\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMaxLength(this.projectName, 128)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"projectName\", \"does not satisfy required maxLength constraint: 128\");\n }\n }\n if (property === \"categoryIds\") {\n if (typeof this.categoryIds === 'undefined' || this.categoryIds === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"categoryIds\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMaxItems(this.categoryIds, 256)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"categoryIds\", \"does not satisfy required maxItems constraint: 256\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMinItems(this.categoryIds, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"categoryIds\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * A globally unique identifier that represents the owner of this resource. \n * @memberof Metadata\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nMetadata.prototype.ownerReferenceId = undefined;\n\n/**\n * The userName of the owner of this resource. \n * @memberof Metadata\n */\nMetadata.prototype.ownerUserName = undefined;\n\n/**\n * A globally unique identifier that represents the project this resource belongs to. \n * @memberof Metadata\n */\nMetadata.prototype.projectReferenceId = undefined;\n\n/**\n * The name of the project this resource belongs to. \n * @memberof Metadata\n */\nMetadata.prototype.projectName = undefined;\n\n/**\n * A list of globally unique identifiers that represent all the categories the resource is associated with. \n * @memberof Metadata\n */\nMetadata.prototype.categoryIds = undefined;\nMetadata.prototype.$reserved = undefined;\nMetadata.prototype.$objectType = undefined;\nMetadata.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/Metadata.js?\n}");
|
|
375
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Metadata)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The Metadata model module.\n * @module Ntnx/Metadata\n * @version 4.0.3\n * @class Metadata\n */\nvar _Metadata_brand = /*#__PURE__*/new WeakSet();\nclass Metadata {\n /**\n * Constructs a new <code>Metadata</code>.\n * Metadata associated with this resource. \n * @alias module:Ntnx/Metadata\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _Metadata_brand);\n this.$objectType = \"common.v1.config.Metadata\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>Metadata</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/Metadata} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/Metadata} The populated <code>Metadata</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new Metadata();\n if (data.hasOwnProperty('ownerReferenceId') && data.ownerReferenceId !== null && data.ownerReferenceId !== undefined) {\n obj.setOwnerReferenceId(data['ownerReferenceId']);\n }\n if (data.hasOwnProperty('ownerUserName') && data.ownerUserName !== null && data.ownerUserName !== undefined) {\n obj.setOwnerUserName(data['ownerUserName']);\n }\n if (data.hasOwnProperty('projectReferenceId') && data.projectReferenceId !== null && data.projectReferenceId !== undefined) {\n obj.setProjectReferenceId(data['projectReferenceId']);\n }\n if (data.hasOwnProperty('projectName') && data.projectName !== null && data.projectName !== undefined) {\n obj.setProjectName(data['projectName']);\n }\n if (data.hasOwnProperty('categoryIds') && data.categoryIds !== null && data.categoryIds !== undefined) {\n itemArr = [];\n items = data.categoryIds;\n for (i = 0; i < items.length; i++) {\n itemArr.push(items[i]);\n }\n obj.setCategoryIds(itemArr);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns A globally unique identifier that represents the owner of this resource. \n * @return {string}\n */\n getOwnerReferenceId() {\n return this.ownerReferenceId;\n }\n\n /**\n * Sets A globally unique identifier that represents the owner of this resource. \n * @param {string} ownerReferenceId A globally unique identifier that represents the owner of this resource. \n */\n setOwnerReferenceId(ownerReferenceId) {\n this.ownerReferenceId = ownerReferenceId;\n }\n\n /**\n * Returns The userName of the owner of this resource. \n * @return {string}\n */\n getOwnerUserName() {\n return this.ownerUserName;\n }\n\n /**\n * Sets The userName of the owner of this resource. \n * @param {string} ownerUserName The userName of the owner of this resource. \n */\n setOwnerUserName(ownerUserName) {\n this.ownerUserName = ownerUserName;\n }\n\n /**\n * Returns A globally unique identifier that represents the project this resource belongs to. \n * @return {string}\n */\n getProjectReferenceId() {\n return this.projectReferenceId;\n }\n\n /**\n * Sets A globally unique identifier that represents the project this resource belongs to. \n * @param {string} projectReferenceId A globally unique identifier that represents the project this resource belongs to. \n */\n setProjectReferenceId(projectReferenceId) {\n this.projectReferenceId = projectReferenceId;\n }\n\n /**\n * Returns The name of the project this resource belongs to. \n * @return {string}\n */\n getProjectName() {\n return this.projectName;\n }\n\n /**\n * Sets The name of the project this resource belongs to. \n * @param {string} projectName The name of the project this resource belongs to. \n */\n setProjectName(projectName) {\n this.projectName = projectName;\n }\n\n /**\n * Returns A list of globally unique identifiers that represent all the categories the resource is associated with. \n * @return {string[]}\n */\n getCategoryIds() {\n return this.categoryIds;\n }\n\n /**\n * Sets A list of globally unique identifiers that represent all the categories the resource is associated with. \n * @param {string[]} categoryIds A list of globally unique identifiers that represent all the categories the resource is associated with. \n */\n setCategoryIds(categoryIds) {\n this.categoryIds = categoryIds;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getOwnerReferenceId() !== 'undefined' && this.getOwnerReferenceId() !== null ? {\n 'ownerReferenceId': this.getOwnerReferenceId()\n } : {}),\n ...(typeof this.getOwnerUserName() !== 'undefined' && this.getOwnerUserName() !== null ? {\n 'ownerUserName': this.getOwnerUserName()\n } : {}),\n ...(typeof this.getProjectReferenceId() !== 'undefined' && this.getProjectReferenceId() !== null ? {\n 'projectReferenceId': this.getProjectReferenceId()\n } : {}),\n ...(typeof this.getProjectName() !== 'undefined' && this.getProjectName() !== null ? {\n 'projectName': this.getProjectName()\n } : {}),\n ...(typeof this.getCategoryIds() !== 'undefined' && this.getCategoryIds() !== null ? {\n 'categoryIds': this.getCategoryIds()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getOwnerReferenceId() !== 'undefined' && this.getOwnerReferenceId() !== null ? {\n 'ownerReferenceId': this.getOwnerReferenceId()\n } : {}),\n ...(typeof this.getOwnerUserName() !== 'undefined' && this.getOwnerUserName() !== null ? {\n 'ownerUserName': this.getOwnerUserName()\n } : {}),\n ...(typeof this.getProjectReferenceId() !== 'undefined' && this.getProjectReferenceId() !== null ? {\n 'projectReferenceId': this.getProjectReferenceId()\n } : {}),\n ...(typeof this.getProjectName() !== 'undefined' && this.getProjectName() !== null ? {\n 'projectName': this.getProjectName()\n } : {}),\n ...(typeof this.getCategoryIds() !== 'undefined' && this.getCategoryIds() !== null ? {\n 'categoryIds': this.getCategoryIds()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"ownerReferenceId\") {\n if (typeof this.ownerReferenceId === 'undefined' || this.ownerReferenceId === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"ownerReferenceId\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"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}$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"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}$/\");\n }\n }\n if (property === \"ownerUserName\") {\n if (typeof this.ownerUserName === 'undefined' || this.ownerUserName === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"ownerUserName\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMaxLength(this.ownerUserName, 128)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"ownerUserName\", \"does not satisfy required maxLength constraint: 128\");\n }\n }\n if (property === \"projectReferenceId\") {\n if (typeof this.projectReferenceId === 'undefined' || this.projectReferenceId === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"projectReferenceId\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"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}$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"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}$/\");\n }\n }\n if (property === \"projectName\") {\n if (typeof this.projectName === 'undefined' || this.projectName === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"projectName\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMaxLength(this.projectName, 128)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"projectName\", \"does not satisfy required maxLength constraint: 128\");\n }\n }\n if (property === \"categoryIds\") {\n if (typeof this.categoryIds === 'undefined' || this.categoryIds === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"categoryIds\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMaxItems(this.categoryIds, 256)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"categoryIds\", \"does not satisfy required maxItems constraint: 256\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validateMinItems(this.categoryIds, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"categoryIds\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * A globally unique identifier that represents the owner of this resource. \n * @memberof Metadata\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nMetadata.prototype.ownerReferenceId = undefined;\n\n/**\n * The userName of the owner of this resource. \n * @memberof Metadata\n */\nMetadata.prototype.ownerUserName = undefined;\n\n/**\n * A globally unique identifier that represents the project this resource belongs to. \n * @memberof Metadata\n */\nMetadata.prototype.projectReferenceId = undefined;\n\n/**\n * The name of the project this resource belongs to. \n * @memberof Metadata\n */\nMetadata.prototype.projectName = undefined;\n\n/**\n * A list of globally unique identifiers that represent all the categories the resource is associated with. \n * @memberof Metadata\n */\nMetadata.prototype.categoryIds = undefined;\nMetadata.prototype.$reserved = undefined;\nMetadata.prototype.$objectType = undefined;\nMetadata.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/Metadata.js?\n}");
|
|
376
376
|
|
|
377
377
|
/***/ },
|
|
378
378
|
|
|
@@ -383,7 +383,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
383
383
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
384
384
|
|
|
385
385
|
"use strict";
|
|
386
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ TenantAwareModel)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The TenantAwareModel model module.\n * @module Ntnx/TenantAwareModel\n * @version 4.0.2\n * @class TenantAwareModel\n */\nvar _TenantAwareModel_brand = /*#__PURE__*/new WeakSet();\nclass TenantAwareModel {\n /**\n * Constructs a new <code>TenantAwareModel</code>.\n * A model base class whose instances are bound to a specific tenant. This model adds a tenantId to the base model class that it extends and is automatically set by the server. \n * @alias module:Ntnx/TenantAwareModel\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _TenantAwareModel_brand);\n this.$objectType = \"common.v1.config.TenantAwareModel\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>TenantAwareModel</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/TenantAwareModel} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/TenantAwareModel} The populated <code>TenantAwareModel</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new TenantAwareModel();\n if (data.hasOwnProperty('tenantId') && data.tenantId !== null && data.tenantId !== undefined) {\n obj.setTenantId(data['tenantId']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * 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). \n * @return {string}\n */\n getTenantId() {\n return this.tenantId;\n }\n\n /**\n * 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). \n * @param {string} 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). \n */\n setTenantId(tenantId) {\n this.tenantId = tenantId;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {\n 'tenantId': this.getTenantId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"tenantId\") {\n if (typeof this.tenantId === 'undefined' || this.tenantId === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"tenantId\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validatePattern(this.tenantId, /^[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}$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"tenantId\", \"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}$/\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * 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). \n * @memberof TenantAwareModel\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nTenantAwareModel.prototype.tenantId = undefined;\nTenantAwareModel.prototype.$reserved = undefined;\nTenantAwareModel.prototype.$objectType = undefined;\nTenantAwareModel.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/TenantAwareModel.js?\n}");
|
|
386
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ TenantAwareModel)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The TenantAwareModel model module.\n * @module Ntnx/TenantAwareModel\n * @version 4.0.3\n * @class TenantAwareModel\n */\nvar _TenantAwareModel_brand = /*#__PURE__*/new WeakSet();\nclass TenantAwareModel {\n /**\n * Constructs a new <code>TenantAwareModel</code>.\n * A model base class whose instances are bound to a specific tenant. This model adds a tenantId to the base model class that it extends and is automatically set by the server. \n * @alias module:Ntnx/TenantAwareModel\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _TenantAwareModel_brand);\n this.$objectType = \"common.v1.config.TenantAwareModel\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>TenantAwareModel</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/TenantAwareModel} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/TenantAwareModel} The populated <code>TenantAwareModel</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new TenantAwareModel();\n if (data.hasOwnProperty('tenantId') && data.tenantId !== null && data.tenantId !== undefined) {\n obj.setTenantId(data['tenantId']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * 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). \n * @return {string}\n */\n getTenantId() {\n return this.tenantId;\n }\n\n /**\n * 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). \n * @param {string} 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). \n */\n setTenantId(tenantId) {\n this.tenantId = tenantId;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {\n 'tenantId': this.getTenantId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"tenantId\") {\n if (typeof this.tenantId === 'undefined' || this.tenantId === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"tenantId\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validatePattern(this.tenantId, /^[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}$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"tenantId\", \"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}$/\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * 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). \n * @memberof TenantAwareModel\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nTenantAwareModel.prototype.tenantId = undefined;\nTenantAwareModel.prototype.$reserved = undefined;\nTenantAwareModel.prototype.$objectType = undefined;\nTenantAwareModel.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/config/TenantAwareModel.js?\n}");
|
|
387
387
|
|
|
388
388
|
/***/ },
|
|
389
389
|
|
|
@@ -394,7 +394,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
394
394
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
395
395
|
|
|
396
396
|
"use strict";
|
|
397
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ApiLink)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The ApiLink model module.\n * @module Ntnx/ApiLink\n * @version 4.0.2\n * @class ApiLink\n */\nvar _ApiLink_brand = /*#__PURE__*/new WeakSet();\nclass ApiLink {\n /**\n * Constructs a new <code>ApiLink</code>.\n * A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @alias module:Ntnx/ApiLink\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ApiLink_brand);\n this.$objectType = \"common.v1.response.ApiLink\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ApiLink</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ApiLink} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ApiLink} The populated <code>ApiLink</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ApiLink();\n if (data.hasOwnProperty('href') && data.href !== null && data.href !== undefined) {\n obj.setHref(data['href']);\n }\n if (data.hasOwnProperty('rel') && data.rel !== null && data.rel !== undefined) {\n obj.setRel(data['rel']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns The URL at which the entity described by the link can be accessed. \n * @return {string}\n */\n getHref() {\n return this.href;\n }\n\n /**\n * Sets The URL at which the entity described by the link can be accessed. \n * @param {string} href The URL at which the entity described by the link can be accessed. \n */\n setHref(href) {\n this.href = href;\n }\n\n /**\n * Returns A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of \\\"self\\\" identifies the URL for the object. \n * @return {string}\n */\n getRel() {\n return this.rel;\n }\n\n /**\n * Sets A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of \\\"self\\\" identifies the URL for the object. \n * @param {string} rel A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of \\\"self\\\" identifies the URL for the object. \n */\n setRel(rel) {\n this.rel = rel;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getHref() !== 'undefined' && this.getHref() !== null ? {\n 'href': this.getHref()\n } : {}),\n ...(typeof this.getRel() !== 'undefined' && this.getRel() !== null ? {\n 'rel': this.getRel()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getHref() !== 'undefined' && this.getHref() !== null ? {\n 'href': this.getHref()\n } : {}),\n ...(typeof this.getRel() !== 'undefined' && this.getRel() !== null ? {\n 'rel': this.getRel()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"href\") {\n if (typeof this.href === 'undefined' || this.href === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"href\", \"undefined or null\");\n }\n }\n if (property === \"rel\") {\n if (typeof this.rel === 'undefined' || this.rel === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"rel\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * The URL at which the entity described by the link can be accessed. \n * @memberof ApiLink\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nApiLink.prototype.href = undefined;\n\n/**\n * A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of \\\"self\\\" identifies the URL for the object. \n * @memberof ApiLink\n */\nApiLink.prototype.rel = undefined;\nApiLink.prototype.$reserved = undefined;\nApiLink.prototype.$objectType = undefined;\nApiLink.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/response/ApiLink.js?\n}");
|
|
397
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ApiLink)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The ApiLink model module.\n * @module Ntnx/ApiLink\n * @version 4.0.3\n * @class ApiLink\n */\nvar _ApiLink_brand = /*#__PURE__*/new WeakSet();\nclass ApiLink {\n /**\n * Constructs a new <code>ApiLink</code>.\n * A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @alias module:Ntnx/ApiLink\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ApiLink_brand);\n this.$objectType = \"common.v1.response.ApiLink\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ApiLink</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ApiLink} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ApiLink} The populated <code>ApiLink</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ApiLink();\n if (data.hasOwnProperty('href') && data.href !== null && data.href !== undefined) {\n obj.setHref(data['href']);\n }\n if (data.hasOwnProperty('rel') && data.rel !== null && data.rel !== undefined) {\n obj.setRel(data['rel']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns The URL at which the entity described by the link can be accessed. \n * @return {string}\n */\n getHref() {\n return this.href;\n }\n\n /**\n * Sets The URL at which the entity described by the link can be accessed. \n * @param {string} href The URL at which the entity described by the link can be accessed. \n */\n setHref(href) {\n this.href = href;\n }\n\n /**\n * Returns A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of \\\"self\\\" identifies the URL for the object. \n * @return {string}\n */\n getRel() {\n return this.rel;\n }\n\n /**\n * Sets A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of \\\"self\\\" identifies the URL for the object. \n * @param {string} rel A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of \\\"self\\\" identifies the URL for the object. \n */\n setRel(rel) {\n this.rel = rel;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getHref() !== 'undefined' && this.getHref() !== null ? {\n 'href': this.getHref()\n } : {}),\n ...(typeof this.getRel() !== 'undefined' && this.getRel() !== null ? {\n 'rel': this.getRel()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getHref() !== 'undefined' && this.getHref() !== null ? {\n 'href': this.getHref()\n } : {}),\n ...(typeof this.getRel() !== 'undefined' && this.getRel() !== null ? {\n 'rel': this.getRel()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"href\") {\n if (typeof this.href === 'undefined' || this.href === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"href\", \"undefined or null\");\n }\n }\n if (property === \"rel\") {\n if (typeof this.rel === 'undefined' || this.rel === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"rel\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * The URL at which the entity described by the link can be accessed. \n * @memberof ApiLink\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nApiLink.prototype.href = undefined;\n\n/**\n * A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of \\\"self\\\" identifies the URL for the object. \n * @memberof ApiLink\n */\nApiLink.prototype.rel = undefined;\nApiLink.prototype.$reserved = undefined;\nApiLink.prototype.$objectType = undefined;\nApiLink.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/response/ApiLink.js?\n}");
|
|
398
398
|
|
|
399
399
|
/***/ },
|
|
400
400
|
|
|
@@ -405,7 +405,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
405
405
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
406
406
|
|
|
407
407
|
"use strict";
|
|
408
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ApiResponseMetadata)\n/* harmony export */ });\n/* harmony import */ var _config_Flag__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config/Flag */ \"./target/generated-sources/swagger/src/models/common/v1/config/Flag.js\");\n/* harmony import */ var _config_KVPair__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config/KVPair */ \"./target/generated-sources/swagger/src/models/common/v1/config/KVPair.js\");\n/* harmony import */ var _config_Message__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config/Message */ \"./target/generated-sources/swagger/src/models/common/v1/config/Message.js\");\n/* harmony import */ var _ApiLink__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ApiLink */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiLink.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The ApiResponseMetadata model module.\n * @module Ntnx/ApiResponseMetadata\n * @version 4.0.2\n * @class ApiResponseMetadata\n */\nvar _ApiResponseMetadata_brand = /*#__PURE__*/new WeakSet();\nclass ApiResponseMetadata {\n /**\n * Constructs a new <code>ApiResponseMetadata</code>.\n * The metadata associated with an API response. This value is always present and minimally contains the self-link for the API request that produced this response. It also contains pagination data for the paginated requests. \n * @alias module:Ntnx/ApiResponseMetadata\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ApiResponseMetadata_brand);\n this.$objectType = \"common.v1.response.ApiResponseMetadata\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ApiResponseMetadata</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ApiResponseMetadata} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ApiResponseMetadata} The populated <code>ApiResponseMetadata</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ApiResponseMetadata();\n if (data.hasOwnProperty('flags') && data.flags !== null && data.flags !== undefined) {\n itemArr = [];\n items = data.flags;\n for (i = 0; i < items.length; i++) {\n item = _config_Flag__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setFlags(itemArr);\n }\n if (data.hasOwnProperty('links') && data.links !== null && data.links !== undefined) {\n itemArr = [];\n items = data.links;\n for (i = 0; i < items.length; i++) {\n item = _ApiLink__WEBPACK_IMPORTED_MODULE_3__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setLinks(itemArr);\n }\n if (data.hasOwnProperty('totalAvailableResults') && data.totalAvailableResults !== null && data.totalAvailableResults !== undefined) {\n obj.setTotalAvailableResults(data['totalAvailableResults']);\n }\n if (data.hasOwnProperty('messages') && data.messages !== null && data.messages !== undefined) {\n itemArr = [];\n items = data.messages;\n for (i = 0; i < items.length; i++) {\n item = _config_Message__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setMessages(itemArr);\n }\n if (data.hasOwnProperty('extraInfo') && data.extraInfo !== null && data.extraInfo !== undefined) {\n itemArr = [];\n items = data.extraInfo;\n for (i = 0; i < items.length; i++) {\n item = _config_KVPair__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setExtraInfo(itemArr);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns An array of flags that may indicate the status of the response. For example, a flag with the name 'isPaginated' and value 'false', indicates that the response is not paginated. \n * @return {Flag[]}\n */\n getFlags() {\n return this.flags;\n }\n\n /**\n * Sets An array of flags that may indicate the status of the response. For example, a flag with the name 'isPaginated' and value 'false', indicates that the response is not paginated. \n * @param {Flag[]} flags An array of flags that may indicate the status of the response. For example, a flag with the name 'isPaginated' and value 'false', indicates that the response is not paginated. \n */\n setFlags(flags) {\n this.flags = flags;\n }\n\n /**\n * Returns An array of HATEOAS style links for the response that may also include pagination links for list operations. \n * @return {ApiLink[]}\n */\n getLinks() {\n return this.links;\n }\n\n /**\n * Sets An array of HATEOAS style links for the response that may also include pagination links for list operations. \n * @param {ApiLink[]} links An array of HATEOAS style links for the response that may also include pagination links for list operations. \n */\n setLinks(links) {\n this.links = links;\n }\n\n /**\n * Returns The total number of entities that are available on the server for this type. \n * @return {Number}\n */\n getTotalAvailableResults() {\n return this.totalAvailableResults;\n }\n\n /**\n * Sets The total number of entities that are available on the server for this type. \n * @param {Number} totalAvailableResults The total number of entities that are available on the server for this type. \n */\n setTotalAvailableResults(totalAvailableResults) {\n this.totalAvailableResults = totalAvailableResults;\n }\n\n /**\n * Returns Information, Warning or Error messages that might provide additional contextual information related to the operation. \n * @return {Message[]}\n */\n getMessages() {\n return this.messages;\n }\n\n /**\n * Sets Information, Warning or Error messages that might provide additional contextual information related to the operation. \n * @param {Message[]} messages Information, Warning or Error messages that might provide additional contextual information related to the operation. \n */\n setMessages(messages) {\n this.messages = messages;\n }\n\n /**\n * Returns An array of entity-specific metadata \n * @return {KVPair[]}\n */\n getExtraInfo() {\n return this.extraInfo;\n }\n\n /**\n * Sets An array of entity-specific metadata \n * @param {KVPair[]} extraInfo An array of entity-specific metadata \n */\n setExtraInfo(extraInfo) {\n this.extraInfo = extraInfo;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getFlags() !== 'undefined' && this.getFlags() !== null ? {\n 'flags': this.getFlags().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {\n 'links': this.getLinks().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTotalAvailableResults() !== 'undefined' && this.getTotalAvailableResults() !== null ? {\n 'totalAvailableResults': this.getTotalAvailableResults()\n } : {}),\n ...(typeof this.getMessages() !== 'undefined' && this.getMessages() !== null ? {\n 'messages': this.getMessages().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getExtraInfo() !== 'undefined' && this.getExtraInfo() !== null ? {\n 'extraInfo': this.getExtraInfo().map(item => item.toJson(false))\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getFlags() !== 'undefined' && this.getFlags() !== null ? {\n 'flags': this.getFlags().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {\n 'links': this.getLinks().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTotalAvailableResults() !== 'undefined' && this.getTotalAvailableResults() !== null ? {\n 'totalAvailableResults': this.getTotalAvailableResults()\n } : {}),\n ...(typeof this.getMessages() !== 'undefined' && this.getMessages() !== null ? {\n 'messages': this.getMessages().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getExtraInfo() !== 'undefined' && this.getExtraInfo() !== null ? {\n 'extraInfo': this.getExtraInfo().map(item => item.toJson(false))\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_4__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"flags\") {\n if (typeof this.flags === 'undefined' || this.flags === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"flags\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].validateMaxItems(this.flags, 20)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"flags\", \"does not satisfy required maxItems constraint: 20\");\n }\n }\n if (property === \"links\") {\n if (typeof this.links === 'undefined' || this.links === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"links\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].validateMaxItems(this.links, 20)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"links\", \"does not satisfy required maxItems constraint: 20\");\n }\n }\n if (property === \"totalAvailableResults\") {\n if (typeof this.totalAvailableResults === 'undefined' || this.totalAvailableResults === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"totalAvailableResults\", \"undefined or null\");\n }\n }\n if (property === \"messages\") {\n if (typeof this.messages === 'undefined' || this.messages === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"messages\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].validateMaxItems(this.messages, 20)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"messages\", \"does not satisfy required maxItems constraint: 20\");\n }\n }\n if (property === \"extraInfo\") {\n if (typeof this.extraInfo === 'undefined' || this.extraInfo === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"extraInfo\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].validateMaxItems(this.extraInfo, 20)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"extraInfo\", \"does not satisfy required maxItems constraint: 20\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * An array of flags that may indicate the status of the response. For example, a flag with the name 'isPaginated' and value 'false', indicates that the response is not paginated. \n * @memberof ApiResponseMetadata\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nApiResponseMetadata.prototype.flags = undefined;\n\n/**\n * An array of HATEOAS style links for the response that may also include pagination links for list operations. \n * @memberof ApiResponseMetadata\n */\nApiResponseMetadata.prototype.links = undefined;\n\n/**\n * The total number of entities that are available on the server for this type. \n * @memberof ApiResponseMetadata\n */\nApiResponseMetadata.prototype.totalAvailableResults = undefined;\n\n/**\n * Information, Warning or Error messages that might provide additional contextual information related to the operation. \n * @memberof ApiResponseMetadata\n */\nApiResponseMetadata.prototype.messages = undefined;\n\n/**\n * An array of entity-specific metadata \n * @memberof ApiResponseMetadata\n */\nApiResponseMetadata.prototype.extraInfo = undefined;\nApiResponseMetadata.prototype.$reserved = undefined;\nApiResponseMetadata.prototype.$objectType = undefined;\nApiResponseMetadata.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js?\n}");
|
|
408
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ApiResponseMetadata)\n/* harmony export */ });\n/* harmony import */ var _config_Flag__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config/Flag */ \"./target/generated-sources/swagger/src/models/common/v1/config/Flag.js\");\n/* harmony import */ var _config_KVPair__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config/KVPair */ \"./target/generated-sources/swagger/src/models/common/v1/config/KVPair.js\");\n/* harmony import */ var _config_Message__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config/Message */ \"./target/generated-sources/swagger/src/models/common/v1/config/Message.js\");\n/* harmony import */ var _ApiLink__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ApiLink */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiLink.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The ApiResponseMetadata model module.\n * @module Ntnx/ApiResponseMetadata\n * @version 4.0.3\n * @class ApiResponseMetadata\n */\nvar _ApiResponseMetadata_brand = /*#__PURE__*/new WeakSet();\nclass ApiResponseMetadata {\n /**\n * Constructs a new <code>ApiResponseMetadata</code>.\n * The metadata associated with an API response. This value is always present and minimally contains the self-link for the API request that produced this response. It also contains pagination data for the paginated requests. \n * @alias module:Ntnx/ApiResponseMetadata\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ApiResponseMetadata_brand);\n this.$objectType = \"common.v1.response.ApiResponseMetadata\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ApiResponseMetadata</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ApiResponseMetadata} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ApiResponseMetadata} The populated <code>ApiResponseMetadata</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ApiResponseMetadata();\n if (data.hasOwnProperty('flags') && data.flags !== null && data.flags !== undefined) {\n itemArr = [];\n items = data.flags;\n for (i = 0; i < items.length; i++) {\n item = _config_Flag__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setFlags(itemArr);\n }\n if (data.hasOwnProperty('links') && data.links !== null && data.links !== undefined) {\n itemArr = [];\n items = data.links;\n for (i = 0; i < items.length; i++) {\n item = _ApiLink__WEBPACK_IMPORTED_MODULE_3__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setLinks(itemArr);\n }\n if (data.hasOwnProperty('totalAvailableResults') && data.totalAvailableResults !== null && data.totalAvailableResults !== undefined) {\n obj.setTotalAvailableResults(data['totalAvailableResults']);\n }\n if (data.hasOwnProperty('messages') && data.messages !== null && data.messages !== undefined) {\n itemArr = [];\n items = data.messages;\n for (i = 0; i < items.length; i++) {\n item = _config_Message__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setMessages(itemArr);\n }\n if (data.hasOwnProperty('extraInfo') && data.extraInfo !== null && data.extraInfo !== undefined) {\n itemArr = [];\n items = data.extraInfo;\n for (i = 0; i < items.length; i++) {\n item = _config_KVPair__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setExtraInfo(itemArr);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns An array of flags that may indicate the status of the response. For example, a flag with the name 'isPaginated' and value 'false', indicates that the response is not paginated. \n * @return {Flag[]}\n */\n getFlags() {\n return this.flags;\n }\n\n /**\n * Sets An array of flags that may indicate the status of the response. For example, a flag with the name 'isPaginated' and value 'false', indicates that the response is not paginated. \n * @param {Flag[]} flags An array of flags that may indicate the status of the response. For example, a flag with the name 'isPaginated' and value 'false', indicates that the response is not paginated. \n */\n setFlags(flags) {\n this.flags = flags;\n }\n\n /**\n * Returns An array of HATEOAS style links for the response that may also include pagination links for list operations. \n * @return {ApiLink[]}\n */\n getLinks() {\n return this.links;\n }\n\n /**\n * Sets An array of HATEOAS style links for the response that may also include pagination links for list operations. \n * @param {ApiLink[]} links An array of HATEOAS style links for the response that may also include pagination links for list operations. \n */\n setLinks(links) {\n this.links = links;\n }\n\n /**\n * Returns The total number of entities that are available on the server for this type. \n * @return {Number}\n */\n getTotalAvailableResults() {\n return this.totalAvailableResults;\n }\n\n /**\n * Sets The total number of entities that are available on the server for this type. \n * @param {Number} totalAvailableResults The total number of entities that are available on the server for this type. \n */\n setTotalAvailableResults(totalAvailableResults) {\n this.totalAvailableResults = totalAvailableResults;\n }\n\n /**\n * Returns Information, Warning or Error messages that might provide additional contextual information related to the operation. \n * @return {Message[]}\n */\n getMessages() {\n return this.messages;\n }\n\n /**\n * Sets Information, Warning or Error messages that might provide additional contextual information related to the operation. \n * @param {Message[]} messages Information, Warning or Error messages that might provide additional contextual information related to the operation. \n */\n setMessages(messages) {\n this.messages = messages;\n }\n\n /**\n * Returns An array of entity-specific metadata \n * @return {KVPair[]}\n */\n getExtraInfo() {\n return this.extraInfo;\n }\n\n /**\n * Sets An array of entity-specific metadata \n * @param {KVPair[]} extraInfo An array of entity-specific metadata \n */\n setExtraInfo(extraInfo) {\n this.extraInfo = extraInfo;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getFlags() !== 'undefined' && this.getFlags() !== null ? {\n 'flags': this.getFlags().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {\n 'links': this.getLinks().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTotalAvailableResults() !== 'undefined' && this.getTotalAvailableResults() !== null ? {\n 'totalAvailableResults': this.getTotalAvailableResults()\n } : {}),\n ...(typeof this.getMessages() !== 'undefined' && this.getMessages() !== null ? {\n 'messages': this.getMessages().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getExtraInfo() !== 'undefined' && this.getExtraInfo() !== null ? {\n 'extraInfo': this.getExtraInfo().map(item => item.toJson(false))\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getFlags() !== 'undefined' && this.getFlags() !== null ? {\n 'flags': this.getFlags().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {\n 'links': this.getLinks().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTotalAvailableResults() !== 'undefined' && this.getTotalAvailableResults() !== null ? {\n 'totalAvailableResults': this.getTotalAvailableResults()\n } : {}),\n ...(typeof this.getMessages() !== 'undefined' && this.getMessages() !== null ? {\n 'messages': this.getMessages().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getExtraInfo() !== 'undefined' && this.getExtraInfo() !== null ? {\n 'extraInfo': this.getExtraInfo().map(item => item.toJson(false))\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_4__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"flags\") {\n if (typeof this.flags === 'undefined' || this.flags === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"flags\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].validateMaxItems(this.flags, 20)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"flags\", \"does not satisfy required maxItems constraint: 20\");\n }\n }\n if (property === \"links\") {\n if (typeof this.links === 'undefined' || this.links === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"links\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].validateMaxItems(this.links, 20)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"links\", \"does not satisfy required maxItems constraint: 20\");\n }\n }\n if (property === \"totalAvailableResults\") {\n if (typeof this.totalAvailableResults === 'undefined' || this.totalAvailableResults === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"totalAvailableResults\", \"undefined or null\");\n }\n }\n if (property === \"messages\") {\n if (typeof this.messages === 'undefined' || this.messages === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"messages\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].validateMaxItems(this.messages, 20)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"messages\", \"does not satisfy required maxItems constraint: 20\");\n }\n }\n if (property === \"extraInfo\") {\n if (typeof this.extraInfo === 'undefined' || this.extraInfo === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"extraInfo\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].validateMaxItems(this.extraInfo, 20)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"extraInfo\", \"does not satisfy required maxItems constraint: 20\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * An array of flags that may indicate the status of the response. For example, a flag with the name 'isPaginated' and value 'false', indicates that the response is not paginated. \n * @memberof ApiResponseMetadata\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nApiResponseMetadata.prototype.flags = undefined;\n\n/**\n * An array of HATEOAS style links for the response that may also include pagination links for list operations. \n * @memberof ApiResponseMetadata\n */\nApiResponseMetadata.prototype.links = undefined;\n\n/**\n * The total number of entities that are available on the server for this type. \n * @memberof ApiResponseMetadata\n */\nApiResponseMetadata.prototype.totalAvailableResults = undefined;\n\n/**\n * Information, Warning or Error messages that might provide additional contextual information related to the operation. \n * @memberof ApiResponseMetadata\n */\nApiResponseMetadata.prototype.messages = undefined;\n\n/**\n * An array of entity-specific metadata \n * @memberof ApiResponseMetadata\n */\nApiResponseMetadata.prototype.extraInfo = undefined;\nApiResponseMetadata.prototype.$reserved = undefined;\nApiResponseMetadata.prototype.$objectType = undefined;\nApiResponseMetadata.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js?\n}");
|
|
409
409
|
|
|
410
410
|
/***/ },
|
|
411
411
|
|
|
@@ -416,7 +416,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
416
416
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
417
417
|
|
|
418
418
|
"use strict";
|
|
419
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ExternalizableAbstractModel)\n/* harmony export */ });\n/* harmony import */ var _config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config/TenantAwareModel */ \"./target/generated-sources/swagger/src/models/common/v1/config/TenantAwareModel.js\");\n/* harmony import */ var _ApiLink__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ApiLink */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiLink.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n/**\n * The ExternalizableAbstractModel model module.\n * @module Ntnx/ExternalizableAbstractModel\n * @version 4.0.2\n * @class ExternalizableAbstractModel\n * @extends TenantAwareModel\n */\nvar _ExternalizableAbstractModel_brand = /*#__PURE__*/new WeakSet();\nclass ExternalizableAbstractModel extends _config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * Constructs a new <code>ExternalizableAbstractModel</code>.\n * A model that represents an object instance that is accessible through an API endpoint. Instances of this type get an extId field that contains the globally unique identifier for that instance. Externally accessible instances are always tenant aware and, therefore, extend the TenantAwareModel \n * @alias module:Ntnx/ExternalizableAbstractModel\n * @extends module:Ntnx/TenantAwareModel\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ExternalizableAbstractModel_brand);\n this.$objectType = \"common.v1.response.ExternalizableAbstractModel\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ExternalizableAbstractModel</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ExternalizableAbstractModel} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ExternalizableAbstractModel} The populated <code>ExternalizableAbstractModel</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ExternalizableAbstractModel();\n _config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data, obj, true);\n if (data.hasOwnProperty('extId') && data.extId !== null && data.extId !== undefined) {\n obj.setExtId(data['extId']);\n }\n if (data.hasOwnProperty('links') && data.links !== null && data.links !== undefined) {\n itemArr = [];\n items = data.links;\n for (i = 0; i < items.length; i++) {\n item = _ApiLink__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setLinks(itemArr);\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns A globally unique identifier of an instance that is suitable for external consumption. \n * @return {string}\n */\n getExtId() {\n return this.extId;\n }\n\n /**\n * Sets A globally unique identifier of an instance that is suitable for external consumption. \n * @param {string} extId A globally unique identifier of an instance that is suitable for external consumption. \n */\n setExtId(extId) {\n this.extId = extId;\n }\n\n /**\n * Returns A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @return {ApiLink[]}\n */\n getLinks() {\n return this.links;\n }\n\n /**\n * Sets A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @param {ApiLink[]} links A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n */\n setLinks(links) {\n this.links = links;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {\n 'extId': this.getExtId()\n } : {}),\n ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {\n 'links': this.getLinks().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {\n 'tenantId': this.getTenantId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"extId\") {\n if (typeof this.extId === 'undefined' || this.extId === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"extId\", \"undefined or null\");\n }\n if (typeof scope === 'undefined' || scope === null) {\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].validatePattern(this.extId, /^[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}$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"extId\", \"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}$/\");\n }\n } else if (scope === _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__[\"default\"].update) {\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].validatePattern(this.extId, /^[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}$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"extId\", \"does not satisfy 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}$/\");\n }\n }\n }\n if (property === \"links\") {\n if (typeof this.links === 'undefined' || this.links === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"links\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].validateMaxItems(this.links, 20)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"links\", \"does not satisfy required maxItems constraint: 20\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * A globally unique identifier of an instance that is suitable for external consumption. \n * @memberof ExternalizableAbstractModel\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nExternalizableAbstractModel.prototype.extId = undefined;\n\n/**\n * A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @memberof ExternalizableAbstractModel\n */\nExternalizableAbstractModel.prototype.links = undefined;\n\n/**\n * 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). \n * @memberof ExternalizableAbstractModel\n */\n_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_0__[\"default\"].prototype.tenantId = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/response/ExternalizableAbstractModel.js?\n}");
|
|
419
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ExternalizableAbstractModel)\n/* harmony export */ });\n/* harmony import */ var _config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config/TenantAwareModel */ \"./target/generated-sources/swagger/src/models/common/v1/config/TenantAwareModel.js\");\n/* harmony import */ var _ApiLink__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ApiLink */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiLink.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n/**\n * The ExternalizableAbstractModel model module.\n * @module Ntnx/ExternalizableAbstractModel\n * @version 4.0.3\n * @class ExternalizableAbstractModel\n * @extends TenantAwareModel\n */\nvar _ExternalizableAbstractModel_brand = /*#__PURE__*/new WeakSet();\nclass ExternalizableAbstractModel extends _config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n /**\n * Constructs a new <code>ExternalizableAbstractModel</code>.\n * A model that represents an object instance that is accessible through an API endpoint. Instances of this type get an extId field that contains the globally unique identifier for that instance. Externally accessible instances are always tenant aware and, therefore, extend the TenantAwareModel \n * @alias module:Ntnx/ExternalizableAbstractModel\n * @extends module:Ntnx/TenantAwareModel\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ExternalizableAbstractModel_brand);\n this.$objectType = \"common.v1.response.ExternalizableAbstractModel\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ExternalizableAbstractModel</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ExternalizableAbstractModel} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ExternalizableAbstractModel} The populated <code>ExternalizableAbstractModel</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ExternalizableAbstractModel();\n _config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data, obj, true);\n if (data.hasOwnProperty('extId') && data.extId !== null && data.extId !== undefined) {\n obj.setExtId(data['extId']);\n }\n if (data.hasOwnProperty('links') && data.links !== null && data.links !== undefined) {\n itemArr = [];\n items = data.links;\n for (i = 0; i < items.length; i++) {\n item = _ApiLink__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setLinks(itemArr);\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns A globally unique identifier of an instance that is suitable for external consumption. \n * @return {string}\n */\n getExtId() {\n return this.extId;\n }\n\n /**\n * Sets A globally unique identifier of an instance that is suitable for external consumption. \n * @param {string} extId A globally unique identifier of an instance that is suitable for external consumption. \n */\n setExtId(extId) {\n this.extId = extId;\n }\n\n /**\n * Returns A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @return {ApiLink[]}\n */\n getLinks() {\n return this.links;\n }\n\n /**\n * Sets A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @param {ApiLink[]} links A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n */\n setLinks(links) {\n this.links = links;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {\n 'extId': this.getExtId()\n } : {}),\n ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {\n 'links': this.getLinks().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {\n 'tenantId': this.getTenantId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"extId\") {\n if (typeof this.extId === 'undefined' || this.extId === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"extId\", \"undefined or null\");\n }\n if (typeof scope === 'undefined' || scope === null) {\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].validatePattern(this.extId, /^[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}$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"extId\", \"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}$/\");\n }\n } else if (scope === _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__[\"default\"].update) {\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].validatePattern(this.extId, /^[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}$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"extId\", \"does not satisfy 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}$/\");\n }\n }\n }\n if (property === \"links\") {\n if (typeof this.links === 'undefined' || this.links === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"links\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].validateMaxItems(this.links, 20)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"links\", \"does not satisfy required maxItems constraint: 20\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * A globally unique identifier of an instance that is suitable for external consumption. \n * @memberof ExternalizableAbstractModel\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nExternalizableAbstractModel.prototype.extId = undefined;\n\n/**\n * A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @memberof ExternalizableAbstractModel\n */\nExternalizableAbstractModel.prototype.links = undefined;\n\n/**\n * 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). \n * @memberof ExternalizableAbstractModel\n */\n_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_0__[\"default\"].prototype.tenantId = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/response/ExternalizableAbstractModel.js?\n}");
|
|
420
420
|
|
|
421
421
|
/***/ },
|
|
422
422
|
|
|
@@ -427,7 +427,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
427
427
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
428
428
|
|
|
429
429
|
"use strict";
|
|
430
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.
|
|
430
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * Enum class DownSamplingOperator.\n * @enum {string}\n * @readonly\n */\nconst DownSamplingOperator = {\n /** \n * Unknown value.\n * @const\n */\n $UNKNOWN: \"$UNKNOWN\",\n /** \n * Redacted value.\n * @const\n */\n $REDACTED: \"$REDACTED\",\n /** \n * Aggregation with sum of all values.\n * @const\n */\n SUM: \"SUM\",\n /** \n * Aggregation containing lowest of all values.\n * @const\n */\n MIN: \"MIN\",\n /** \n * Aggregation containing highest of all values.\n * @const\n */\n MAX: \"MAX\",\n /** \n * Aggregation indicating mean or average of all values.\n * @const\n */\n AVG: \"AVG\",\n /** \n * Aggregation containing total count of values.\n * @const\n */\n COUNT: \"COUNT\",\n /** \n * Aggregation containing only the last recorded value.\n * @const\n */\n LAST: \"LAST\"\n};\n\n/**\n* Returns a <code>DownSamplingOperator</code> enum value from a JavaScript object name.\n* @param {Object} obj The plain JavaScript object containing the name of the enum value.\n* @return {DownSamplingOperator} The enum <code>DownSamplingOperator</code> value.\n*/\nDownSamplingOperator.constructFromObject = function (obj) {\n if (typeof obj === 'string' || obj instanceof String) {\n let enumVal = Object.keys(DownSamplingOperator).find(key => DownSamplingOperator[key] === obj);\n return enumVal === undefined || enumVal === null ? DownSamplingOperator.$UNKNOWN : DownSamplingOperator[enumVal];\n } else {\n throw new Error(\"Received object name is not an instance of String\");\n }\n};\n\n/**\n* Validates <code>DownSamplingOperator</code> enum value.\n* @param {Object} obj The plain JavaScript object containing the name of the enum value.\n* @return {null} Throws error for invalid value.\n*/\nDownSamplingOperator.validate = function (obj) {\n switch (obj) {\n case DownSamplingOperator.$UNKNOWN:\n case DownSamplingOperator.$REDACTED:\n case DownSamplingOperator.SUM:\n case DownSamplingOperator.MIN:\n case DownSamplingOperator.MAX:\n case DownSamplingOperator.AVG:\n case DownSamplingOperator.COUNT:\n case DownSamplingOperator.LAST:\n return;\n default:\n throw new Error(\"Invalid : must be DownSamplingOperator.{ $UNKNOWN|$REDACTED|SUM|MIN|MAX|AVG|COUNT|LAST }\");\n }\n};\nObject.freeze(DownSamplingOperator);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DownSamplingOperator);\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/stats/DownSamplingOperator.js?\n}");
|
|
431
431
|
|
|
432
432
|
/***/ },
|
|
433
433
|
|
|
@@ -438,7 +438,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
438
438
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
439
439
|
|
|
440
440
|
"use strict";
|
|
441
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ TimeIntValuePair)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The TimeIntValuePair model module.\n * @module Ntnx/TimeIntValuePair\n * @version 4.0.2\n * @class TimeIntValuePair\n */\nvar _TimeIntValuePair_brand = /*#__PURE__*/new WeakSet();\nclass TimeIntValuePair {\n /**\n * Constructs a new <code>TimeIntValuePair</code>.\n * A time value pair representing a stat associated with a given entity at a given point of date and time represented in extended ISO-8601 format.\\"\n * @alias module:Ntnx/TimeIntValuePair\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _TimeIntValuePair_brand);\n this.$objectType = \"common.v1.stats.TimeIntValuePair\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>TimeIntValuePair</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/TimeIntValuePair} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/TimeIntValuePair} The populated <code>TimeIntValuePair</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new TimeIntValuePair();\n if (data.hasOwnProperty('value') && data.value !== null && data.value !== undefined) {\n obj.setValue(data['value']);\n }\n if (data.hasOwnProperty('timestamp') && data.timestamp !== null && data.timestamp !== undefined) {\n obj.setTimestamp(data['timestamp']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns Value of the stat at the recorded date and time in extended ISO-8601 format.\\\"\n * @return {Number}\n */\n getValue() {\n return this.value;\n }\n\n /**\n * Sets Value of the stat at the recorded date and time in extended ISO-8601 format.\\\"\n * @param {Number} value Value of the stat at the recorded date and time in extended ISO-8601 format.\\\"\n */\n setValue(value) {\n this.value = value;\n }\n\n /**\n * Returns The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n * @return {Date}\n */\n getTimestamp() {\n return this.timestamp;\n }\n\n /**\n * Sets The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n * @param {Date} timestamp The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n */\n setTimestamp(timestamp) {\n this.timestamp = timestamp;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getTimestamp() !== 'undefined' && this.getTimestamp() !== null ? {\n 'timestamp': _assertClassBrand(_TimeIntValuePair_brand, this, _handleDateType).call(this, this.getTimestamp(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getTimestamp() !== 'undefined' && this.getTimestamp() !== null ? {\n 'timestamp': _assertClassBrand(_TimeIntValuePair_brand, this, _handleDateType).call(this, this.getTimestamp(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"value\") {\n if (typeof this.value === 'undefined' || this.value === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"undefined or null\");\n }\n }\n if (property === \"timestamp\") {\n if (typeof this.timestamp === 'undefined' || this.timestamp === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"timestamp\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * Value of the stat at the recorded date and time in extended ISO-8601 format.\\\"\n * @memberof TimeIntValuePair\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nTimeIntValuePair.prototype.value = undefined;\n\n/**\n * The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n * @memberof TimeIntValuePair\n */\nTimeIntValuePair.prototype.timestamp = undefined;\nTimeIntValuePair.prototype.$reserved = undefined;\nTimeIntValuePair.prototype.$objectType = undefined;\nTimeIntValuePair.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/stats/TimeIntValuePair.js?\n}");
|
|
441
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ TimeIntValuePair)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The TimeIntValuePair model module.\n * @module Ntnx/TimeIntValuePair\n * @version 4.0.3\n * @class TimeIntValuePair\n */\nvar _TimeIntValuePair_brand = /*#__PURE__*/new WeakSet();\nclass TimeIntValuePair {\n /**\n * Constructs a new <code>TimeIntValuePair</code>.\n * A time value pair representing a stat associated with a given entity at a given point of date and time represented in extended ISO-8601 format.\\"\n * @alias module:Ntnx/TimeIntValuePair\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _TimeIntValuePair_brand);\n this.$objectType = \"common.v1.stats.TimeIntValuePair\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v1.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>TimeIntValuePair</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/TimeIntValuePair} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/TimeIntValuePair} The populated <code>TimeIntValuePair</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new TimeIntValuePair();\n if (data.hasOwnProperty('value') && data.value !== null && data.value !== undefined) {\n obj.setValue(data['value']);\n }\n if (data.hasOwnProperty('timestamp') && data.timestamp !== null && data.timestamp !== undefined) {\n obj.setTimestamp(data['timestamp']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns Value of the stat at the recorded date and time in extended ISO-8601 format.\\\"\n * @return {Number}\n */\n getValue() {\n return this.value;\n }\n\n /**\n * Sets Value of the stat at the recorded date and time in extended ISO-8601 format.\\\"\n * @param {Number} value Value of the stat at the recorded date and time in extended ISO-8601 format.\\\"\n */\n setValue(value) {\n this.value = value;\n }\n\n /**\n * Returns The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n * @return {Date}\n */\n getTimestamp() {\n return this.timestamp;\n }\n\n /**\n * Sets The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n * @param {Date} timestamp The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n */\n setTimestamp(timestamp) {\n this.timestamp = timestamp;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getTimestamp() !== 'undefined' && this.getTimestamp() !== null ? {\n 'timestamp': _assertClassBrand(_TimeIntValuePair_brand, this, _handleDateType).call(this, this.getTimestamp(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getTimestamp() !== 'undefined' && this.getTimestamp() !== null ? {\n 'timestamp': _assertClassBrand(_TimeIntValuePair_brand, this, _handleDateType).call(this, this.getTimestamp(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"value\") {\n if (typeof this.value === 'undefined' || this.value === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"undefined or null\");\n }\n }\n if (property === \"timestamp\") {\n if (typeof this.timestamp === 'undefined' || this.timestamp === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"timestamp\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * Value of the stat at the recorded date and time in extended ISO-8601 format.\\\"\n * @memberof TimeIntValuePair\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nTimeIntValuePair.prototype.value = undefined;\n\n/**\n * The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n * @memberof TimeIntValuePair\n */\nTimeIntValuePair.prototype.timestamp = undefined;\nTimeIntValuePair.prototype.$reserved = undefined;\nTimeIntValuePair.prototype.$objectType = undefined;\nTimeIntValuePair.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/common/v1/stats/TimeIntValuePair.js?\n}");
|
|
442
442
|
|
|
443
443
|
/***/ },
|
|
444
444
|
|
|
@@ -449,7 +449,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
449
449
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
450
450
|
|
|
451
451
|
"use strict";
|
|
452
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Certificate)\n/* harmony export */ });\n/* harmony import */ var _common_v1_config_FQDN__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/config/FQDN */ \"./target/generated-sources/swagger/src/models/common/v1/config/FQDN.js\");\n/* harmony import */ var _common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/v1/config/IPAddress */ \"./target/generated-sources/swagger/src/models/common/v1/config/IPAddress.js\");\n/* harmony import */ var _common_v1_config_Metadata__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/v1/config/Metadata */ \"./target/generated-sources/swagger/src/models/common/v1/config/Metadata.js\");\n/* harmony import */ var _common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/v1/config/TenantAwareModel */ \"./target/generated-sources/swagger/src/models/common/v1/config/TenantAwareModel.js\");\n/* harmony import */ var _common_v1_response_ApiLink__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/v1/response/ApiLink */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiLink.js\");\n/* harmony import */ var _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/v1/response/ExternalizableAbstractModel */ \"./target/generated-sources/swagger/src/models/common/v1/response/ExternalizableAbstractModel.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * The Certificate model module.\n * @module Ntnx/Certificate\n * @version 4.0.2\n * @class Certificate\n * @extends ExternalizableAbstractModel\n */\nvar _Certificate_brand = /*#__PURE__*/new WeakSet();\nclass Certificate extends _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_5__[\"default\"] {\n /**\n * Constructs a new <code>Certificate</code>.\n * @alias module:Ntnx/Certificate\n * @extends module:Ntnx/ExternalizableAbstractModel\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _Certificate_brand);\n this.$objectType = \"objects.v4.config.Certificate\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>Certificate</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/Certificate} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/Certificate} The populated <code>Certificate</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new Certificate();\n _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_5__[\"default\"].constructFromObject(data, obj, true);\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_config_Metadata__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('publicCert') && data.publicCert !== null && data.publicCert !== undefined) {\n obj.setPublicCert(data['publicCert']);\n }\n if (data.hasOwnProperty('privateKey') && data.privateKey !== null && data.privateKey !== undefined) {\n obj.setPrivateKey(data['privateKey']);\n }\n if (data.hasOwnProperty('ca') && data.ca !== null && data.ca !== undefined) {\n obj.setCa(data['ca']);\n }\n if (data.hasOwnProperty('alternateFqdns') && data.alternateFqdns !== null && data.alternateFqdns !== undefined) {\n itemArr = [];\n items = data.alternateFqdns;\n for (i = 0; i < items.length; i++) {\n item = _common_v1_config_FQDN__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setAlternateFqdns(itemArr);\n }\n if (data.hasOwnProperty('shouldGenerate') && data.shouldGenerate !== null && data.shouldGenerate !== undefined) {\n obj.setShouldGenerate(data['shouldGenerate']);\n }\n if (data.hasOwnProperty('alternateIps') && data.alternateIps !== null && data.alternateIps !== undefined) {\n itemArr = [];\n items = data.alternateIps;\n for (i = 0; i < items.length; i++) {\n item = _common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setAlternateIps(itemArr);\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {Metadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {Metadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * Returns The public certificate to upload.\n * @return {string}\n */\n getPublicCert() {\n return this.publicCert;\n }\n\n /**\n * Sets The public certificate to upload.\n * @param {string} publicCert The public certificate to upload.\n */\n setPublicCert(publicCert) {\n this.publicCert = publicCert;\n }\n\n /**\n * Returns The private key to upload.\n * @return {string}\n */\n getPrivateKey() {\n return this.privateKey;\n }\n\n /**\n * Sets The private key to upload.\n * @param {string} privateKey The private key to upload.\n */\n setPrivateKey(privateKey) {\n this.privateKey = privateKey;\n }\n\n /**\n * Returns The CA certificate or chain to upload.\n * @return {string}\n */\n getCa() {\n return this.ca;\n }\n\n /**\n * Sets The CA certificate or chain to upload.\n * @param {string} ca The CA certificate or chain to upload.\n */\n setCa(ca) {\n this.ca = ca;\n }\n\n /**\n * Returns The list of alternate FQDNs for accessing the Object store. The FQDNs must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens or underscores but must begin and end with a letter. Each part can be up to 63 characters long. For e.g 'objects-0.pc_nutanix.com'. \n * @return {FQDN[]}\n */\n getAlternateFqdns() {\n return this.alternateFqdns;\n }\n\n /**\n * Sets The list of alternate FQDNs for accessing the Object store. The FQDNs must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens or underscores but must begin and end with a letter. Each part can be up to 63 characters long. For e.g 'objects-0.pc_nutanix.com'. \n * @param {FQDN[]} alternateFqdns The list of alternate FQDNs for accessing the Object store. The FQDNs must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens or underscores but must begin and end with a letter. Each part can be up to 63 characters long. For e.g 'objects-0.pc_nutanix.com'. \n */\n setAlternateFqdns(alternateFqdns) {\n this.alternateFqdns = alternateFqdns;\n }\n\n /**\n * Returns If true, the certificate is generated with the provided alternate FQDNs and IPs.\n * @return {boolean}\n */\n getShouldGenerate() {\n return this.shouldGenerate;\n }\n\n /**\n * Sets If true, the certificate is generated with the provided alternate FQDNs and IPs.\n * @param {boolean} shouldGenerate If true, the certificate is generated with the provided alternate FQDNs and IPs.\n */\n setShouldGenerate(shouldGenerate) {\n this.shouldGenerate = shouldGenerate;\n }\n\n /**\n * Returns A list of the IPs included as Subject Alternative Names (SANs) in the certificate. The IPs must be among the public IPs of the Object store (publicNetworkIps).\n * @return {IPAddress[]}\n */\n getAlternateIps() {\n return this.alternateIps;\n }\n\n /**\n * Sets A list of the IPs included as Subject Alternative Names (SANs) in the certificate. The IPs must be among the public IPs of the Object store (publicNetworkIps).\n * @param {IPAddress[]} alternateIps A list of the IPs included as Subject Alternative Names (SANs) in the certificate. The IPs must be among the public IPs of the Object store (publicNetworkIps).\n */\n setAlternateIps(alternateIps) {\n this.alternateIps = alternateIps;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getPublicCert() !== 'undefined' && this.getPublicCert() !== null ? {\n 'publicCert': this.getPublicCert()\n } : {}),\n ...(typeof this.getPrivateKey() !== 'undefined' && this.getPrivateKey() !== null ? {\n 'privateKey': this.getPrivateKey()\n } : {}),\n ...(typeof this.getCa() !== 'undefined' && this.getCa() !== null ? {\n 'ca': this.getCa()\n } : {}),\n ...(typeof this.getAlternateFqdns() !== 'undefined' && this.getAlternateFqdns() !== null ? {\n 'alternateFqdns': this.getAlternateFqdns().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getShouldGenerate() !== 'undefined' && this.getShouldGenerate() !== null ? {\n 'shouldGenerate': this.getShouldGenerate()\n } : {}),\n ...(typeof this.getAlternateIps() !== 'undefined' && this.getAlternateIps() !== null ? {\n 'alternateIps': this.getAlternateIps().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {\n 'extId': this.getExtId()\n } : {}),\n ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {\n 'links': this.getLinks().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {\n 'tenantId': this.getTenantId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getPublicCert() !== 'undefined' && this.getPublicCert() !== null ? {\n 'publicCert': this.getPublicCert()\n } : {}),\n ...(typeof this.getPrivateKey() !== 'undefined' && this.getPrivateKey() !== null ? {\n 'privateKey': this.getPrivateKey()\n } : {}),\n ...(typeof this.getCa() !== 'undefined' && this.getCa() !== null ? {\n 'ca': this.getCa()\n } : {}),\n ...(typeof this.getAlternateFqdns() !== 'undefined' && this.getAlternateFqdns() !== null ? {\n 'alternateFqdns': this.getAlternateFqdns().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getShouldGenerate() !== 'undefined' && this.getShouldGenerate() !== null ? {\n 'shouldGenerate': this.getShouldGenerate()\n } : {}),\n ...(typeof this.getAlternateIps() !== 'undefined' && this.getAlternateIps() !== null ? {\n 'alternateIps': this.getAlternateIps().map(item => item.toJson(false))\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_6__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"publicCert\") {\n if (typeof this.publicCert === 'undefined' || this.publicCert === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicCert\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.publicCert, 2000000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicCert\", \"does not satisfy required maxLength constraint: 2000000\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinLength(this.publicCert, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicCert\", \"does not satisfy required minLength constraint: 1\");\n }\n }\n if (property === \"privateKey\") {\n if (typeof this.privateKey === 'undefined' || this.privateKey === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"privateKey\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.privateKey, 2000000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"privateKey\", \"does not satisfy required maxLength constraint: 2000000\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinLength(this.privateKey, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"privateKey\", \"does not satisfy required minLength constraint: 1\");\n }\n }\n if (property === \"ca\") {\n if (typeof this.ca === 'undefined' || this.ca === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"ca\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.ca, 2000000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"ca\", \"does not satisfy required maxLength constraint: 2000000\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinLength(this.ca, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"ca\", \"does not satisfy required minLength constraint: 1\");\n }\n }\n if (property === \"alternateFqdns\") {\n if (typeof this.alternateFqdns === 'undefined' || this.alternateFqdns === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"alternateFqdns\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxItems(this.alternateFqdns, 999)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"alternateFqdns\", \"does not satisfy required maxItems constraint: 999\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinItems(this.alternateFqdns, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"alternateFqdns\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"shouldGenerate\") {\n if (typeof this.shouldGenerate === 'undefined' || this.shouldGenerate === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"shouldGenerate\", \"undefined or null\");\n }\n }\n if (property === \"alternateIps\") {\n if (typeof this.alternateIps === 'undefined' || this.alternateIps === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"alternateIps\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxItems(this.alternateIps, 1000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"alternateIps\", \"does not satisfy required maxItems constraint: 1000\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinItems(this.alternateIps, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"alternateIps\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof Certificate\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nCertificate.prototype.metadata = undefined;\n\n/**\n * The public certificate to upload.\n * @memberof Certificate\n */\nCertificate.prototype.publicCert = undefined;\n\n/**\n * The private key to upload.\n * @memberof Certificate\n */\nCertificate.prototype.privateKey = undefined;\n\n/**\n * The CA certificate or chain to upload.\n * @memberof Certificate\n */\nCertificate.prototype.ca = undefined;\n\n/**\n * The list of alternate FQDNs for accessing the Object store. The FQDNs must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens or underscores but must begin and end with a letter. Each part can be up to 63 characters long. For e.g 'objects-0.pc_nutanix.com'. \n * @memberof Certificate\n */\nCertificate.prototype.alternateFqdns = undefined;\n\n/**\n * If true, the certificate is generated with the provided alternate FQDNs and IPs.\n * @memberof Certificate\n * @default false\n */\nCertificate.prototype.shouldGenerate = false;\n\n/**\n * A list of the IPs included as Subject Alternative Names (SANs) in the certificate. The IPs must be among the public IPs of the Object store (publicNetworkIps).\n * @memberof Certificate\n */\nCertificate.prototype.alternateIps = undefined;\n\n/**\n * A globally unique identifier of an instance that is suitable for external consumption. \n * @memberof Certificate\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.extId = undefined;\n/**\n * A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @memberof Certificate\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.links = undefined;\n/**\n * 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). \n * @memberof Certificate\n */\n_common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype.tenantId = undefined;\n// Implement OneOfobjects.v4.config.GetCertificateApiResponsedata interface:\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/Certificate.js?\n}");
|
|
452
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Certificate)\n/* harmony export */ });\n/* harmony import */ var _common_v1_config_FQDN__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/config/FQDN */ \"./target/generated-sources/swagger/src/models/common/v1/config/FQDN.js\");\n/* harmony import */ var _common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/v1/config/IPAddress */ \"./target/generated-sources/swagger/src/models/common/v1/config/IPAddress.js\");\n/* harmony import */ var _common_v1_config_Metadata__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/v1/config/Metadata */ \"./target/generated-sources/swagger/src/models/common/v1/config/Metadata.js\");\n/* harmony import */ var _common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/v1/config/TenantAwareModel */ \"./target/generated-sources/swagger/src/models/common/v1/config/TenantAwareModel.js\");\n/* harmony import */ var _common_v1_response_ApiLink__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/v1/response/ApiLink */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiLink.js\");\n/* harmony import */ var _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/v1/response/ExternalizableAbstractModel */ \"./target/generated-sources/swagger/src/models/common/v1/response/ExternalizableAbstractModel.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * The Certificate model module.\n * @module Ntnx/Certificate\n * @version 4.0.3\n * @class Certificate\n * @extends ExternalizableAbstractModel\n */\nvar _Certificate_brand = /*#__PURE__*/new WeakSet();\nclass Certificate extends _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_5__[\"default\"] {\n /**\n * Constructs a new <code>Certificate</code>.\n * @alias module:Ntnx/Certificate\n * @extends module:Ntnx/ExternalizableAbstractModel\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _Certificate_brand);\n this.$objectType = \"objects.v4.config.Certificate\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>Certificate</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/Certificate} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/Certificate} The populated <code>Certificate</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new Certificate();\n _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_5__[\"default\"].constructFromObject(data, obj, true);\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_config_Metadata__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('publicCert') && data.publicCert !== null && data.publicCert !== undefined) {\n obj.setPublicCert(data['publicCert']);\n }\n if (data.hasOwnProperty('privateKey') && data.privateKey !== null && data.privateKey !== undefined) {\n obj.setPrivateKey(data['privateKey']);\n }\n if (data.hasOwnProperty('ca') && data.ca !== null && data.ca !== undefined) {\n obj.setCa(data['ca']);\n }\n if (data.hasOwnProperty('alternateFqdns') && data.alternateFqdns !== null && data.alternateFqdns !== undefined) {\n itemArr = [];\n items = data.alternateFqdns;\n for (i = 0; i < items.length; i++) {\n item = _common_v1_config_FQDN__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setAlternateFqdns(itemArr);\n }\n if (data.hasOwnProperty('shouldGenerate') && data.shouldGenerate !== null && data.shouldGenerate !== undefined) {\n obj.setShouldGenerate(data['shouldGenerate']);\n }\n if (data.hasOwnProperty('alternateIps') && data.alternateIps !== null && data.alternateIps !== undefined) {\n itemArr = [];\n items = data.alternateIps;\n for (i = 0; i < items.length; i++) {\n item = _common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setAlternateIps(itemArr);\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {Metadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {Metadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * Returns The public certificate to upload.\n * @return {string}\n */\n getPublicCert() {\n return this.publicCert;\n }\n\n /**\n * Sets The public certificate to upload.\n * @param {string} publicCert The public certificate to upload.\n */\n setPublicCert(publicCert) {\n this.publicCert = publicCert;\n }\n\n /**\n * Returns The private key to upload.\n * @return {string}\n */\n getPrivateKey() {\n return this.privateKey;\n }\n\n /**\n * Sets The private key to upload.\n * @param {string} privateKey The private key to upload.\n */\n setPrivateKey(privateKey) {\n this.privateKey = privateKey;\n }\n\n /**\n * Returns The CA certificate or chain to upload.\n * @return {string}\n */\n getCa() {\n return this.ca;\n }\n\n /**\n * Sets The CA certificate or chain to upload.\n * @param {string} ca The CA certificate or chain to upload.\n */\n setCa(ca) {\n this.ca = ca;\n }\n\n /**\n * Returns The list of alternate FQDNs for accessing the Object store. The FQDNs must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens or underscores but must begin and end with a letter. Each part can be up to 63 characters long. For e.g 'objects-0.pc_nutanix.com'. \n * @return {FQDN[]}\n */\n getAlternateFqdns() {\n return this.alternateFqdns;\n }\n\n /**\n * Sets The list of alternate FQDNs for accessing the Object store. The FQDNs must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens or underscores but must begin and end with a letter. Each part can be up to 63 characters long. For e.g 'objects-0.pc_nutanix.com'. \n * @param {FQDN[]} alternateFqdns The list of alternate FQDNs for accessing the Object store. The FQDNs must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens or underscores but must begin and end with a letter. Each part can be up to 63 characters long. For e.g 'objects-0.pc_nutanix.com'. \n */\n setAlternateFqdns(alternateFqdns) {\n this.alternateFqdns = alternateFqdns;\n }\n\n /**\n * Returns If true, the certificate is generated with the provided alternate FQDNs and IPs.\n * @return {boolean}\n */\n getShouldGenerate() {\n return this.shouldGenerate;\n }\n\n /**\n * Sets If true, the certificate is generated with the provided alternate FQDNs and IPs.\n * @param {boolean} shouldGenerate If true, the certificate is generated with the provided alternate FQDNs and IPs.\n */\n setShouldGenerate(shouldGenerate) {\n this.shouldGenerate = shouldGenerate;\n }\n\n /**\n * Returns A list of the IPs included as Subject Alternative Names (SANs) in the certificate. The IPs must be among the public IPs of the Object store (publicNetworkIps).\n * @return {IPAddress[]}\n */\n getAlternateIps() {\n return this.alternateIps;\n }\n\n /**\n * Sets A list of the IPs included as Subject Alternative Names (SANs) in the certificate. The IPs must be among the public IPs of the Object store (publicNetworkIps).\n * @param {IPAddress[]} alternateIps A list of the IPs included as Subject Alternative Names (SANs) in the certificate. The IPs must be among the public IPs of the Object store (publicNetworkIps).\n */\n setAlternateIps(alternateIps) {\n this.alternateIps = alternateIps;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getPublicCert() !== 'undefined' && this.getPublicCert() !== null ? {\n 'publicCert': this.getPublicCert()\n } : {}),\n ...(typeof this.getPrivateKey() !== 'undefined' && this.getPrivateKey() !== null ? {\n 'privateKey': this.getPrivateKey()\n } : {}),\n ...(typeof this.getCa() !== 'undefined' && this.getCa() !== null ? {\n 'ca': this.getCa()\n } : {}),\n ...(typeof this.getAlternateFqdns() !== 'undefined' && this.getAlternateFqdns() !== null ? {\n 'alternateFqdns': this.getAlternateFqdns().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getShouldGenerate() !== 'undefined' && this.getShouldGenerate() !== null ? {\n 'shouldGenerate': this.getShouldGenerate()\n } : {}),\n ...(typeof this.getAlternateIps() !== 'undefined' && this.getAlternateIps() !== null ? {\n 'alternateIps': this.getAlternateIps().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {\n 'extId': this.getExtId()\n } : {}),\n ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {\n 'links': this.getLinks().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {\n 'tenantId': this.getTenantId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getPublicCert() !== 'undefined' && this.getPublicCert() !== null ? {\n 'publicCert': this.getPublicCert()\n } : {}),\n ...(typeof this.getPrivateKey() !== 'undefined' && this.getPrivateKey() !== null ? {\n 'privateKey': this.getPrivateKey()\n } : {}),\n ...(typeof this.getCa() !== 'undefined' && this.getCa() !== null ? {\n 'ca': this.getCa()\n } : {}),\n ...(typeof this.getAlternateFqdns() !== 'undefined' && this.getAlternateFqdns() !== null ? {\n 'alternateFqdns': this.getAlternateFqdns().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getShouldGenerate() !== 'undefined' && this.getShouldGenerate() !== null ? {\n 'shouldGenerate': this.getShouldGenerate()\n } : {}),\n ...(typeof this.getAlternateIps() !== 'undefined' && this.getAlternateIps() !== null ? {\n 'alternateIps': this.getAlternateIps().map(item => item.toJson(false))\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_6__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"publicCert\") {\n if (typeof this.publicCert === 'undefined' || this.publicCert === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicCert\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.publicCert, 2000000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicCert\", \"does not satisfy required maxLength constraint: 2000000\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinLength(this.publicCert, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicCert\", \"does not satisfy required minLength constraint: 1\");\n }\n }\n if (property === \"privateKey\") {\n if (typeof this.privateKey === 'undefined' || this.privateKey === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"privateKey\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.privateKey, 2000000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"privateKey\", \"does not satisfy required maxLength constraint: 2000000\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinLength(this.privateKey, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"privateKey\", \"does not satisfy required minLength constraint: 1\");\n }\n }\n if (property === \"ca\") {\n if (typeof this.ca === 'undefined' || this.ca === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"ca\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.ca, 2000000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"ca\", \"does not satisfy required maxLength constraint: 2000000\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinLength(this.ca, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"ca\", \"does not satisfy required minLength constraint: 1\");\n }\n }\n if (property === \"alternateFqdns\") {\n if (typeof this.alternateFqdns === 'undefined' || this.alternateFqdns === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"alternateFqdns\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxItems(this.alternateFqdns, 999)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"alternateFqdns\", \"does not satisfy required maxItems constraint: 999\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinItems(this.alternateFqdns, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"alternateFqdns\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"shouldGenerate\") {\n if (typeof this.shouldGenerate === 'undefined' || this.shouldGenerate === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"shouldGenerate\", \"undefined or null\");\n }\n }\n if (property === \"alternateIps\") {\n if (typeof this.alternateIps === 'undefined' || this.alternateIps === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"alternateIps\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxItems(this.alternateIps, 1000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"alternateIps\", \"does not satisfy required maxItems constraint: 1000\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinItems(this.alternateIps, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"alternateIps\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof Certificate\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nCertificate.prototype.metadata = undefined;\n\n/**\n * The public certificate to upload.\n * @memberof Certificate\n */\nCertificate.prototype.publicCert = undefined;\n\n/**\n * The private key to upload.\n * @memberof Certificate\n */\nCertificate.prototype.privateKey = undefined;\n\n/**\n * The CA certificate or chain to upload.\n * @memberof Certificate\n */\nCertificate.prototype.ca = undefined;\n\n/**\n * The list of alternate FQDNs for accessing the Object store. The FQDNs must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens or underscores but must begin and end with a letter. Each part can be up to 63 characters long. For e.g 'objects-0.pc_nutanix.com'. \n * @memberof Certificate\n */\nCertificate.prototype.alternateFqdns = undefined;\n\n/**\n * If true, the certificate is generated with the provided alternate FQDNs and IPs.\n * @memberof Certificate\n * @default false\n */\nCertificate.prototype.shouldGenerate = false;\n\n/**\n * A list of the IPs included as Subject Alternative Names (SANs) in the certificate. The IPs must be among the public IPs of the Object store (publicNetworkIps).\n * @memberof Certificate\n */\nCertificate.prototype.alternateIps = undefined;\n\n/**\n * A globally unique identifier of an instance that is suitable for external consumption. \n * @memberof Certificate\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.extId = undefined;\n/**\n * A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @memberof Certificate\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.links = undefined;\n/**\n * 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). \n * @memberof Certificate\n */\n_common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype.tenantId = undefined;\n// Implement OneOfobjects.v4.config.GetCertificateApiResponsedata interface:\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/Certificate.js?\n}");
|
|
453
453
|
|
|
454
454
|
/***/ },
|
|
455
455
|
|
|
@@ -460,7 +460,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
460
460
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
461
461
|
|
|
462
462
|
"use strict";
|
|
463
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ CertificateProjection)\n/* harmony export */ });\n/* harmony import */ var _common_v1_config_FQDN__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/config/FQDN */ \"./target/generated-sources/swagger/src/models/common/v1/config/FQDN.js\");\n/* harmony import */ var _common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/v1/config/IPAddress */ \"./target/generated-sources/swagger/src/models/common/v1/config/IPAddress.js\");\n/* harmony import */ var _common_v1_config_Metadata__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/v1/config/Metadata */ \"./target/generated-sources/swagger/src/models/common/v1/config/Metadata.js\");\n/* harmony import */ var _common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/v1/config/TenantAwareModel */ \"./target/generated-sources/swagger/src/models/common/v1/config/TenantAwareModel.js\");\n/* harmony import */ var _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/v1/response/ExternalizableAbstractModel */ \"./target/generated-sources/swagger/src/models/common/v1/response/ExternalizableAbstractModel.js\");\n/* harmony import */ var _Certificate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Certificate */ \"./target/generated-sources/swagger/src/models/objects/v4/config/Certificate.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.
|
|
463
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ CertificateProjection)\n/* harmony export */ });\n/* harmony import */ var _common_v1_config_FQDN__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/config/FQDN */ \"./target/generated-sources/swagger/src/models/common/v1/config/FQDN.js\");\n/* harmony import */ var _common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/v1/config/IPAddress */ \"./target/generated-sources/swagger/src/models/common/v1/config/IPAddress.js\");\n/* harmony import */ var _common_v1_config_Metadata__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/v1/config/Metadata */ \"./target/generated-sources/swagger/src/models/common/v1/config/Metadata.js\");\n/* harmony import */ var _common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/v1/config/TenantAwareModel */ \"./target/generated-sources/swagger/src/models/common/v1/config/TenantAwareModel.js\");\n/* harmony import */ var _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/v1/response/ExternalizableAbstractModel */ \"./target/generated-sources/swagger/src/models/common/v1/response/ExternalizableAbstractModel.js\");\n/* harmony import */ var _Certificate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Certificate */ \"./target/generated-sources/swagger/src/models/objects/v4/config/Certificate.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * The CertificateProjection model module.\n * @module Ntnx/CertificateProjection\n * @version 4.0.3\n * @class CertificateProjection\n * @extends Certificate\n */\nclass CertificateProjection extends _Certificate__WEBPACK_IMPORTED_MODULE_5__[\"default\"] {\n /**\n * Constructs a new <code>CertificateProjection</code>.\n * @alias module:Ntnx/CertificateProjection\n * @extends module:Ntnx/Certificate\n */\n constructor() {\n super();\n this.$objectType = \"objects.v4.config.CertificateProjection\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>CertificateProjection</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/CertificateProjection} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/CertificateProjection} The populated <code>CertificateProjection</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new CertificateProjection();\n _Certificate__WEBPACK_IMPORTED_MODULE_5__[\"default\"].constructFromObject(data, obj, true);\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_6__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](property, \"no such property exists\");\n }\n}\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/CertificateProjection.js?\n}");
|
|
464
464
|
|
|
465
465
|
/***/ },
|
|
466
466
|
|
|
@@ -471,7 +471,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
471
471
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
472
472
|
|
|
473
473
|
"use strict";
|
|
474
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ CreateCertificateApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../prism/v4/config/TaskReference */ \"./target/generated-sources/swagger/src/models/prism/v4/config/TaskReference.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The CreateCertificateApiResponse model module.\n * @module Ntnx/CreateCertificateApiResponse\n * @version 4.0.2\n * @class CreateCertificateApiResponse\n */\nvar _CreateCertificateApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass CreateCertificateApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"] {\n /**\n * Constructs a new <code>CreateCertificateApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores/{objectStoreExtId}/certificates Post operation\n * @alias module:Ntnx/CreateCertificateApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _CreateCertificateApiResponse_brand);\n this.$objectType = \"objects.v4.config.CreateCertificateApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>CreateCertificateApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/CreateCertificateApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/CreateCertificateApiResponse} The populated <code>CreateCertificateApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new CreateCertificateApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'prism.v4.config.TaskReference':\n obj.setData(_prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {TaskReference | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {TaskReference | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_CreateCertificateApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_CreateCertificateApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof CreateCertificateApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nCreateCertificateApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof CreateCertificateApiResponse\n */\nCreateCertificateApiResponse.prototype.data = undefined;\nCreateCertificateApiResponse.prototype.$reserved = undefined;\nCreateCertificateApiResponse.prototype.$objectType = undefined;\nCreateCertificateApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/CreateCertificateApiResponse.js?\n}");
|
|
474
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ CreateCertificateApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../prism/v4/config/TaskReference */ \"./target/generated-sources/swagger/src/models/prism/v4/config/TaskReference.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The CreateCertificateApiResponse model module.\n * @module Ntnx/CreateCertificateApiResponse\n * @version 4.0.3\n * @class CreateCertificateApiResponse\n */\nvar _CreateCertificateApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass CreateCertificateApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"] {\n /**\n * Constructs a new <code>CreateCertificateApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores/{objectStoreExtId}/certificates Post operation\n * @alias module:Ntnx/CreateCertificateApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _CreateCertificateApiResponse_brand);\n this.$objectType = \"objects.v4.config.CreateCertificateApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>CreateCertificateApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/CreateCertificateApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/CreateCertificateApiResponse} The populated <code>CreateCertificateApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new CreateCertificateApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'prism.v4.config.TaskReference':\n obj.setData(_prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {TaskReference | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {TaskReference | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_CreateCertificateApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_CreateCertificateApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof CreateCertificateApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nCreateCertificateApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof CreateCertificateApiResponse\n */\nCreateCertificateApiResponse.prototype.data = undefined;\nCreateCertificateApiResponse.prototype.$reserved = undefined;\nCreateCertificateApiResponse.prototype.$objectType = undefined;\nCreateCertificateApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/CreateCertificateApiResponse.js?\n}");
|
|
475
475
|
|
|
476
476
|
/***/ },
|
|
477
477
|
|
|
@@ -482,7 +482,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
482
482
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
483
483
|
|
|
484
484
|
"use strict";
|
|
485
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ CreateObjectstoreApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../prism/v4/config/TaskReference */ \"./target/generated-sources/swagger/src/models/prism/v4/config/TaskReference.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The CreateObjectstoreApiResponse model module.\n * @module Ntnx/CreateObjectstoreApiResponse\n * @version 4.0.2\n * @class CreateObjectstoreApiResponse\n */\nvar _CreateObjectstoreApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass CreateObjectstoreApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"] {\n /**\n * Constructs a new <code>CreateObjectstoreApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores Post operation\n * @alias module:Ntnx/CreateObjectstoreApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _CreateObjectstoreApiResponse_brand);\n this.$objectType = \"objects.v4.config.CreateObjectstoreApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>CreateObjectstoreApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/CreateObjectstoreApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/CreateObjectstoreApiResponse} The populated <code>CreateObjectstoreApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new CreateObjectstoreApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'prism.v4.config.TaskReference':\n obj.setData(_prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {TaskReference | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {TaskReference | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_CreateObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_CreateObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof CreateObjectstoreApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nCreateObjectstoreApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof CreateObjectstoreApiResponse\n */\nCreateObjectstoreApiResponse.prototype.data = undefined;\nCreateObjectstoreApiResponse.prototype.$reserved = undefined;\nCreateObjectstoreApiResponse.prototype.$objectType = undefined;\nCreateObjectstoreApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/CreateObjectstoreApiResponse.js?\n}");
|
|
485
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ CreateObjectstoreApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../prism/v4/config/TaskReference */ \"./target/generated-sources/swagger/src/models/prism/v4/config/TaskReference.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The CreateObjectstoreApiResponse model module.\n * @module Ntnx/CreateObjectstoreApiResponse\n * @version 4.0.3\n * @class CreateObjectstoreApiResponse\n */\nvar _CreateObjectstoreApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass CreateObjectstoreApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"] {\n /**\n * Constructs a new <code>CreateObjectstoreApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores Post operation\n * @alias module:Ntnx/CreateObjectstoreApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _CreateObjectstoreApiResponse_brand);\n this.$objectType = \"objects.v4.config.CreateObjectstoreApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>CreateObjectstoreApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/CreateObjectstoreApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/CreateObjectstoreApiResponse} The populated <code>CreateObjectstoreApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new CreateObjectstoreApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'prism.v4.config.TaskReference':\n obj.setData(_prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {TaskReference | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {TaskReference | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_CreateObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_CreateObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof CreateObjectstoreApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nCreateObjectstoreApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof CreateObjectstoreApiResponse\n */\nCreateObjectstoreApiResponse.prototype.data = undefined;\nCreateObjectstoreApiResponse.prototype.$reserved = undefined;\nCreateObjectstoreApiResponse.prototype.$objectType = undefined;\nCreateObjectstoreApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/CreateObjectstoreApiResponse.js?\n}");
|
|
486
486
|
|
|
487
487
|
/***/ },
|
|
488
488
|
|
|
@@ -493,7 +493,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
493
493
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
494
494
|
|
|
495
495
|
"use strict";
|
|
496
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ DeleteObjectstoreApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../prism/v4/config/TaskReference */ \"./target/generated-sources/swagger/src/models/prism/v4/config/TaskReference.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The DeleteObjectstoreApiResponse model module.\n * @module Ntnx/DeleteObjectstoreApiResponse\n * @version 4.0.2\n * @class DeleteObjectstoreApiResponse\n */\nvar _DeleteObjectstoreApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass DeleteObjectstoreApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"] {\n /**\n * Constructs a new <code>DeleteObjectstoreApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores/{extId} Delete operation\n * @alias module:Ntnx/DeleteObjectstoreApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _DeleteObjectstoreApiResponse_brand);\n this.$objectType = \"objects.v4.config.DeleteObjectstoreApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>DeleteObjectstoreApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/DeleteObjectstoreApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/DeleteObjectstoreApiResponse} The populated <code>DeleteObjectstoreApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new DeleteObjectstoreApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'prism.v4.config.TaskReference':\n obj.setData(_prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {TaskReference | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {TaskReference | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_DeleteObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_DeleteObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof DeleteObjectstoreApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nDeleteObjectstoreApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof DeleteObjectstoreApiResponse\n */\nDeleteObjectstoreApiResponse.prototype.data = undefined;\nDeleteObjectstoreApiResponse.prototype.$reserved = undefined;\nDeleteObjectstoreApiResponse.prototype.$objectType = undefined;\nDeleteObjectstoreApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/DeleteObjectstoreApiResponse.js?\n}");
|
|
496
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ DeleteObjectstoreApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../prism/v4/config/TaskReference */ \"./target/generated-sources/swagger/src/models/prism/v4/config/TaskReference.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The DeleteObjectstoreApiResponse model module.\n * @module Ntnx/DeleteObjectstoreApiResponse\n * @version 4.0.3\n * @class DeleteObjectstoreApiResponse\n */\nvar _DeleteObjectstoreApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass DeleteObjectstoreApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"] {\n /**\n * Constructs a new <code>DeleteObjectstoreApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores/{extId} Delete operation\n * @alias module:Ntnx/DeleteObjectstoreApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _DeleteObjectstoreApiResponse_brand);\n this.$objectType = \"objects.v4.config.DeleteObjectstoreApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>DeleteObjectstoreApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/DeleteObjectstoreApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/DeleteObjectstoreApiResponse} The populated <code>DeleteObjectstoreApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new DeleteObjectstoreApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'prism.v4.config.TaskReference':\n obj.setData(_prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {TaskReference | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {TaskReference | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_DeleteObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_DeleteObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof DeleteObjectstoreApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nDeleteObjectstoreApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof DeleteObjectstoreApiResponse\n */\nDeleteObjectstoreApiResponse.prototype.data = undefined;\nDeleteObjectstoreApiResponse.prototype.$reserved = undefined;\nDeleteObjectstoreApiResponse.prototype.$objectType = undefined;\nDeleteObjectstoreApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/DeleteObjectstoreApiResponse.js?\n}");
|
|
497
497
|
|
|
498
498
|
/***/ },
|
|
499
499
|
|
|
@@ -504,7 +504,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
504
504
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
505
505
|
|
|
506
506
|
"use strict";
|
|
507
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ GetCaApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n/**\n * The GetCaApiResponse model module.\n * @module Ntnx/GetCaApiResponse\n * @version 4.0.2\n * @class GetCaApiResponse\n */\nvar _GetCaApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass GetCaApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_5__[\"default\"] {\n /**\n * Constructs a new <code>GetCaApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores/{objectStoreExtId}/certificates/{certificateExtId}/certificate-authority Get operation\n * @alias module:Ntnx/GetCaApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _GetCaApiResponse_brand);\n this.$objectType = \"objects.v4.config.GetCaApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>GetCaApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/GetCaApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/GetCaApiResponse} The populated <code>GetCaApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new GetCaApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_5__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'Map':\n obj.setData(data['data']);\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {string | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {string | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_GetCaApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_GetCaApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof GetCaApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nGetCaApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof GetCaApiResponse\n */\nGetCaApiResponse.prototype.data = undefined;\nGetCaApiResponse.prototype.$reserved = undefined;\nGetCaApiResponse.prototype.$objectType = undefined;\nGetCaApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/GetCaApiResponse.js?\n}");
|
|
507
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ GetCaApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n/**\n * The GetCaApiResponse model module.\n * @module Ntnx/GetCaApiResponse\n * @version 4.0.3\n * @class GetCaApiResponse\n */\nvar _GetCaApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass GetCaApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_5__[\"default\"] {\n /**\n * Constructs a new <code>GetCaApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores/{objectStoreExtId}/certificates/{certificateExtId}/certificate-authority Get operation\n * @alias module:Ntnx/GetCaApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _GetCaApiResponse_brand);\n this.$objectType = \"objects.v4.config.GetCaApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>GetCaApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/GetCaApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/GetCaApiResponse} The populated <code>GetCaApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new GetCaApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_5__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'Map':\n obj.setData(data['data']);\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {string | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {string | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_GetCaApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_GetCaApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof GetCaApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nGetCaApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof GetCaApiResponse\n */\nGetCaApiResponse.prototype.data = undefined;\nGetCaApiResponse.prototype.$reserved = undefined;\nGetCaApiResponse.prototype.$objectType = undefined;\nGetCaApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/GetCaApiResponse.js?\n}");
|
|
508
508
|
|
|
509
509
|
/***/ },
|
|
510
510
|
|
|
@@ -515,7 +515,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
515
515
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
516
516
|
|
|
517
517
|
"use strict";
|
|
518
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ GetCertificateApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _Certificate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Certificate */ \"./target/generated-sources/swagger/src/models/objects/v4/config/Certificate.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The GetCertificateApiResponse model module.\n * @module Ntnx/GetCertificateApiResponse\n * @version 4.0.2\n * @class GetCertificateApiResponse\n */\nvar _GetCertificateApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass GetCertificateApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"] {\n /**\n * Constructs a new <code>GetCertificateApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores/{objectStoreExtId}/certificates/{extId} Get operation\n * @alias module:Ntnx/GetCertificateApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _GetCertificateApiResponse_brand);\n this.$objectType = \"objects.v4.config.GetCertificateApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>GetCertificateApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/GetCertificateApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/GetCertificateApiResponse} The populated <code>GetCertificateApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new GetCertificateApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'objects.v4.config.Certificate':\n obj.setData(_Certificate__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {Certificate | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {Certificate | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_GetCertificateApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_GetCertificateApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof GetCertificateApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nGetCertificateApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof GetCertificateApiResponse\n */\nGetCertificateApiResponse.prototype.data = undefined;\nGetCertificateApiResponse.prototype.$reserved = undefined;\nGetCertificateApiResponse.prototype.$objectType = undefined;\nGetCertificateApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/GetCertificateApiResponse.js?\n}");
|
|
518
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ GetCertificateApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _Certificate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Certificate */ \"./target/generated-sources/swagger/src/models/objects/v4/config/Certificate.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The GetCertificateApiResponse model module.\n * @module Ntnx/GetCertificateApiResponse\n * @version 4.0.3\n * @class GetCertificateApiResponse\n */\nvar _GetCertificateApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass GetCertificateApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"] {\n /**\n * Constructs a new <code>GetCertificateApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores/{objectStoreExtId}/certificates/{extId} Get operation\n * @alias module:Ntnx/GetCertificateApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _GetCertificateApiResponse_brand);\n this.$objectType = \"objects.v4.config.GetCertificateApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>GetCertificateApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/GetCertificateApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/GetCertificateApiResponse} The populated <code>GetCertificateApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new GetCertificateApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'objects.v4.config.Certificate':\n obj.setData(_Certificate__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {Certificate | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {Certificate | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_GetCertificateApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_GetCertificateApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof GetCertificateApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nGetCertificateApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof GetCertificateApiResponse\n */\nGetCertificateApiResponse.prototype.data = undefined;\nGetCertificateApiResponse.prototype.$reserved = undefined;\nGetCertificateApiResponse.prototype.$objectType = undefined;\nGetCertificateApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/GetCertificateApiResponse.js?\n}");
|
|
519
519
|
|
|
520
520
|
/***/ },
|
|
521
521
|
|
|
@@ -526,7 +526,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
526
526
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
527
527
|
|
|
528
528
|
"use strict";
|
|
529
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ GetObjectstoreApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _ObjectStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ObjectStore */ \"./target/generated-sources/swagger/src/models/objects/v4/config/ObjectStore.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The GetObjectstoreApiResponse model module.\n * @module Ntnx/GetObjectstoreApiResponse\n * @version 4.0.2\n * @class GetObjectstoreApiResponse\n */\nvar _GetObjectstoreApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass GetObjectstoreApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"] {\n /**\n * Constructs a new <code>GetObjectstoreApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores/{extId} Get operation\n * @alias module:Ntnx/GetObjectstoreApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _GetObjectstoreApiResponse_brand);\n this.$objectType = \"objects.v4.config.GetObjectstoreApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>GetObjectstoreApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/GetObjectstoreApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/GetObjectstoreApiResponse} The populated <code>GetObjectstoreApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new GetObjectstoreApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'objects.v4.config.ObjectStore':\n obj.setData(_ObjectStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {ObjectStore | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {ObjectStore | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_GetObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_GetObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof GetObjectstoreApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nGetObjectstoreApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof GetObjectstoreApiResponse\n */\nGetObjectstoreApiResponse.prototype.data = undefined;\nGetObjectstoreApiResponse.prototype.$reserved = undefined;\nGetObjectstoreApiResponse.prototype.$objectType = undefined;\nGetObjectstoreApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/GetObjectstoreApiResponse.js?\n}");
|
|
529
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ GetObjectstoreApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _ObjectStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ObjectStore */ \"./target/generated-sources/swagger/src/models/objects/v4/config/ObjectStore.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The GetObjectstoreApiResponse model module.\n * @module Ntnx/GetObjectstoreApiResponse\n * @version 4.0.3\n * @class GetObjectstoreApiResponse\n */\nvar _GetObjectstoreApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass GetObjectstoreApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"] {\n /**\n * Constructs a new <code>GetObjectstoreApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores/{extId} Get operation\n * @alias module:Ntnx/GetObjectstoreApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _GetObjectstoreApiResponse_brand);\n this.$objectType = \"objects.v4.config.GetObjectstoreApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>GetObjectstoreApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/GetObjectstoreApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/GetObjectstoreApiResponse} The populated <code>GetObjectstoreApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new GetObjectstoreApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'objects.v4.config.ObjectStore':\n obj.setData(_ObjectStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {ObjectStore | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {ObjectStore | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_GetObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_GetObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof GetObjectstoreApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nGetObjectstoreApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof GetObjectstoreApiResponse\n */\nGetObjectstoreApiResponse.prototype.data = undefined;\nGetObjectstoreApiResponse.prototype.$reserved = undefined;\nGetObjectstoreApiResponse.prototype.$objectType = undefined;\nGetObjectstoreApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/GetObjectstoreApiResponse.js?\n}");
|
|
530
530
|
|
|
531
531
|
/***/ },
|
|
532
532
|
|
|
@@ -537,7 +537,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
537
537
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
538
538
|
|
|
539
539
|
"use strict";
|
|
540
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ListCertificatesApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _Certificate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Certificate */ \"./target/generated-sources/swagger/src/models/objects/v4/config/Certificate.js\");\n/* harmony import */ var _CertificateProjection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CertificateProjection */ \"./target/generated-sources/swagger/src/models/objects/v4/config/CertificateProjection.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n\n/**\n * The ListCertificatesApiResponse model module.\n * @module Ntnx/ListCertificatesApiResponse\n * @version 4.0.2\n * @class ListCertificatesApiResponse\n */\nvar _ListCertificatesApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass ListCertificatesApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_7__[\"default\"] {\n /**\n * Constructs a new <code>ListCertificatesApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores/{objectStoreExtId}/certificates Get operation\n * @alias module:Ntnx/ListCertificatesApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ListCertificatesApiResponse_brand);\n this.$objectType = \"objects.v4.config.ListCertificatesApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ListCertificatesApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ListCertificatesApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ListCertificatesApiResponse} The populated <code>ListCertificatesApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ListCertificatesApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_7__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (Array.isArray(data['data'])) {\n if (data['data'].length === 0) {\n obj.setData([]);\n } else {\n itemArr = [];\n items = data['data'];\n if (items[0].hasOwnProperty('$objectType')) {\n discriminator = items[0]['$objectType'];\n } else {\n discriminator = typeof items[0];\n }\n for (i = 0; i < items.length; i++) {\n switch (discriminator) {\n case 'objects.v4.config.Certificate':\n item = _Certificate__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n break;\n case 'objects.v4.config.CertificateProjection':\n item = _CertificateProjection__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n break;\n default:\n throw \"Unknown list of type \" + discriminator + \" in data\";\n }\n }\n obj.setData(itemArr);\n }\n } else {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_3__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {Certificate[] | ErrorResponse | CertificateProjection[]}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {Certificate[] | ErrorResponse | CertificateProjection[]} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_ListCertificatesApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_ListCertificatesApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_4__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof ListCertificatesApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nListCertificatesApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof ListCertificatesApiResponse\n */\nListCertificatesApiResponse.prototype.data = undefined;\nListCertificatesApiResponse.prototype.$reserved = undefined;\nListCertificatesApiResponse.prototype.$objectType = undefined;\nListCertificatesApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/ListCertificatesApiResponse.js?\n}");
|
|
540
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ListCertificatesApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _Certificate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Certificate */ \"./target/generated-sources/swagger/src/models/objects/v4/config/Certificate.js\");\n/* harmony import */ var _CertificateProjection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CertificateProjection */ \"./target/generated-sources/swagger/src/models/objects/v4/config/CertificateProjection.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n\n/**\n * The ListCertificatesApiResponse model module.\n * @module Ntnx/ListCertificatesApiResponse\n * @version 4.0.3\n * @class ListCertificatesApiResponse\n */\nvar _ListCertificatesApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass ListCertificatesApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_7__[\"default\"] {\n /**\n * Constructs a new <code>ListCertificatesApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores/{objectStoreExtId}/certificates Get operation\n * @alias module:Ntnx/ListCertificatesApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ListCertificatesApiResponse_brand);\n this.$objectType = \"objects.v4.config.ListCertificatesApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ListCertificatesApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ListCertificatesApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ListCertificatesApiResponse} The populated <code>ListCertificatesApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ListCertificatesApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_7__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (Array.isArray(data['data'])) {\n if (data['data'].length === 0) {\n obj.setData([]);\n } else {\n itemArr = [];\n items = data['data'];\n if (items[0].hasOwnProperty('$objectType')) {\n discriminator = items[0]['$objectType'];\n } else {\n discriminator = typeof items[0];\n }\n for (i = 0; i < items.length; i++) {\n switch (discriminator) {\n case 'objects.v4.config.Certificate':\n item = _Certificate__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n break;\n case 'objects.v4.config.CertificateProjection':\n item = _CertificateProjection__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n break;\n default:\n throw \"Unknown list of type \" + discriminator + \" in data\";\n }\n }\n obj.setData(itemArr);\n }\n } else {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_3__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {Certificate[] | ErrorResponse | CertificateProjection[]}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {Certificate[] | ErrorResponse | CertificateProjection[]} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_ListCertificatesApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_ListCertificatesApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_4__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof ListCertificatesApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nListCertificatesApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof ListCertificatesApiResponse\n */\nListCertificatesApiResponse.prototype.data = undefined;\nListCertificatesApiResponse.prototype.$reserved = undefined;\nListCertificatesApiResponse.prototype.$objectType = undefined;\nListCertificatesApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/ListCertificatesApiResponse.js?\n}");
|
|
541
541
|
|
|
542
542
|
/***/ },
|
|
543
543
|
|
|
@@ -548,7 +548,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
548
548
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
549
549
|
|
|
550
550
|
"use strict";
|
|
551
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ListObjectstoresApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _ObjectStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ObjectStore */ \"./target/generated-sources/swagger/src/models/objects/v4/config/ObjectStore.js\");\n/* harmony import */ var _ObjectStoreProjection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ObjectStoreProjection */ \"./target/generated-sources/swagger/src/models/objects/v4/config/ObjectStoreProjection.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n\n/**\n * The ListObjectstoresApiResponse model module.\n * @module Ntnx/ListObjectstoresApiResponse\n * @version 4.0.2\n * @class ListObjectstoresApiResponse\n */\nvar _ListObjectstoresApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass ListObjectstoresApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_7__[\"default\"] {\n /**\n * Constructs a new <code>ListObjectstoresApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores Get operation\n * @alias module:Ntnx/ListObjectstoresApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ListObjectstoresApiResponse_brand);\n this.$objectType = \"objects.v4.config.ListObjectstoresApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ListObjectstoresApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ListObjectstoresApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ListObjectstoresApiResponse} The populated <code>ListObjectstoresApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ListObjectstoresApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_7__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (Array.isArray(data['data'])) {\n if (data['data'].length === 0) {\n obj.setData([]);\n } else {\n itemArr = [];\n items = data['data'];\n if (items[0].hasOwnProperty('$objectType')) {\n discriminator = items[0]['$objectType'];\n } else {\n discriminator = typeof items[0];\n }\n for (i = 0; i < items.length; i++) {\n switch (discriminator) {\n case 'objects.v4.config.ObjectStore':\n item = _ObjectStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n break;\n case 'objects.v4.config.ObjectStoreProjection':\n item = _ObjectStoreProjection__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n break;\n default:\n throw \"Unknown list of type \" + discriminator + \" in data\";\n }\n }\n obj.setData(itemArr);\n }\n } else {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_3__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {ObjectStore[] | ErrorResponse | ObjectStoreProjection[]}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {ObjectStore[] | ErrorResponse | ObjectStoreProjection[]} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_ListObjectstoresApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_ListObjectstoresApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_4__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof ListObjectstoresApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nListObjectstoresApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof ListObjectstoresApiResponse\n */\nListObjectstoresApiResponse.prototype.data = undefined;\nListObjectstoresApiResponse.prototype.$reserved = undefined;\nListObjectstoresApiResponse.prototype.$objectType = undefined;\nListObjectstoresApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/ListObjectstoresApiResponse.js?\n}");
|
|
551
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ListObjectstoresApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _ObjectStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ObjectStore */ \"./target/generated-sources/swagger/src/models/objects/v4/config/ObjectStore.js\");\n/* harmony import */ var _ObjectStoreProjection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ObjectStoreProjection */ \"./target/generated-sources/swagger/src/models/objects/v4/config/ObjectStoreProjection.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n\n/**\n * The ListObjectstoresApiResponse model module.\n * @module Ntnx/ListObjectstoresApiResponse\n * @version 4.0.3\n * @class ListObjectstoresApiResponse\n */\nvar _ListObjectstoresApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass ListObjectstoresApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_7__[\"default\"] {\n /**\n * Constructs a new <code>ListObjectstoresApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores Get operation\n * @alias module:Ntnx/ListObjectstoresApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ListObjectstoresApiResponse_brand);\n this.$objectType = \"objects.v4.config.ListObjectstoresApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ListObjectstoresApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ListObjectstoresApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ListObjectstoresApiResponse} The populated <code>ListObjectstoresApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ListObjectstoresApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_7__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (Array.isArray(data['data'])) {\n if (data['data'].length === 0) {\n obj.setData([]);\n } else {\n itemArr = [];\n items = data['data'];\n if (items[0].hasOwnProperty('$objectType')) {\n discriminator = items[0]['$objectType'];\n } else {\n discriminator = typeof items[0];\n }\n for (i = 0; i < items.length; i++) {\n switch (discriminator) {\n case 'objects.v4.config.ObjectStore':\n item = _ObjectStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n break;\n case 'objects.v4.config.ObjectStoreProjection':\n item = _ObjectStoreProjection__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n break;\n default:\n throw \"Unknown list of type \" + discriminator + \" in data\";\n }\n }\n obj.setData(itemArr);\n }\n } else {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_3__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {ObjectStore[] | ErrorResponse | ObjectStoreProjection[]}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {ObjectStore[] | ErrorResponse | ObjectStoreProjection[]} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_ListObjectstoresApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_ListObjectstoresApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_4__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_6__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof ListObjectstoresApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nListObjectstoresApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof ListObjectstoresApiResponse\n */\nListObjectstoresApiResponse.prototype.data = undefined;\nListObjectstoresApiResponse.prototype.$reserved = undefined;\nListObjectstoresApiResponse.prototype.$objectType = undefined;\nListObjectstoresApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/ListObjectstoresApiResponse.js?\n}");
|
|
552
552
|
|
|
553
553
|
/***/ },
|
|
554
554
|
|
|
@@ -559,7 +559,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
559
559
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
560
560
|
|
|
561
561
|
"use strict";
|
|
562
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ObjectStore)\n/* harmony export */ });\n/* harmony import */ var _common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/config/IPAddress */ \"./target/generated-sources/swagger/src/models/common/v1/config/IPAddress.js\");\n/* harmony import */ var _common_v1_config_Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/v1/config/Metadata */ \"./target/generated-sources/swagger/src/models/common/v1/config/Metadata.js\");\n/* harmony import */ var _common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/v1/config/TenantAwareModel */ \"./target/generated-sources/swagger/src/models/common/v1/config/TenantAwareModel.js\");\n/* harmony import */ var _common_v1_response_ApiLink__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/v1/response/ApiLink */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiLink.js\");\n/* harmony import */ var _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/v1/response/ExternalizableAbstractModel */ \"./target/generated-sources/swagger/src/models/common/v1/response/ExternalizableAbstractModel.js\");\n/* harmony import */ var _State__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./State */ \"./target/generated-sources/swagger/src/models/objects/v4/config/State.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * The ObjectStore model module.\n * @module Ntnx/ObjectStore\n * @version 4.0.2\n * @class ObjectStore\n * @extends ExternalizableAbstractModel\n * \n * @param { string } name The name of the Object store.\n */\nvar _ObjectStore_brand = /*#__PURE__*/new WeakSet();\nclass ObjectStore extends _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_4__[\"default\"] {\n /**\n * Constructs a new <code>ObjectStore</code>.\n * @alias module:Ntnx/ObjectStore\n * @extends module:Ntnx/ExternalizableAbstractModel\n * \n * @param { string } name The name of the Object store.\n */\n constructor(name) {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ObjectStore_brand);\n this.name = name;\n this.$objectType = \"objects.v4.config.ObjectStore\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ObjectStore</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ObjectStore} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ObjectStore} The populated <code>ObjectStore</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ObjectStore();\n _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(data, obj, true);\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_config_Metadata__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('name') && data.name !== null && data.name !== undefined) {\n obj.setName(data['name']);\n }\n if (data.hasOwnProperty('creationTime') && data.creationTime !== null && data.creationTime !== undefined) {\n obj.setCreationTime(data['creationTime']);\n }\n if (data.hasOwnProperty('lastUpdateTime') && data.lastUpdateTime !== null && data.lastUpdateTime !== undefined) {\n obj.setLastUpdateTime(data['lastUpdateTime']);\n }\n if (data.hasOwnProperty('description') && data.description !== null && data.description !== undefined) {\n obj.setDescription(data['description']);\n }\n if (data.hasOwnProperty('deploymentVersion') && data.deploymentVersion !== null && data.deploymentVersion !== undefined) {\n obj.setDeploymentVersion(data['deploymentVersion']);\n }\n if (data.hasOwnProperty('domain') && data.domain !== null && data.domain !== undefined) {\n obj.setDomain(data['domain']);\n }\n if (data.hasOwnProperty('region') && data.region !== null && data.region !== undefined) {\n obj.setRegion(data['region']);\n }\n if (data.hasOwnProperty('numWorkerNodes') && data.numWorkerNodes !== null && data.numWorkerNodes !== undefined) {\n obj.setNumWorkerNodes(data['numWorkerNodes']);\n }\n if (data.hasOwnProperty('clusterExtId') && data.clusterExtId !== null && data.clusterExtId !== undefined) {\n obj.setClusterExtId(data['clusterExtId']);\n }\n if (data.hasOwnProperty('storageNetworkReference') && data.storageNetworkReference !== null && data.storageNetworkReference !== undefined) {\n obj.setStorageNetworkReference(data['storageNetworkReference']);\n }\n if (data.hasOwnProperty('storageNetworkVip') && data.storageNetworkVip !== null && data.storageNetworkVip !== undefined) {\n obj.setStorageNetworkVip(_common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['storageNetworkVip']));\n }\n if (data.hasOwnProperty('storageNetworkDnsIp') && data.storageNetworkDnsIp !== null && data.storageNetworkDnsIp !== undefined) {\n obj.setStorageNetworkDnsIp(_common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['storageNetworkDnsIp']));\n }\n if (data.hasOwnProperty('publicNetworkReference') && data.publicNetworkReference !== null && data.publicNetworkReference !== undefined) {\n obj.setPublicNetworkReference(data['publicNetworkReference']);\n }\n if (data.hasOwnProperty('publicNetworkIps') && data.publicNetworkIps !== null && data.publicNetworkIps !== undefined) {\n itemArr = [];\n items = data.publicNetworkIps;\n for (i = 0; i < items.length; i++) {\n item = _common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setPublicNetworkIps(itemArr);\n }\n if (data.hasOwnProperty('totalCapacityGiB') && data.totalCapacityGiB !== null && data.totalCapacityGiB !== undefined) {\n obj.setTotalCapacityGiB(data['totalCapacityGiB']);\n }\n if (data.hasOwnProperty('state') && data.state !== null && data.state !== undefined) {\n obj.setState(_State__WEBPACK_IMPORTED_MODULE_5__[\"default\"].constructFromObject(data['state']));\n }\n if (data.hasOwnProperty('certificateExtIds') && data.certificateExtIds !== null && data.certificateExtIds !== undefined) {\n itemArr = [];\n items = data.certificateExtIds;\n for (i = 0; i < items.length; i++) {\n itemArr.push(items[i]);\n }\n obj.setCertificateExtIds(itemArr);\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {Metadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {Metadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * Returns The name of the Object store.\n * @return {string}\n */\n getName() {\n return this.name;\n }\n\n /**\n * Sets The name of the Object store.\n * @param {string} name The name of the Object store.\n */\n setName(name) {\n this.name = name;\n }\n\n /**\n * Returns The time when the Object store was created.\n * @return {Date}\n */\n getCreationTime() {\n return this.creationTime;\n }\n\n /**\n * Sets The time when the Object store was created.\n * @param {Date} creationTime The time when the Object store was created.\n */\n setCreationTime(creationTime) {\n this.creationTime = creationTime;\n }\n\n /**\n * Returns The time when the Object store was last updated.\n * @return {Date}\n */\n getLastUpdateTime() {\n return this.lastUpdateTime;\n }\n\n /**\n * Sets The time when the Object store was last updated.\n * @param {Date} lastUpdateTime The time when the Object store was last updated.\n */\n setLastUpdateTime(lastUpdateTime) {\n this.lastUpdateTime = lastUpdateTime;\n }\n\n /**\n * Returns A brief description of the Object store.\n * @return {string}\n */\n getDescription() {\n return this.description;\n }\n\n /**\n * Sets A brief description of the Object store.\n * @param {string} description A brief description of the Object store.\n */\n setDescription(description) {\n this.description = description;\n }\n\n /**\n * Returns Object store deployment version.\n * @return {string}\n */\n getDeploymentVersion() {\n return this.deploymentVersion;\n }\n\n /**\n * Sets Object store deployment version.\n * @param {string} deploymentVersion Object store deployment version.\n */\n setDeploymentVersion(deploymentVersion) {\n this.deploymentVersion = deploymentVersion;\n }\n\n /**\n * Returns The DNS domain/subdomain the Object store belongs to. All the Object stores under one Prism Central must have the same domain name. The domain name must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens, or underscores. Each part can be up to 63 characters long. The domain must begin and end with an alphanumeric character. For example - 'objects-0.pc_nutanix.com'. \n * @return {string}\n */\n getDomain() {\n return this.domain;\n }\n\n /**\n * Sets The DNS domain/subdomain the Object store belongs to. All the Object stores under one Prism Central must have the same domain name. The domain name must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens, or underscores. Each part can be up to 63 characters long. The domain must begin and end with an alphanumeric character. For example - 'objects-0.pc_nutanix.com'. \n * @param {string} domain The DNS domain/subdomain the Object store belongs to. All the Object stores under one Prism Central must have the same domain name. The domain name must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens, or underscores. Each part can be up to 63 characters long. The domain must begin and end with an alphanumeric character. For example - 'objects-0.pc_nutanix.com'. \n */\n setDomain(domain) {\n this.domain = domain;\n }\n\n /**\n * Returns The region in which the Object store is deployed.\n * @return {string}\n */\n getRegion() {\n return this.region;\n }\n\n /**\n * Sets The region in which the Object store is deployed.\n * @param {string} region The region in which the Object store is deployed.\n */\n setRegion(region) {\n this.region = region;\n }\n\n /**\n * Returns The number of worker nodes (VMs) to be created for the Object store. Each worker node requires 10 vCPUs and 32 GiB of memory.\n * minimum: 1\n * maximum: 1000\n * @return {Number}\n */\n getNumWorkerNodes() {\n return this.numWorkerNodes;\n }\n\n /**\n * Sets The number of worker nodes (VMs) to be created for the Object store. Each worker node requires 10 vCPUs and 32 GiB of memory.\n * @param {Number} numWorkerNodes The number of worker nodes (VMs) to be created for the Object store. Each worker node requires 10 vCPUs and 32 GiB of memory.\n */\n setNumWorkerNodes(numWorkerNodes) {\n this.numWorkerNodes = numWorkerNodes;\n }\n\n /**\n * Returns UUID of the AHV or ESXi cluster.\n * @return {string}\n */\n getClusterExtId() {\n return this.clusterExtId;\n }\n\n /**\n * Sets UUID of the AHV or ESXi cluster.\n * @param {string} clusterExtId UUID of the AHV or ESXi cluster.\n */\n setClusterExtId(clusterExtId) {\n this.clusterExtId = clusterExtId;\n }\n\n /**\n * Returns Reference to the Storage Network of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @return {string}\n */\n getStorageNetworkReference() {\n return this.storageNetworkReference;\n }\n\n /**\n * Sets Reference to the Storage Network of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @param {string} storageNetworkReference Reference to the Storage Network of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n */\n setStorageNetworkReference(storageNetworkReference) {\n this.storageNetworkReference = storageNetworkReference;\n }\n\n /**\n * @return {IPAddress}\n */\n getStorageNetworkVip() {\n return this.storageNetworkVip;\n }\n\n /**\n * @param {IPAddress} storageNetworkVip\n */\n setStorageNetworkVip(storageNetworkVip) {\n this.storageNetworkVip = storageNetworkVip;\n }\n\n /**\n * @return {IPAddress}\n */\n getStorageNetworkDnsIp() {\n return this.storageNetworkDnsIp;\n }\n\n /**\n * @param {IPAddress} storageNetworkDnsIp\n */\n setStorageNetworkDnsIp(storageNetworkDnsIp) {\n this.storageNetworkDnsIp = storageNetworkDnsIp;\n }\n\n /**\n * Returns Public network reference of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @return {string}\n */\n getPublicNetworkReference() {\n return this.publicNetworkReference;\n }\n\n /**\n * Sets Public network reference of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @param {string} publicNetworkReference Public network reference of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n */\n setPublicNetworkReference(publicNetworkReference) {\n this.publicNetworkReference = publicNetworkReference;\n }\n\n /**\n * Returns A list of static IP addresses used as public IPs to access the Object store.\n * @return {IPAddress[]}\n */\n getPublicNetworkIps() {\n return this.publicNetworkIps;\n }\n\n /**\n * Sets A list of static IP addresses used as public IPs to access the Object store.\n * @param {IPAddress[]} publicNetworkIps A list of static IP addresses used as public IPs to access the Object store.\n */\n setPublicNetworkIps(publicNetworkIps) {\n this.publicNetworkIps = publicNetworkIps;\n }\n\n /**\n * Returns Size of the Object store in GiB.\n * minimum: 1\n * maximum: 178814713856\n * @return {Number}\n */\n getTotalCapacityGiB() {\n return this.totalCapacityGiB;\n }\n\n /**\n * Sets Size of the Object store in GiB.\n * @param {Number} totalCapacityGiB Size of the Object store in GiB.\n */\n setTotalCapacityGiB(totalCapacityGiB) {\n this.totalCapacityGiB = totalCapacityGiB;\n }\n\n /**\n * @return {State}\n */\n getState() {\n return this.state;\n }\n\n /**\n * @param {State} state\n */\n setState(state) {\n this.state = state;\n }\n\n /**\n * Returns A list of the UUIDs of the certificates of an Object store.\n * @return {string[]}\n */\n getCertificateExtIds() {\n return this.certificateExtIds;\n }\n\n /**\n * Sets A list of the UUIDs of the certificates of an Object store.\n * @param {string[]} certificateExtIds A list of the UUIDs of the certificates of an Object store.\n */\n setCertificateExtIds(certificateExtIds) {\n this.certificateExtIds = certificateExtIds;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getCreationTime() !== 'undefined' && this.getCreationTime() !== null ? {\n 'creationTime': _assertClassBrand(_ObjectStore_brand, this, _handleDateType).call(this, this.getCreationTime(), false)\n } : {}),\n ...(typeof this.getLastUpdateTime() !== 'undefined' && this.getLastUpdateTime() !== null ? {\n 'lastUpdateTime': _assertClassBrand(_ObjectStore_brand, this, _handleDateType).call(this, this.getLastUpdateTime(), false)\n } : {}),\n ...(typeof this.getDescription() !== 'undefined' && this.getDescription() !== null ? {\n 'description': this.getDescription()\n } : {}),\n ...(typeof this.getDeploymentVersion() !== 'undefined' && this.getDeploymentVersion() !== null ? {\n 'deploymentVersion': this.getDeploymentVersion()\n } : {}),\n ...(typeof this.getDomain() !== 'undefined' && this.getDomain() !== null ? {\n 'domain': this.getDomain()\n } : {}),\n ...(typeof this.getRegion() !== 'undefined' && this.getRegion() !== null ? {\n 'region': this.getRegion()\n } : {}),\n ...(typeof this.getNumWorkerNodes() !== 'undefined' && this.getNumWorkerNodes() !== null ? {\n 'numWorkerNodes': this.getNumWorkerNodes()\n } : {}),\n ...(typeof this.getClusterExtId() !== 'undefined' && this.getClusterExtId() !== null ? {\n 'clusterExtId': this.getClusterExtId()\n } : {}),\n ...(typeof this.getStorageNetworkReference() !== 'undefined' && this.getStorageNetworkReference() !== null ? {\n 'storageNetworkReference': this.getStorageNetworkReference()\n } : {}),\n ...(typeof this.getStorageNetworkVip() !== 'undefined' && this.getStorageNetworkVip() !== null ? {\n 'storageNetworkVip': this.getStorageNetworkVip().toJson(false)\n } : {}),\n ...(typeof this.getStorageNetworkDnsIp() !== 'undefined' && this.getStorageNetworkDnsIp() !== null ? {\n 'storageNetworkDnsIp': this.getStorageNetworkDnsIp().toJson(false)\n } : {}),\n ...(typeof this.getPublicNetworkReference() !== 'undefined' && this.getPublicNetworkReference() !== null ? {\n 'publicNetworkReference': this.getPublicNetworkReference()\n } : {}),\n ...(typeof this.getPublicNetworkIps() !== 'undefined' && this.getPublicNetworkIps() !== null ? {\n 'publicNetworkIps': this.getPublicNetworkIps().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTotalCapacityGiB() !== 'undefined' && this.getTotalCapacityGiB() !== null ? {\n 'totalCapacityGiB': this.getTotalCapacityGiB()\n } : {}),\n ...(typeof this.getState() !== 'undefined' && this.getState() !== null ? {\n 'state': this.getState()\n } : {}),\n ...(typeof this.getCertificateExtIds() !== 'undefined' && this.getCertificateExtIds() !== null ? {\n 'certificateExtIds': this.getCertificateExtIds()\n } : {}),\n ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {\n 'extId': this.getExtId()\n } : {}),\n ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {\n 'links': this.getLinks().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {\n 'tenantId': this.getTenantId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getDescription() !== 'undefined' && this.getDescription() !== null ? {\n 'description': this.getDescription()\n } : {}),\n ...(typeof this.getDeploymentVersion() !== 'undefined' && this.getDeploymentVersion() !== null ? {\n 'deploymentVersion': this.getDeploymentVersion()\n } : {}),\n ...(typeof this.getDomain() !== 'undefined' && this.getDomain() !== null ? {\n 'domain': this.getDomain()\n } : {}),\n ...(typeof this.getRegion() !== 'undefined' && this.getRegion() !== null ? {\n 'region': this.getRegion()\n } : {}),\n ...(typeof this.getNumWorkerNodes() !== 'undefined' && this.getNumWorkerNodes() !== null ? {\n 'numWorkerNodes': this.getNumWorkerNodes()\n } : {}),\n ...(typeof this.getClusterExtId() !== 'undefined' && this.getClusterExtId() !== null ? {\n 'clusterExtId': this.getClusterExtId()\n } : {}),\n ...(typeof this.getStorageNetworkReference() !== 'undefined' && this.getStorageNetworkReference() !== null ? {\n 'storageNetworkReference': this.getStorageNetworkReference()\n } : {}),\n ...(typeof this.getStorageNetworkVip() !== 'undefined' && this.getStorageNetworkVip() !== null ? {\n 'storageNetworkVip': this.getStorageNetworkVip().toJson(false)\n } : {}),\n ...(typeof this.getStorageNetworkDnsIp() !== 'undefined' && this.getStorageNetworkDnsIp() !== null ? {\n 'storageNetworkDnsIp': this.getStorageNetworkDnsIp().toJson(false)\n } : {}),\n ...(typeof this.getPublicNetworkReference() !== 'undefined' && this.getPublicNetworkReference() !== null ? {\n 'publicNetworkReference': this.getPublicNetworkReference()\n } : {}),\n ...(typeof this.getPublicNetworkIps() !== 'undefined' && this.getPublicNetworkIps() !== null ? {\n 'publicNetworkIps': this.getPublicNetworkIps().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTotalCapacityGiB() !== 'undefined' && this.getTotalCapacityGiB() !== null ? {\n 'totalCapacityGiB': this.getTotalCapacityGiB()\n } : {}),\n ...(typeof this.getState() !== 'undefined' && this.getState() !== null ? {\n 'state': this.getState()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_6__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [\"name\"];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"name\") {\n if (typeof this.name === 'undefined' || this.name === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"name\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.name, 50)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"name\", \"does not satisfy required maxLength constraint: 50\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinLength(this.name, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"name\", \"does not satisfy required minLength constraint: 1\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validatePattern(this.name, /^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]))*([A-Za-z]|[A-Za-z][A-Za-z0-9-]*[A-Za-z0-9])$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"name\", \"does not satisfy required pattern: /^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]))*([A-Za-z]|[A-Za-z][A-Za-z0-9-]*[A-Za-z0-9])$/\");\n }\n }\n if (property === \"creationTime\") {\n if (typeof this.creationTime === 'undefined' || this.creationTime === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"creationTime\", \"undefined or null\");\n }\n }\n if (property === \"lastUpdateTime\") {\n if (typeof this.lastUpdateTime === 'undefined' || this.lastUpdateTime === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"lastUpdateTime\", \"undefined or null\");\n }\n }\n if (property === \"description\") {\n if (typeof this.description === 'undefined' || this.description === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"description\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.description, 1000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"description\", \"does not satisfy required maxLength constraint: 1000\");\n }\n }\n if (property === \"deploymentVersion\") {\n if (typeof this.deploymentVersion === 'undefined' || this.deploymentVersion === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"deploymentVersion\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.deploymentVersion, 50)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"deploymentVersion\", \"does not satisfy required maxLength constraint: 50\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinLength(this.deploymentVersion, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"deploymentVersion\", \"does not satisfy required minLength constraint: 1\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validatePattern(this.deploymentVersion, /^[a-zA-z0-9][a-zA-z0-9\\\\.]*[a-zA-Z0-9]?$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"deploymentVersion\", \"does not satisfy required pattern: /^[a-zA-z0-9][a-zA-z0-9\\\\.]*[a-zA-Z0-9]?$/\");\n }\n }\n if (property === \"domain\") {\n if (typeof this.domain === 'undefined' || this.domain === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"domain\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.domain, 1000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"domain\", \"does not satisfy required maxLength constraint: 1000\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinLength(this.domain, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"domain\", \"does not satisfy required minLength constraint: 1\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validatePattern(this.domain, /^(([a-zA-Z0-9_\\\\-]{1,63})\\\\.)+([a-zA-Z0-9_\\\\-]{1,63})$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"domain\", \"does not satisfy required pattern: /^(([a-zA-Z0-9_\\\\-]{1,63})\\\\.)+([a-zA-Z0-9_\\\\-]{1,63})$/\");\n }\n }\n if (property === \"region\") {\n if (typeof this.region === 'undefined' || this.region === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"region\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.region, 50)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"region\", \"does not satisfy required maxLength constraint: 50\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinLength(this.region, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"region\", \"does not satisfy required minLength constraint: 1\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validatePattern(this.region, /^[a-z]+\\\\-[a-z]+\\\\-[0-9]$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"region\", \"does not satisfy required pattern: /^[a-z]+\\\\-[a-z]+\\\\-[0-9]$/\");\n }\n }\n if (property === \"numWorkerNodes\") {\n if (typeof this.numWorkerNodes === 'undefined' || this.numWorkerNodes === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"numWorkerNodes\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaximum(this.numWorkerNodes, 1000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"numWorkerNodes\", \"does not satisfy required maximum constraint: 1000\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinimum(this.numWorkerNodes, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"numWorkerNodes\", \"does not satisfy required minimum constraint: 1\");\n }\n }\n if (property === \"clusterExtId\") {\n if (typeof this.clusterExtId === 'undefined' || this.clusterExtId === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"clusterExtId\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validatePattern(this.clusterExtId, /^[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}$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"clusterExtId\", \"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}$/\");\n }\n }\n if (property === \"storageNetworkReference\") {\n if (typeof this.storageNetworkReference === 'undefined' || this.storageNetworkReference === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"storageNetworkReference\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.storageNetworkReference, 1000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"storageNetworkReference\", \"does not satisfy required maxLength constraint: 1000\");\n }\n }\n if (property === \"storageNetworkVip\") {\n if (typeof this.storageNetworkVip === 'undefined' || this.storageNetworkVip === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"storageNetworkVip\", \"undefined or null\");\n }\n }\n if (property === \"storageNetworkDnsIp\") {\n if (typeof this.storageNetworkDnsIp === 'undefined' || this.storageNetworkDnsIp === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"storageNetworkDnsIp\", \"undefined or null\");\n }\n }\n if (property === \"publicNetworkReference\") {\n if (typeof this.publicNetworkReference === 'undefined' || this.publicNetworkReference === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicNetworkReference\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.publicNetworkReference, 1000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicNetworkReference\", \"does not satisfy required maxLength constraint: 1000\");\n }\n }\n if (property === \"publicNetworkIps\") {\n if (typeof this.publicNetworkIps === 'undefined' || this.publicNetworkIps === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicNetworkIps\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxItems(this.publicNetworkIps, 1000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicNetworkIps\", \"does not satisfy required maxItems constraint: 1000\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinItems(this.publicNetworkIps, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicNetworkIps\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"totalCapacityGiB\") {\n if (typeof this.totalCapacityGiB === 'undefined' || this.totalCapacityGiB === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"totalCapacityGiB\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaximum(this.totalCapacityGiB, 178814713856)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"totalCapacityGiB\", \"does not satisfy required maximum constraint: 178814713856\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinimum(this.totalCapacityGiB, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"totalCapacityGiB\", \"does not satisfy required minimum constraint: 1\");\n }\n }\n if (property === \"state\") {\n if (typeof this.state === 'undefined' || this.state === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"state\", \"undefined or null\");\n }\n }\n if (property === \"certificateExtIds\") {\n if (typeof this.certificateExtIds === 'undefined' || this.certificateExtIds === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"certificateExtIds\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxItems(this.certificateExtIds, 100)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"certificateExtIds\", \"does not satisfy required maxItems constraint: 100\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinItems(this.certificateExtIds, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"certificateExtIds\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof ObjectStore\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nObjectStore.prototype.metadata = undefined;\n\n/**\n * The name of the Object store.\n * @memberof ObjectStore\n */\nObjectStore.prototype.name = undefined;\n\n/**\n * The time when the Object store was created.\n * @memberof ObjectStore\n */\nObjectStore.prototype.creationTime = undefined;\n\n/**\n * The time when the Object store was last updated.\n * @memberof ObjectStore\n */\nObjectStore.prototype.lastUpdateTime = undefined;\n\n/**\n * A brief description of the Object store.\n * @memberof ObjectStore\n */\nObjectStore.prototype.description = undefined;\n\n/**\n * Object store deployment version.\n * @memberof ObjectStore\n */\nObjectStore.prototype.deploymentVersion = undefined;\n\n/**\n * The DNS domain/subdomain the Object store belongs to. All the Object stores under one Prism Central must have the same domain name. The domain name must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens, or underscores. Each part can be up to 63 characters long. The domain must begin and end with an alphanumeric character. For example - 'objects-0.pc_nutanix.com'. \n * @memberof ObjectStore\n */\nObjectStore.prototype.domain = undefined;\n\n/**\n * The region in which the Object store is deployed.\n * @memberof ObjectStore\n */\nObjectStore.prototype.region = undefined;\n\n/**\n * The number of worker nodes (VMs) to be created for the Object store. Each worker node requires 10 vCPUs and 32 GiB of memory.\n * @memberof ObjectStore\n */\nObjectStore.prototype.numWorkerNodes = undefined;\n\n/**\n * UUID of the AHV or ESXi cluster.\n * @memberof ObjectStore\n */\nObjectStore.prototype.clusterExtId = undefined;\n\n/**\n * Reference to the Storage Network of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @memberof ObjectStore\n */\nObjectStore.prototype.storageNetworkReference = undefined;\n\n/**\n * @memberof ObjectStore\n */\nObjectStore.prototype.storageNetworkVip = undefined;\n\n/**\n * @memberof ObjectStore\n */\nObjectStore.prototype.storageNetworkDnsIp = undefined;\n\n/**\n * Public network reference of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @memberof ObjectStore\n */\nObjectStore.prototype.publicNetworkReference = undefined;\n\n/**\n * A list of static IP addresses used as public IPs to access the Object store.\n * @memberof ObjectStore\n */\nObjectStore.prototype.publicNetworkIps = undefined;\n\n/**\n * Size of the Object store in GiB.\n * @memberof ObjectStore\n */\nObjectStore.prototype.totalCapacityGiB = undefined;\n\n/**\n * @memberof ObjectStore\n */\nObjectStore.prototype.state = undefined;\n\n/**\n * A list of the UUIDs of the certificates of an Object store.\n * @memberof ObjectStore\n */\nObjectStore.prototype.certificateExtIds = undefined;\n\n/**\n * A globally unique identifier of an instance that is suitable for external consumption. \n * @memberof ObjectStore\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_4__[\"default\"].prototype.extId = undefined;\n/**\n * A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @memberof ObjectStore\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_4__[\"default\"].prototype.links = undefined;\n/**\n * 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). \n * @memberof ObjectStore\n */\n_common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_2__[\"default\"].prototype.tenantId = undefined;\n// Implement OneOfobjects.v4.config.GetObjectstoreApiResponsedata interface:\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/ObjectStore.js?\n}");
|
|
562
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ObjectStore)\n/* harmony export */ });\n/* harmony import */ var _common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/config/IPAddress */ \"./target/generated-sources/swagger/src/models/common/v1/config/IPAddress.js\");\n/* harmony import */ var _common_v1_config_Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/v1/config/Metadata */ \"./target/generated-sources/swagger/src/models/common/v1/config/Metadata.js\");\n/* harmony import */ var _common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/v1/config/TenantAwareModel */ \"./target/generated-sources/swagger/src/models/common/v1/config/TenantAwareModel.js\");\n/* harmony import */ var _common_v1_response_ApiLink__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/v1/response/ApiLink */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiLink.js\");\n/* harmony import */ var _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/v1/response/ExternalizableAbstractModel */ \"./target/generated-sources/swagger/src/models/common/v1/response/ExternalizableAbstractModel.js\");\n/* harmony import */ var _State__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./State */ \"./target/generated-sources/swagger/src/models/objects/v4/config/State.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * The ObjectStore model module.\n * @module Ntnx/ObjectStore\n * @version 4.0.3\n * @class ObjectStore\n * @extends ExternalizableAbstractModel\n * \n * @param { string } name The name of the Object store.\n */\nvar _ObjectStore_brand = /*#__PURE__*/new WeakSet();\nclass ObjectStore extends _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_4__[\"default\"] {\n /**\n * Constructs a new <code>ObjectStore</code>.\n * @alias module:Ntnx/ObjectStore\n * @extends module:Ntnx/ExternalizableAbstractModel\n * \n * @param { string } name The name of the Object store.\n */\n constructor(name) {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ObjectStore_brand);\n this.name = name;\n this.$objectType = \"objects.v4.config.ObjectStore\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ObjectStore</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ObjectStore} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ObjectStore} The populated <code>ObjectStore</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ObjectStore();\n _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(data, obj, true);\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_config_Metadata__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('name') && data.name !== null && data.name !== undefined) {\n obj.setName(data['name']);\n }\n if (data.hasOwnProperty('creationTime') && data.creationTime !== null && data.creationTime !== undefined) {\n obj.setCreationTime(data['creationTime']);\n }\n if (data.hasOwnProperty('lastUpdateTime') && data.lastUpdateTime !== null && data.lastUpdateTime !== undefined) {\n obj.setLastUpdateTime(data['lastUpdateTime']);\n }\n if (data.hasOwnProperty('description') && data.description !== null && data.description !== undefined) {\n obj.setDescription(data['description']);\n }\n if (data.hasOwnProperty('deploymentVersion') && data.deploymentVersion !== null && data.deploymentVersion !== undefined) {\n obj.setDeploymentVersion(data['deploymentVersion']);\n }\n if (data.hasOwnProperty('domain') && data.domain !== null && data.domain !== undefined) {\n obj.setDomain(data['domain']);\n }\n if (data.hasOwnProperty('region') && data.region !== null && data.region !== undefined) {\n obj.setRegion(data['region']);\n }\n if (data.hasOwnProperty('numWorkerNodes') && data.numWorkerNodes !== null && data.numWorkerNodes !== undefined) {\n obj.setNumWorkerNodes(data['numWorkerNodes']);\n }\n if (data.hasOwnProperty('clusterExtId') && data.clusterExtId !== null && data.clusterExtId !== undefined) {\n obj.setClusterExtId(data['clusterExtId']);\n }\n if (data.hasOwnProperty('storageNetworkReference') && data.storageNetworkReference !== null && data.storageNetworkReference !== undefined) {\n obj.setStorageNetworkReference(data['storageNetworkReference']);\n }\n if (data.hasOwnProperty('storageNetworkVip') && data.storageNetworkVip !== null && data.storageNetworkVip !== undefined) {\n obj.setStorageNetworkVip(_common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['storageNetworkVip']));\n }\n if (data.hasOwnProperty('storageNetworkDnsIp') && data.storageNetworkDnsIp !== null && data.storageNetworkDnsIp !== undefined) {\n obj.setStorageNetworkDnsIp(_common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['storageNetworkDnsIp']));\n }\n if (data.hasOwnProperty('publicNetworkReference') && data.publicNetworkReference !== null && data.publicNetworkReference !== undefined) {\n obj.setPublicNetworkReference(data['publicNetworkReference']);\n }\n if (data.hasOwnProperty('publicNetworkIps') && data.publicNetworkIps !== null && data.publicNetworkIps !== undefined) {\n itemArr = [];\n items = data.publicNetworkIps;\n for (i = 0; i < items.length; i++) {\n item = _common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setPublicNetworkIps(itemArr);\n }\n if (data.hasOwnProperty('totalCapacityGiB') && data.totalCapacityGiB !== null && data.totalCapacityGiB !== undefined) {\n obj.setTotalCapacityGiB(data['totalCapacityGiB']);\n }\n if (data.hasOwnProperty('state') && data.state !== null && data.state !== undefined) {\n obj.setState(_State__WEBPACK_IMPORTED_MODULE_5__[\"default\"].constructFromObject(data['state']));\n }\n if (data.hasOwnProperty('certificateExtIds') && data.certificateExtIds !== null && data.certificateExtIds !== undefined) {\n itemArr = [];\n items = data.certificateExtIds;\n for (i = 0; i < items.length; i++) {\n itemArr.push(items[i]);\n }\n obj.setCertificateExtIds(itemArr);\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {Metadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {Metadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * Returns The name of the Object store.\n * @return {string}\n */\n getName() {\n return this.name;\n }\n\n /**\n * Sets The name of the Object store.\n * @param {string} name The name of the Object store.\n */\n setName(name) {\n this.name = name;\n }\n\n /**\n * Returns The time when the Object store was created.\n * @return {Date}\n */\n getCreationTime() {\n return this.creationTime;\n }\n\n /**\n * Sets The time when the Object store was created.\n * @param {Date} creationTime The time when the Object store was created.\n */\n setCreationTime(creationTime) {\n this.creationTime = creationTime;\n }\n\n /**\n * Returns The time when the Object store was last updated.\n * @return {Date}\n */\n getLastUpdateTime() {\n return this.lastUpdateTime;\n }\n\n /**\n * Sets The time when the Object store was last updated.\n * @param {Date} lastUpdateTime The time when the Object store was last updated.\n */\n setLastUpdateTime(lastUpdateTime) {\n this.lastUpdateTime = lastUpdateTime;\n }\n\n /**\n * Returns A brief description of the Object store.\n * @return {string}\n */\n getDescription() {\n return this.description;\n }\n\n /**\n * Sets A brief description of the Object store.\n * @param {string} description A brief description of the Object store.\n */\n setDescription(description) {\n this.description = description;\n }\n\n /**\n * Returns Object store deployment version.\n * @return {string}\n */\n getDeploymentVersion() {\n return this.deploymentVersion;\n }\n\n /**\n * Sets Object store deployment version.\n * @param {string} deploymentVersion Object store deployment version.\n */\n setDeploymentVersion(deploymentVersion) {\n this.deploymentVersion = deploymentVersion;\n }\n\n /**\n * Returns The DNS domain/subdomain the Object store belongs to. All the Object stores under one Prism Central must have the same domain name. The domain name must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens, or underscores. Each part can be up to 63 characters long. The domain must begin and end with an alphanumeric character. For example - 'objects-0.pc_nutanix.com'. \n * @return {string}\n */\n getDomain() {\n return this.domain;\n }\n\n /**\n * Sets The DNS domain/subdomain the Object store belongs to. All the Object stores under one Prism Central must have the same domain name. The domain name must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens, or underscores. Each part can be up to 63 characters long. The domain must begin and end with an alphanumeric character. For example - 'objects-0.pc_nutanix.com'. \n * @param {string} domain The DNS domain/subdomain the Object store belongs to. All the Object stores under one Prism Central must have the same domain name. The domain name must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens, or underscores. Each part can be up to 63 characters long. The domain must begin and end with an alphanumeric character. For example - 'objects-0.pc_nutanix.com'. \n */\n setDomain(domain) {\n this.domain = domain;\n }\n\n /**\n * Returns The region in which the Object store is deployed.\n * @return {string}\n */\n getRegion() {\n return this.region;\n }\n\n /**\n * Sets The region in which the Object store is deployed.\n * @param {string} region The region in which the Object store is deployed.\n */\n setRegion(region) {\n this.region = region;\n }\n\n /**\n * Returns The number of worker nodes (VMs) to be created for the Object store. Each worker node requires 10 vCPUs and 32 GiB of memory.\n * minimum: 1\n * maximum: 1000\n * @return {Number}\n */\n getNumWorkerNodes() {\n return this.numWorkerNodes;\n }\n\n /**\n * Sets The number of worker nodes (VMs) to be created for the Object store. Each worker node requires 10 vCPUs and 32 GiB of memory.\n * @param {Number} numWorkerNodes The number of worker nodes (VMs) to be created for the Object store. Each worker node requires 10 vCPUs and 32 GiB of memory.\n */\n setNumWorkerNodes(numWorkerNodes) {\n this.numWorkerNodes = numWorkerNodes;\n }\n\n /**\n * Returns UUID of the AHV or ESXi cluster.\n * @return {string}\n */\n getClusterExtId() {\n return this.clusterExtId;\n }\n\n /**\n * Sets UUID of the AHV or ESXi cluster.\n * @param {string} clusterExtId UUID of the AHV or ESXi cluster.\n */\n setClusterExtId(clusterExtId) {\n this.clusterExtId = clusterExtId;\n }\n\n /**\n * Returns Reference to the Storage Network of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @return {string}\n */\n getStorageNetworkReference() {\n return this.storageNetworkReference;\n }\n\n /**\n * Sets Reference to the Storage Network of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @param {string} storageNetworkReference Reference to the Storage Network of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n */\n setStorageNetworkReference(storageNetworkReference) {\n this.storageNetworkReference = storageNetworkReference;\n }\n\n /**\n * @return {IPAddress}\n */\n getStorageNetworkVip() {\n return this.storageNetworkVip;\n }\n\n /**\n * @param {IPAddress} storageNetworkVip\n */\n setStorageNetworkVip(storageNetworkVip) {\n this.storageNetworkVip = storageNetworkVip;\n }\n\n /**\n * @return {IPAddress}\n */\n getStorageNetworkDnsIp() {\n return this.storageNetworkDnsIp;\n }\n\n /**\n * @param {IPAddress} storageNetworkDnsIp\n */\n setStorageNetworkDnsIp(storageNetworkDnsIp) {\n this.storageNetworkDnsIp = storageNetworkDnsIp;\n }\n\n /**\n * Returns Public network reference of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @return {string}\n */\n getPublicNetworkReference() {\n return this.publicNetworkReference;\n }\n\n /**\n * Sets Public network reference of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @param {string} publicNetworkReference Public network reference of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n */\n setPublicNetworkReference(publicNetworkReference) {\n this.publicNetworkReference = publicNetworkReference;\n }\n\n /**\n * Returns A list of static IP addresses used as public IPs to access the Object store.\n * @return {IPAddress[]}\n */\n getPublicNetworkIps() {\n return this.publicNetworkIps;\n }\n\n /**\n * Sets A list of static IP addresses used as public IPs to access the Object store.\n * @param {IPAddress[]} publicNetworkIps A list of static IP addresses used as public IPs to access the Object store.\n */\n setPublicNetworkIps(publicNetworkIps) {\n this.publicNetworkIps = publicNetworkIps;\n }\n\n /**\n * Returns Size of the Object store in GiB.\n * minimum: 1\n * maximum: 178814713856\n * @return {Number}\n */\n getTotalCapacityGiB() {\n return this.totalCapacityGiB;\n }\n\n /**\n * Sets Size of the Object store in GiB.\n * @param {Number} totalCapacityGiB Size of the Object store in GiB.\n */\n setTotalCapacityGiB(totalCapacityGiB) {\n this.totalCapacityGiB = totalCapacityGiB;\n }\n\n /**\n * @return {State}\n */\n getState() {\n return this.state;\n }\n\n /**\n * @param {State} state\n */\n setState(state) {\n this.state = state;\n }\n\n /**\n * Returns A list of the UUIDs of the certificates of an Object store.\n * @return {string[]}\n */\n getCertificateExtIds() {\n return this.certificateExtIds;\n }\n\n /**\n * Sets A list of the UUIDs of the certificates of an Object store.\n * @param {string[]} certificateExtIds A list of the UUIDs of the certificates of an Object store.\n */\n setCertificateExtIds(certificateExtIds) {\n this.certificateExtIds = certificateExtIds;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getCreationTime() !== 'undefined' && this.getCreationTime() !== null ? {\n 'creationTime': _assertClassBrand(_ObjectStore_brand, this, _handleDateType).call(this, this.getCreationTime(), false)\n } : {}),\n ...(typeof this.getLastUpdateTime() !== 'undefined' && this.getLastUpdateTime() !== null ? {\n 'lastUpdateTime': _assertClassBrand(_ObjectStore_brand, this, _handleDateType).call(this, this.getLastUpdateTime(), false)\n } : {}),\n ...(typeof this.getDescription() !== 'undefined' && this.getDescription() !== null ? {\n 'description': this.getDescription()\n } : {}),\n ...(typeof this.getDeploymentVersion() !== 'undefined' && this.getDeploymentVersion() !== null ? {\n 'deploymentVersion': this.getDeploymentVersion()\n } : {}),\n ...(typeof this.getDomain() !== 'undefined' && this.getDomain() !== null ? {\n 'domain': this.getDomain()\n } : {}),\n ...(typeof this.getRegion() !== 'undefined' && this.getRegion() !== null ? {\n 'region': this.getRegion()\n } : {}),\n ...(typeof this.getNumWorkerNodes() !== 'undefined' && this.getNumWorkerNodes() !== null ? {\n 'numWorkerNodes': this.getNumWorkerNodes()\n } : {}),\n ...(typeof this.getClusterExtId() !== 'undefined' && this.getClusterExtId() !== null ? {\n 'clusterExtId': this.getClusterExtId()\n } : {}),\n ...(typeof this.getStorageNetworkReference() !== 'undefined' && this.getStorageNetworkReference() !== null ? {\n 'storageNetworkReference': this.getStorageNetworkReference()\n } : {}),\n ...(typeof this.getStorageNetworkVip() !== 'undefined' && this.getStorageNetworkVip() !== null ? {\n 'storageNetworkVip': this.getStorageNetworkVip().toJson(false)\n } : {}),\n ...(typeof this.getStorageNetworkDnsIp() !== 'undefined' && this.getStorageNetworkDnsIp() !== null ? {\n 'storageNetworkDnsIp': this.getStorageNetworkDnsIp().toJson(false)\n } : {}),\n ...(typeof this.getPublicNetworkReference() !== 'undefined' && this.getPublicNetworkReference() !== null ? {\n 'publicNetworkReference': this.getPublicNetworkReference()\n } : {}),\n ...(typeof this.getPublicNetworkIps() !== 'undefined' && this.getPublicNetworkIps() !== null ? {\n 'publicNetworkIps': this.getPublicNetworkIps().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTotalCapacityGiB() !== 'undefined' && this.getTotalCapacityGiB() !== null ? {\n 'totalCapacityGiB': this.getTotalCapacityGiB()\n } : {}),\n ...(typeof this.getState() !== 'undefined' && this.getState() !== null ? {\n 'state': this.getState()\n } : {}),\n ...(typeof this.getCertificateExtIds() !== 'undefined' && this.getCertificateExtIds() !== null ? {\n 'certificateExtIds': this.getCertificateExtIds()\n } : {}),\n ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {\n 'extId': this.getExtId()\n } : {}),\n ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {\n 'links': this.getLinks().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {\n 'tenantId': this.getTenantId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getDescription() !== 'undefined' && this.getDescription() !== null ? {\n 'description': this.getDescription()\n } : {}),\n ...(typeof this.getDeploymentVersion() !== 'undefined' && this.getDeploymentVersion() !== null ? {\n 'deploymentVersion': this.getDeploymentVersion()\n } : {}),\n ...(typeof this.getDomain() !== 'undefined' && this.getDomain() !== null ? {\n 'domain': this.getDomain()\n } : {}),\n ...(typeof this.getRegion() !== 'undefined' && this.getRegion() !== null ? {\n 'region': this.getRegion()\n } : {}),\n ...(typeof this.getNumWorkerNodes() !== 'undefined' && this.getNumWorkerNodes() !== null ? {\n 'numWorkerNodes': this.getNumWorkerNodes()\n } : {}),\n ...(typeof this.getClusterExtId() !== 'undefined' && this.getClusterExtId() !== null ? {\n 'clusterExtId': this.getClusterExtId()\n } : {}),\n ...(typeof this.getStorageNetworkReference() !== 'undefined' && this.getStorageNetworkReference() !== null ? {\n 'storageNetworkReference': this.getStorageNetworkReference()\n } : {}),\n ...(typeof this.getStorageNetworkVip() !== 'undefined' && this.getStorageNetworkVip() !== null ? {\n 'storageNetworkVip': this.getStorageNetworkVip().toJson(false)\n } : {}),\n ...(typeof this.getStorageNetworkDnsIp() !== 'undefined' && this.getStorageNetworkDnsIp() !== null ? {\n 'storageNetworkDnsIp': this.getStorageNetworkDnsIp().toJson(false)\n } : {}),\n ...(typeof this.getPublicNetworkReference() !== 'undefined' && this.getPublicNetworkReference() !== null ? {\n 'publicNetworkReference': this.getPublicNetworkReference()\n } : {}),\n ...(typeof this.getPublicNetworkIps() !== 'undefined' && this.getPublicNetworkIps() !== null ? {\n 'publicNetworkIps': this.getPublicNetworkIps().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTotalCapacityGiB() !== 'undefined' && this.getTotalCapacityGiB() !== null ? {\n 'totalCapacityGiB': this.getTotalCapacityGiB()\n } : {}),\n ...(typeof this.getState() !== 'undefined' && this.getState() !== null ? {\n 'state': this.getState()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_6__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [\"name\"];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"name\") {\n if (typeof this.name === 'undefined' || this.name === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"name\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.name, 50)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"name\", \"does not satisfy required maxLength constraint: 50\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinLength(this.name, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"name\", \"does not satisfy required minLength constraint: 1\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validatePattern(this.name, /^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]))*([A-Za-z]|[A-Za-z][A-Za-z0-9-]*[A-Za-z0-9])$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"name\", \"does not satisfy required pattern: /^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]))*([A-Za-z]|[A-Za-z][A-Za-z0-9-]*[A-Za-z0-9])$/\");\n }\n }\n if (property === \"creationTime\") {\n if (typeof this.creationTime === 'undefined' || this.creationTime === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"creationTime\", \"undefined or null\");\n }\n }\n if (property === \"lastUpdateTime\") {\n if (typeof this.lastUpdateTime === 'undefined' || this.lastUpdateTime === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"lastUpdateTime\", \"undefined or null\");\n }\n }\n if (property === \"description\") {\n if (typeof this.description === 'undefined' || this.description === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"description\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.description, 1000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"description\", \"does not satisfy required maxLength constraint: 1000\");\n }\n }\n if (property === \"deploymentVersion\") {\n if (typeof this.deploymentVersion === 'undefined' || this.deploymentVersion === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"deploymentVersion\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.deploymentVersion, 50)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"deploymentVersion\", \"does not satisfy required maxLength constraint: 50\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinLength(this.deploymentVersion, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"deploymentVersion\", \"does not satisfy required minLength constraint: 1\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validatePattern(this.deploymentVersion, /^[a-zA-z0-9][a-zA-z0-9\\\\.]*[a-zA-Z0-9]?$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"deploymentVersion\", \"does not satisfy required pattern: /^[a-zA-z0-9][a-zA-z0-9\\\\.]*[a-zA-Z0-9]?$/\");\n }\n }\n if (property === \"domain\") {\n if (typeof this.domain === 'undefined' || this.domain === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"domain\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.domain, 1000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"domain\", \"does not satisfy required maxLength constraint: 1000\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinLength(this.domain, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"domain\", \"does not satisfy required minLength constraint: 1\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validatePattern(this.domain, /^(([a-zA-Z0-9_\\\\-]{1,63})\\\\.)+([a-zA-Z0-9_\\\\-]{1,63})$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"domain\", \"does not satisfy required pattern: /^(([a-zA-Z0-9_\\\\-]{1,63})\\\\.)+([a-zA-Z0-9_\\\\-]{1,63})$/\");\n }\n }\n if (property === \"region\") {\n if (typeof this.region === 'undefined' || this.region === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"region\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.region, 50)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"region\", \"does not satisfy required maxLength constraint: 50\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinLength(this.region, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"region\", \"does not satisfy required minLength constraint: 1\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validatePattern(this.region, /^[a-z]+\\\\-[a-z]+\\\\-[0-9]$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"region\", \"does not satisfy required pattern: /^[a-z]+\\\\-[a-z]+\\\\-[0-9]$/\");\n }\n }\n if (property === \"numWorkerNodes\") {\n if (typeof this.numWorkerNodes === 'undefined' || this.numWorkerNodes === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"numWorkerNodes\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaximum(this.numWorkerNodes, 1000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"numWorkerNodes\", \"does not satisfy required maximum constraint: 1000\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinimum(this.numWorkerNodes, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"numWorkerNodes\", \"does not satisfy required minimum constraint: 1\");\n }\n }\n if (property === \"clusterExtId\") {\n if (typeof this.clusterExtId === 'undefined' || this.clusterExtId === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"clusterExtId\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validatePattern(this.clusterExtId, /^[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}$/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"clusterExtId\", \"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}$/\");\n }\n }\n if (property === \"storageNetworkReference\") {\n if (typeof this.storageNetworkReference === 'undefined' || this.storageNetworkReference === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"storageNetworkReference\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.storageNetworkReference, 1000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"storageNetworkReference\", \"does not satisfy required maxLength constraint: 1000\");\n }\n }\n if (property === \"storageNetworkVip\") {\n if (typeof this.storageNetworkVip === 'undefined' || this.storageNetworkVip === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"storageNetworkVip\", \"undefined or null\");\n }\n }\n if (property === \"storageNetworkDnsIp\") {\n if (typeof this.storageNetworkDnsIp === 'undefined' || this.storageNetworkDnsIp === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"storageNetworkDnsIp\", \"undefined or null\");\n }\n }\n if (property === \"publicNetworkReference\") {\n if (typeof this.publicNetworkReference === 'undefined' || this.publicNetworkReference === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicNetworkReference\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxLength(this.publicNetworkReference, 1000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicNetworkReference\", \"does not satisfy required maxLength constraint: 1000\");\n }\n }\n if (property === \"publicNetworkIps\") {\n if (typeof this.publicNetworkIps === 'undefined' || this.publicNetworkIps === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicNetworkIps\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxItems(this.publicNetworkIps, 1000)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicNetworkIps\", \"does not satisfy required maxItems constraint: 1000\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinItems(this.publicNetworkIps, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"publicNetworkIps\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"totalCapacityGiB\") {\n if (typeof this.totalCapacityGiB === 'undefined' || this.totalCapacityGiB === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"totalCapacityGiB\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaximum(this.totalCapacityGiB, 178814713856)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"totalCapacityGiB\", \"does not satisfy required maximum constraint: 178814713856\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinimum(this.totalCapacityGiB, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"totalCapacityGiB\", \"does not satisfy required minimum constraint: 1\");\n }\n }\n if (property === \"state\") {\n if (typeof this.state === 'undefined' || this.state === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"state\", \"undefined or null\");\n }\n }\n if (property === \"certificateExtIds\") {\n if (typeof this.certificateExtIds === 'undefined' || this.certificateExtIds === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"certificateExtIds\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMaxItems(this.certificateExtIds, 100)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"certificateExtIds\", \"does not satisfy required maxItems constraint: 100\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].validateMinItems(this.certificateExtIds, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"certificateExtIds\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_8__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof ObjectStore\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nObjectStore.prototype.metadata = undefined;\n\n/**\n * The name of the Object store.\n * @memberof ObjectStore\n */\nObjectStore.prototype.name = undefined;\n\n/**\n * The time when the Object store was created.\n * @memberof ObjectStore\n */\nObjectStore.prototype.creationTime = undefined;\n\n/**\n * The time when the Object store was last updated.\n * @memberof ObjectStore\n */\nObjectStore.prototype.lastUpdateTime = undefined;\n\n/**\n * A brief description of the Object store.\n * @memberof ObjectStore\n */\nObjectStore.prototype.description = undefined;\n\n/**\n * Object store deployment version.\n * @memberof ObjectStore\n */\nObjectStore.prototype.deploymentVersion = undefined;\n\n/**\n * The DNS domain/subdomain the Object store belongs to. All the Object stores under one Prism Central must have the same domain name. The domain name must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens, or underscores. Each part can be up to 63 characters long. The domain must begin and end with an alphanumeric character. For example - 'objects-0.pc_nutanix.com'. \n * @memberof ObjectStore\n */\nObjectStore.prototype.domain = undefined;\n\n/**\n * The region in which the Object store is deployed.\n * @memberof ObjectStore\n */\nObjectStore.prototype.region = undefined;\n\n/**\n * The number of worker nodes (VMs) to be created for the Object store. Each worker node requires 10 vCPUs and 32 GiB of memory.\n * @memberof ObjectStore\n */\nObjectStore.prototype.numWorkerNodes = undefined;\n\n/**\n * UUID of the AHV or ESXi cluster.\n * @memberof ObjectStore\n */\nObjectStore.prototype.clusterExtId = undefined;\n\n/**\n * Reference to the Storage Network of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @memberof ObjectStore\n */\nObjectStore.prototype.storageNetworkReference = undefined;\n\n/**\n * @memberof ObjectStore\n */\nObjectStore.prototype.storageNetworkVip = undefined;\n\n/**\n * @memberof ObjectStore\n */\nObjectStore.prototype.storageNetworkDnsIp = undefined;\n\n/**\n * Public network reference of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @memberof ObjectStore\n */\nObjectStore.prototype.publicNetworkReference = undefined;\n\n/**\n * A list of static IP addresses used as public IPs to access the Object store.\n * @memberof ObjectStore\n */\nObjectStore.prototype.publicNetworkIps = undefined;\n\n/**\n * Size of the Object store in GiB.\n * @memberof ObjectStore\n */\nObjectStore.prototype.totalCapacityGiB = undefined;\n\n/**\n * @memberof ObjectStore\n */\nObjectStore.prototype.state = undefined;\n\n/**\n * A list of the UUIDs of the certificates of an Object store.\n * @memberof ObjectStore\n */\nObjectStore.prototype.certificateExtIds = undefined;\n\n/**\n * A globally unique identifier of an instance that is suitable for external consumption. \n * @memberof ObjectStore\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_4__[\"default\"].prototype.extId = undefined;\n/**\n * A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @memberof ObjectStore\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_4__[\"default\"].prototype.links = undefined;\n/**\n * 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). \n * @memberof ObjectStore\n */\n_common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_2__[\"default\"].prototype.tenantId = undefined;\n// Implement OneOfobjects.v4.config.GetObjectstoreApiResponsedata interface:\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/ObjectStore.js?\n}");
|
|
563
563
|
|
|
564
564
|
/***/ },
|
|
565
565
|
|
|
@@ -570,7 +570,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
570
570
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
571
571
|
|
|
572
572
|
"use strict";
|
|
573
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ObjectStoreProjection)\n/* harmony export */ });\n/* harmony import */ var _common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/config/IPAddress */ \"./target/generated-sources/swagger/src/models/common/v1/config/IPAddress.js\");\n/* harmony import */ var _common_v1_config_Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/v1/config/Metadata */ \"./target/generated-sources/swagger/src/models/common/v1/config/Metadata.js\");\n/* harmony import */ var _common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/v1/config/TenantAwareModel */ \"./target/generated-sources/swagger/src/models/common/v1/config/TenantAwareModel.js\");\n/* harmony import */ var _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/v1/response/ExternalizableAbstractModel */ \"./target/generated-sources/swagger/src/models/common/v1/response/ExternalizableAbstractModel.js\");\n/* harmony import */ var _CertificateProjection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CertificateProjection */ \"./target/generated-sources/swagger/src/models/objects/v4/config/CertificateProjection.js\");\n/* harmony import */ var _ObjectStore__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ObjectStore */ \"./target/generated-sources/swagger/src/models/objects/v4/config/ObjectStore.js\");\n/* harmony import */ var _State__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./State */ \"./target/generated-sources/swagger/src/models/objects/v4/config/State.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * The ObjectStoreProjection model module.\n * @module Ntnx/ObjectStoreProjection\n * @version 4.0.2\n * @class ObjectStoreProjection\n * @extends ObjectStore\n * \n * @param { string } name The name of the Object store.\n */\nvar _ObjectStoreProjection_brand = /*#__PURE__*/new WeakSet();\nclass ObjectStoreProjection extends _ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"] {\n /**\n * Constructs a new <code>ObjectStoreProjection</code>.\n * @alias module:Ntnx/ObjectStoreProjection\n * @extends module:Ntnx/ObjectStore\n * \n * @param { string } name The name of the Object store.\n */\n constructor(name) {\n super(name);\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ObjectStoreProjection_brand);\n this.$objectType = \"objects.v4.config.ObjectStoreProjection\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ObjectStoreProjection</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ObjectStoreProjection} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ObjectStoreProjection} The populated <code>ObjectStoreProjection</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ObjectStoreProjection();\n _ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].constructFromObject(data, obj, true);\n if (data.hasOwnProperty('certificateProjection') && data.certificateProjection !== null && data.certificateProjection !== undefined) {\n itemArr = [];\n items = data.certificateProjection;\n for (i = 0; i < items.length; i++) {\n item = _CertificateProjection__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setCertificateProjection(itemArr);\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {CertificateProjection[]}\n */\n getCertificateProjection() {\n return this.certificateProjection;\n }\n\n /**\n * @param {CertificateProjection[]} certificateProjection\n */\n setCertificateProjection(certificateProjection) {\n this.certificateProjection = certificateProjection;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getCertificateProjection() !== 'undefined' && this.getCertificateProjection() !== null ? {\n 'certificateProjection': this.getCertificateProjection().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getCreationTime() !== 'undefined' && this.getCreationTime() !== null ? {\n 'creationTime': _assertClassBrand(_ObjectStoreProjection_brand, this, _handleDateType).call(this, this.getCreationTime(), false)\n } : {}),\n ...(typeof this.getLastUpdateTime() !== 'undefined' && this.getLastUpdateTime() !== null ? {\n 'lastUpdateTime': _assertClassBrand(_ObjectStoreProjection_brand, this, _handleDateType).call(this, this.getLastUpdateTime(), false)\n } : {}),\n ...(typeof this.getDescription() !== 'undefined' && this.getDescription() !== null ? {\n 'description': this.getDescription()\n } : {}),\n ...(typeof this.getDeploymentVersion() !== 'undefined' && this.getDeploymentVersion() !== null ? {\n 'deploymentVersion': this.getDeploymentVersion()\n } : {}),\n ...(typeof this.getDomain() !== 'undefined' && this.getDomain() !== null ? {\n 'domain': this.getDomain()\n } : {}),\n ...(typeof this.getRegion() !== 'undefined' && this.getRegion() !== null ? {\n 'region': this.getRegion()\n } : {}),\n ...(typeof this.getNumWorkerNodes() !== 'undefined' && this.getNumWorkerNodes() !== null ? {\n 'numWorkerNodes': this.getNumWorkerNodes()\n } : {}),\n ...(typeof this.getClusterExtId() !== 'undefined' && this.getClusterExtId() !== null ? {\n 'clusterExtId': this.getClusterExtId()\n } : {}),\n ...(typeof this.getStorageNetworkReference() !== 'undefined' && this.getStorageNetworkReference() !== null ? {\n 'storageNetworkReference': this.getStorageNetworkReference()\n } : {}),\n ...(typeof this.getStorageNetworkVip() !== 'undefined' && this.getStorageNetworkVip() !== null ? {\n 'storageNetworkVip': this.getStorageNetworkVip().toJson(false)\n } : {}),\n ...(typeof this.getStorageNetworkDnsIp() !== 'undefined' && this.getStorageNetworkDnsIp() !== null ? {\n 'storageNetworkDnsIp': this.getStorageNetworkDnsIp().toJson(false)\n } : {}),\n ...(typeof this.getPublicNetworkReference() !== 'undefined' && this.getPublicNetworkReference() !== null ? {\n 'publicNetworkReference': this.getPublicNetworkReference()\n } : {}),\n ...(typeof this.getPublicNetworkIps() !== 'undefined' && this.getPublicNetworkIps() !== null ? {\n 'publicNetworkIps': this.getPublicNetworkIps().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTotalCapacityGiB() !== 'undefined' && this.getTotalCapacityGiB() !== null ? {\n 'totalCapacityGiB': this.getTotalCapacityGiB()\n } : {}),\n ...(typeof this.getState() !== 'undefined' && this.getState() !== null ? {\n 'state': this.getState()\n } : {}),\n ...(typeof this.getCertificateExtIds() !== 'undefined' && this.getCertificateExtIds() !== null ? {\n 'certificateExtIds': this.getCertificateExtIds()\n } : {}),\n ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {\n 'extId': this.getExtId()\n } : {}),\n ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {\n 'links': this.getLinks().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {\n 'tenantId': this.getTenantId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getCertificateProjection() !== 'undefined' && this.getCertificateProjection() !== null ? {\n 'certificateProjection': this.getCertificateProjection().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getDescription() !== 'undefined' && this.getDescription() !== null ? {\n 'description': this.getDescription()\n } : {}),\n ...(typeof this.getDeploymentVersion() !== 'undefined' && this.getDeploymentVersion() !== null ? {\n 'deploymentVersion': this.getDeploymentVersion()\n } : {}),\n ...(typeof this.getDomain() !== 'undefined' && this.getDomain() !== null ? {\n 'domain': this.getDomain()\n } : {}),\n ...(typeof this.getRegion() !== 'undefined' && this.getRegion() !== null ? {\n 'region': this.getRegion()\n } : {}),\n ...(typeof this.getNumWorkerNodes() !== 'undefined' && this.getNumWorkerNodes() !== null ? {\n 'numWorkerNodes': this.getNumWorkerNodes()\n } : {}),\n ...(typeof this.getClusterExtId() !== 'undefined' && this.getClusterExtId() !== null ? {\n 'clusterExtId': this.getClusterExtId()\n } : {}),\n ...(typeof this.getStorageNetworkReference() !== 'undefined' && this.getStorageNetworkReference() !== null ? {\n 'storageNetworkReference': this.getStorageNetworkReference()\n } : {}),\n ...(typeof this.getStorageNetworkVip() !== 'undefined' && this.getStorageNetworkVip() !== null ? {\n 'storageNetworkVip': this.getStorageNetworkVip().toJson(false)\n } : {}),\n ...(typeof this.getStorageNetworkDnsIp() !== 'undefined' && this.getStorageNetworkDnsIp() !== null ? {\n 'storageNetworkDnsIp': this.getStorageNetworkDnsIp().toJson(false)\n } : {}),\n ...(typeof this.getPublicNetworkReference() !== 'undefined' && this.getPublicNetworkReference() !== null ? {\n 'publicNetworkReference': this.getPublicNetworkReference()\n } : {}),\n ...(typeof this.getPublicNetworkIps() !== 'undefined' && this.getPublicNetworkIps() !== null ? {\n 'publicNetworkIps': this.getPublicNetworkIps().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTotalCapacityGiB() !== 'undefined' && this.getTotalCapacityGiB() !== null ? {\n 'totalCapacityGiB': this.getTotalCapacityGiB()\n } : {}),\n ...(typeof this.getState() !== 'undefined' && this.getState() !== null ? {\n 'state': this.getState()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_7__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [\"name\"];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"certificateProjection\") {\n if (typeof this.certificateProjection === 'undefined' || this.certificateProjection === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_9__[\"default\"](\"certificateProjection\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_9__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof ObjectStoreProjection\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nObjectStoreProjection.prototype.certificateProjection = undefined;\n\n/**\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.metadata = undefined;\n/**\n * The name of the Object store.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.name = undefined;\n/**\n * The time when the Object store was created.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.creationTime = undefined;\n/**\n * The time when the Object store was last updated.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.lastUpdateTime = undefined;\n/**\n * A brief description of the Object store.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.description = undefined;\n/**\n * Object store deployment version.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.deploymentVersion = undefined;\n/**\n * The DNS domain/subdomain the Object store belongs to. All the Object stores under one Prism Central must have the same domain name. The domain name must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens, or underscores. Each part can be up to 63 characters long. The domain must begin and end with an alphanumeric character. For example - 'objects-0.pc_nutanix.com'. \n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.domain = undefined;\n/**\n * The region in which the Object store is deployed.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.region = undefined;\n/**\n * The number of worker nodes (VMs) to be created for the Object store. Each worker node requires 10 vCPUs and 32 GiB of memory.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.numWorkerNodes = undefined;\n/**\n * UUID of the AHV or ESXi cluster.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.clusterExtId = undefined;\n/**\n * Reference to the Storage Network of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.storageNetworkReference = undefined;\n/**\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.storageNetworkVip = undefined;\n/**\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.storageNetworkDnsIp = undefined;\n/**\n * Public network reference of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.publicNetworkReference = undefined;\n/**\n * A list of static IP addresses used as public IPs to access the Object store.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.publicNetworkIps = undefined;\n/**\n * Size of the Object store in GiB.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.totalCapacityGiB = undefined;\n/**\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.state = undefined;\n/**\n * A list of the UUIDs of the certificates of an Object store.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.certificateExtIds = undefined;\n/**\n * A globally unique identifier of an instance that is suitable for external consumption. \n * @memberof ObjectStoreProjection\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype.extId = undefined;\n/**\n * A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @memberof ObjectStoreProjection\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype.links = undefined;\n/**\n * 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). \n * @memberof ObjectStoreProjection\n */\n_common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_2__[\"default\"].prototype.tenantId = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/ObjectStoreProjection.js?\n}");
|
|
573
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ObjectStoreProjection)\n/* harmony export */ });\n/* harmony import */ var _common_v1_config_IPAddress__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/config/IPAddress */ \"./target/generated-sources/swagger/src/models/common/v1/config/IPAddress.js\");\n/* harmony import */ var _common_v1_config_Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/v1/config/Metadata */ \"./target/generated-sources/swagger/src/models/common/v1/config/Metadata.js\");\n/* harmony import */ var _common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/v1/config/TenantAwareModel */ \"./target/generated-sources/swagger/src/models/common/v1/config/TenantAwareModel.js\");\n/* harmony import */ var _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/v1/response/ExternalizableAbstractModel */ \"./target/generated-sources/swagger/src/models/common/v1/response/ExternalizableAbstractModel.js\");\n/* harmony import */ var _CertificateProjection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CertificateProjection */ \"./target/generated-sources/swagger/src/models/objects/v4/config/CertificateProjection.js\");\n/* harmony import */ var _ObjectStore__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ObjectStore */ \"./target/generated-sources/swagger/src/models/objects/v4/config/ObjectStore.js\");\n/* harmony import */ var _State__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./State */ \"./target/generated-sources/swagger/src/models/objects/v4/config/State.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * The ObjectStoreProjection model module.\n * @module Ntnx/ObjectStoreProjection\n * @version 4.0.3\n * @class ObjectStoreProjection\n * @extends ObjectStore\n * \n * @param { string } name The name of the Object store.\n */\nvar _ObjectStoreProjection_brand = /*#__PURE__*/new WeakSet();\nclass ObjectStoreProjection extends _ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"] {\n /**\n * Constructs a new <code>ObjectStoreProjection</code>.\n * @alias module:Ntnx/ObjectStoreProjection\n * @extends module:Ntnx/ObjectStore\n * \n * @param { string } name The name of the Object store.\n */\n constructor(name) {\n super(name);\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ObjectStoreProjection_brand);\n this.$objectType = \"objects.v4.config.ObjectStoreProjection\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ObjectStoreProjection</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ObjectStoreProjection} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ObjectStoreProjection} The populated <code>ObjectStoreProjection</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ObjectStoreProjection();\n _ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].constructFromObject(data, obj, true);\n if (data.hasOwnProperty('certificateProjection') && data.certificateProjection !== null && data.certificateProjection !== undefined) {\n itemArr = [];\n items = data.certificateProjection;\n for (i = 0; i < items.length; i++) {\n item = _CertificateProjection__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setCertificateProjection(itemArr);\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {CertificateProjection[]}\n */\n getCertificateProjection() {\n return this.certificateProjection;\n }\n\n /**\n * @param {CertificateProjection[]} certificateProjection\n */\n setCertificateProjection(certificateProjection) {\n this.certificateProjection = certificateProjection;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getCertificateProjection() !== 'undefined' && this.getCertificateProjection() !== null ? {\n 'certificateProjection': this.getCertificateProjection().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getCreationTime() !== 'undefined' && this.getCreationTime() !== null ? {\n 'creationTime': _assertClassBrand(_ObjectStoreProjection_brand, this, _handleDateType).call(this, this.getCreationTime(), false)\n } : {}),\n ...(typeof this.getLastUpdateTime() !== 'undefined' && this.getLastUpdateTime() !== null ? {\n 'lastUpdateTime': _assertClassBrand(_ObjectStoreProjection_brand, this, _handleDateType).call(this, this.getLastUpdateTime(), false)\n } : {}),\n ...(typeof this.getDescription() !== 'undefined' && this.getDescription() !== null ? {\n 'description': this.getDescription()\n } : {}),\n ...(typeof this.getDeploymentVersion() !== 'undefined' && this.getDeploymentVersion() !== null ? {\n 'deploymentVersion': this.getDeploymentVersion()\n } : {}),\n ...(typeof this.getDomain() !== 'undefined' && this.getDomain() !== null ? {\n 'domain': this.getDomain()\n } : {}),\n ...(typeof this.getRegion() !== 'undefined' && this.getRegion() !== null ? {\n 'region': this.getRegion()\n } : {}),\n ...(typeof this.getNumWorkerNodes() !== 'undefined' && this.getNumWorkerNodes() !== null ? {\n 'numWorkerNodes': this.getNumWorkerNodes()\n } : {}),\n ...(typeof this.getClusterExtId() !== 'undefined' && this.getClusterExtId() !== null ? {\n 'clusterExtId': this.getClusterExtId()\n } : {}),\n ...(typeof this.getStorageNetworkReference() !== 'undefined' && this.getStorageNetworkReference() !== null ? {\n 'storageNetworkReference': this.getStorageNetworkReference()\n } : {}),\n ...(typeof this.getStorageNetworkVip() !== 'undefined' && this.getStorageNetworkVip() !== null ? {\n 'storageNetworkVip': this.getStorageNetworkVip().toJson(false)\n } : {}),\n ...(typeof this.getStorageNetworkDnsIp() !== 'undefined' && this.getStorageNetworkDnsIp() !== null ? {\n 'storageNetworkDnsIp': this.getStorageNetworkDnsIp().toJson(false)\n } : {}),\n ...(typeof this.getPublicNetworkReference() !== 'undefined' && this.getPublicNetworkReference() !== null ? {\n 'publicNetworkReference': this.getPublicNetworkReference()\n } : {}),\n ...(typeof this.getPublicNetworkIps() !== 'undefined' && this.getPublicNetworkIps() !== null ? {\n 'publicNetworkIps': this.getPublicNetworkIps().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTotalCapacityGiB() !== 'undefined' && this.getTotalCapacityGiB() !== null ? {\n 'totalCapacityGiB': this.getTotalCapacityGiB()\n } : {}),\n ...(typeof this.getState() !== 'undefined' && this.getState() !== null ? {\n 'state': this.getState()\n } : {}),\n ...(typeof this.getCertificateExtIds() !== 'undefined' && this.getCertificateExtIds() !== null ? {\n 'certificateExtIds': this.getCertificateExtIds()\n } : {}),\n ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {\n 'extId': this.getExtId()\n } : {}),\n ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {\n 'links': this.getLinks().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {\n 'tenantId': this.getTenantId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getCertificateProjection() !== 'undefined' && this.getCertificateProjection() !== null ? {\n 'certificateProjection': this.getCertificateProjection().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getName() !== 'undefined' && this.getName() !== null ? {\n 'name': this.getName()\n } : {}),\n ...(typeof this.getDescription() !== 'undefined' && this.getDescription() !== null ? {\n 'description': this.getDescription()\n } : {}),\n ...(typeof this.getDeploymentVersion() !== 'undefined' && this.getDeploymentVersion() !== null ? {\n 'deploymentVersion': this.getDeploymentVersion()\n } : {}),\n ...(typeof this.getDomain() !== 'undefined' && this.getDomain() !== null ? {\n 'domain': this.getDomain()\n } : {}),\n ...(typeof this.getRegion() !== 'undefined' && this.getRegion() !== null ? {\n 'region': this.getRegion()\n } : {}),\n ...(typeof this.getNumWorkerNodes() !== 'undefined' && this.getNumWorkerNodes() !== null ? {\n 'numWorkerNodes': this.getNumWorkerNodes()\n } : {}),\n ...(typeof this.getClusterExtId() !== 'undefined' && this.getClusterExtId() !== null ? {\n 'clusterExtId': this.getClusterExtId()\n } : {}),\n ...(typeof this.getStorageNetworkReference() !== 'undefined' && this.getStorageNetworkReference() !== null ? {\n 'storageNetworkReference': this.getStorageNetworkReference()\n } : {}),\n ...(typeof this.getStorageNetworkVip() !== 'undefined' && this.getStorageNetworkVip() !== null ? {\n 'storageNetworkVip': this.getStorageNetworkVip().toJson(false)\n } : {}),\n ...(typeof this.getStorageNetworkDnsIp() !== 'undefined' && this.getStorageNetworkDnsIp() !== null ? {\n 'storageNetworkDnsIp': this.getStorageNetworkDnsIp().toJson(false)\n } : {}),\n ...(typeof this.getPublicNetworkReference() !== 'undefined' && this.getPublicNetworkReference() !== null ? {\n 'publicNetworkReference': this.getPublicNetworkReference()\n } : {}),\n ...(typeof this.getPublicNetworkIps() !== 'undefined' && this.getPublicNetworkIps() !== null ? {\n 'publicNetworkIps': this.getPublicNetworkIps().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTotalCapacityGiB() !== 'undefined' && this.getTotalCapacityGiB() !== null ? {\n 'totalCapacityGiB': this.getTotalCapacityGiB()\n } : {}),\n ...(typeof this.getState() !== 'undefined' && this.getState() !== null ? {\n 'state': this.getState()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_7__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [\"name\"];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"certificateProjection\") {\n if (typeof this.certificateProjection === 'undefined' || this.certificateProjection === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_9__[\"default\"](\"certificateProjection\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_9__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof ObjectStoreProjection\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nObjectStoreProjection.prototype.certificateProjection = undefined;\n\n/**\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.metadata = undefined;\n/**\n * The name of the Object store.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.name = undefined;\n/**\n * The time when the Object store was created.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.creationTime = undefined;\n/**\n * The time when the Object store was last updated.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.lastUpdateTime = undefined;\n/**\n * A brief description of the Object store.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.description = undefined;\n/**\n * Object store deployment version.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.deploymentVersion = undefined;\n/**\n * The DNS domain/subdomain the Object store belongs to. All the Object stores under one Prism Central must have the same domain name. The domain name must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens, or underscores. Each part can be up to 63 characters long. The domain must begin and end with an alphanumeric character. For example - 'objects-0.pc_nutanix.com'. \n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.domain = undefined;\n/**\n * The region in which the Object store is deployed.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.region = undefined;\n/**\n * The number of worker nodes (VMs) to be created for the Object store. Each worker node requires 10 vCPUs and 32 GiB of memory.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.numWorkerNodes = undefined;\n/**\n * UUID of the AHV or ESXi cluster.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.clusterExtId = undefined;\n/**\n * Reference to the Storage Network of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.storageNetworkReference = undefined;\n/**\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.storageNetworkVip = undefined;\n/**\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.storageNetworkDnsIp = undefined;\n/**\n * Public network reference of the Object store. This is the subnet UUID for an AHV cluster or the IPAM name for an ESXi cluster.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.publicNetworkReference = undefined;\n/**\n * A list of static IP addresses used as public IPs to access the Object store.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.publicNetworkIps = undefined;\n/**\n * Size of the Object store in GiB.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.totalCapacityGiB = undefined;\n/**\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.state = undefined;\n/**\n * A list of the UUIDs of the certificates of an Object store.\n * @memberof ObjectStoreProjection\n */\n_ObjectStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prototype.certificateExtIds = undefined;\n/**\n * A globally unique identifier of an instance that is suitable for external consumption. \n * @memberof ObjectStoreProjection\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype.extId = undefined;\n/**\n * A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @memberof ObjectStoreProjection\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype.links = undefined;\n/**\n * 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). \n * @memberof ObjectStoreProjection\n */\n_common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_2__[\"default\"].prototype.tenantId = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/ObjectStoreProjection.js?\n}");
|
|
574
574
|
|
|
575
575
|
/***/ },
|
|
576
576
|
|
|
@@ -581,7 +581,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
581
581
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
582
582
|
|
|
583
583
|
"use strict";
|
|
584
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.
|
|
584
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * Enum class State.\n * @enum {string}\n * @readonly\n */\nconst State = {\n /** \n * Unknown value.\n * @const\n */\n $UNKNOWN: \"$UNKNOWN\",\n /** \n * Redacted value.\n * @const\n */\n $REDACTED: \"$REDACTED\",\n /** \n * The Object store deployment has failed.\n * @const\n */\n OBJECT_STORE_DEPLOYMENT_FAILED: \"OBJECT_STORE_DEPLOYMENT_FAILED\",\n /** \n * Creating the Object store certificate has failed.\n * @const\n */\n OBJECT_STORE_CERT_CREATION_FAILED: \"OBJECT_STORE_CERT_CREATION_FAILED\",\n /** \n * There was an error deleting the Object store.\n * @const\n */\n OBJECT_STORE_DELETION_FAILED: \"OBJECT_STORE_DELETION_FAILED\",\n /** \n * The Object store is not deployed.\n * @const\n */\n UNDEPLOYED_OBJECT_STORE: \"UNDEPLOYED_OBJECT_STORE\",\n /** \n * The Object store is being deployed.\n * @const\n */\n DEPLOYING_OBJECT_STORE: \"DEPLOYING_OBJECT_STORE\",\n /** \n * A certificate is being created for the Object store.\n * @const\n */\n CREATING_OBJECT_STORE_CERT: \"CREATING_OBJECT_STORE_CERT\",\n /** \n * A deployed Object store is being deleted.\n * @const\n */\n DELETING_OBJECT_STORE: \"DELETING_OBJECT_STORE\",\n /** \n * There are no ongoing operations on the deployed Object store.\n * @const\n */\n OBJECT_STORE_AVAILABLE: \"OBJECT_STORE_AVAILABLE\",\n /** \n * There is an ongoing operation on the Object store.\n * @const\n */\n OBJECT_STORE_OPERATION_PENDING: \"OBJECT_STORE_OPERATION_PENDING\",\n /** \n * There was an error while performing an operation on the Object store.\n * @const\n */\n OBJECT_STORE_OPERATION_FAILED: \"OBJECT_STORE_OPERATION_FAILED\"\n};\n\n/**\n* Returns a <code>State</code> enum value from a JavaScript object name.\n* @param {Object} obj The plain JavaScript object containing the name of the enum value.\n* @return {State} The enum <code>State</code> value.\n*/\nState.constructFromObject = function (obj) {\n if (typeof obj === 'string' || obj instanceof String) {\n let enumVal = Object.keys(State).find(key => State[key] === obj);\n return enumVal === undefined || enumVal === null ? State.$UNKNOWN : State[enumVal];\n } else {\n throw new Error(\"Received object name is not an instance of String\");\n }\n};\n\n/**\n* Validates <code>State</code> enum value.\n* @param {Object} obj The plain JavaScript object containing the name of the enum value.\n* @return {null} Throws error for invalid value.\n*/\nState.validate = function (obj) {\n switch (obj) {\n case State.$UNKNOWN:\n case State.$REDACTED:\n case State.OBJECT_STORE_DEPLOYMENT_FAILED:\n case State.OBJECT_STORE_CERT_CREATION_FAILED:\n case State.OBJECT_STORE_DELETION_FAILED:\n case State.UNDEPLOYED_OBJECT_STORE:\n case State.DEPLOYING_OBJECT_STORE:\n case State.CREATING_OBJECT_STORE_CERT:\n case State.DELETING_OBJECT_STORE:\n case State.OBJECT_STORE_AVAILABLE:\n case State.OBJECT_STORE_OPERATION_PENDING:\n case State.OBJECT_STORE_OPERATION_FAILED:\n return;\n default:\n throw new Error(\"Invalid : must be State.{ $UNKNOWN|$REDACTED|OBJECT_STORE_DEPLOYMENT_FAILED|OBJECT_STORE_CERT_CREATION_FAILED|OBJECT_STORE_DELETION_FAILED|UNDEPLOYED_OBJECT_STORE|DEPLOYING_OBJECT_STORE|CREATING_OBJECT_STORE_CERT|DELETING_OBJECT_STORE|OBJECT_STORE_AVAILABLE|OBJECT_STORE_OPERATION_PENDING|OBJECT_STORE_OPERATION_FAILED }\");\n }\n};\nObject.freeze(State);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (State);\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/State.js?\n}");
|
|
585
585
|
|
|
586
586
|
/***/ },
|
|
587
587
|
|
|
@@ -592,7 +592,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
592
592
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
593
593
|
|
|
594
594
|
"use strict";
|
|
595
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ UpdateObjectstoreApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../prism/v4/config/TaskReference */ \"./target/generated-sources/swagger/src/models/prism/v4/config/TaskReference.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The UpdateObjectstoreApiResponse model module.\n * @module Ntnx/UpdateObjectstoreApiResponse\n * @version 4.0.2\n * @class UpdateObjectstoreApiResponse\n */\nvar _UpdateObjectstoreApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass UpdateObjectstoreApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"] {\n /**\n * Constructs a new <code>UpdateObjectstoreApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores/{extId} Put operation\n * @alias module:Ntnx/UpdateObjectstoreApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _UpdateObjectstoreApiResponse_brand);\n this.$objectType = \"objects.v4.config.UpdateObjectstoreApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>UpdateObjectstoreApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/UpdateObjectstoreApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/UpdateObjectstoreApiResponse} The populated <code>UpdateObjectstoreApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new UpdateObjectstoreApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'prism.v4.config.TaskReference':\n obj.setData(_prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {TaskReference | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {TaskReference | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_UpdateObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_UpdateObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof UpdateObjectstoreApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nUpdateObjectstoreApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof UpdateObjectstoreApiResponse\n */\nUpdateObjectstoreApiResponse.prototype.data = undefined;\nUpdateObjectstoreApiResponse.prototype.$reserved = undefined;\nUpdateObjectstoreApiResponse.prototype.$objectType = undefined;\nUpdateObjectstoreApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/UpdateObjectstoreApiResponse.js?\n}");
|
|
595
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ UpdateObjectstoreApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../prism/v4/config/TaskReference */ \"./target/generated-sources/swagger/src/models/prism/v4/config/TaskReference.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The UpdateObjectstoreApiResponse model module.\n * @module Ntnx/UpdateObjectstoreApiResponse\n * @version 4.0.3\n * @class UpdateObjectstoreApiResponse\n */\nvar _UpdateObjectstoreApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass UpdateObjectstoreApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"] {\n /**\n * Constructs a new <code>UpdateObjectstoreApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/config/object-stores/{extId} Put operation\n * @alias module:Ntnx/UpdateObjectstoreApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _UpdateObjectstoreApiResponse_brand);\n this.$objectType = \"objects.v4.config.UpdateObjectstoreApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>UpdateObjectstoreApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/UpdateObjectstoreApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/UpdateObjectstoreApiResponse} The populated <code>UpdateObjectstoreApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new UpdateObjectstoreApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'prism.v4.config.TaskReference':\n obj.setData(_prism_v4_config_TaskReference__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {TaskReference | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {TaskReference | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_UpdateObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_UpdateObjectstoreApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof UpdateObjectstoreApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nUpdateObjectstoreApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof UpdateObjectstoreApiResponse\n */\nUpdateObjectstoreApiResponse.prototype.data = undefined;\nUpdateObjectstoreApiResponse.prototype.$reserved = undefined;\nUpdateObjectstoreApiResponse.prototype.$objectType = undefined;\nUpdateObjectstoreApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/config/UpdateObjectstoreApiResponse.js?\n}");
|
|
596
596
|
|
|
597
597
|
/***/ },
|
|
598
598
|
|
|
@@ -603,7 +603,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
603
603
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
604
604
|
|
|
605
605
|
"use strict";
|
|
606
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ AppMessage)\n/* harmony export */ });\n/* harmony import */ var _common_v1_config_MessageSeverity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/config/MessageSeverity */ \"./target/generated-sources/swagger/src/models/common/v1/config/MessageSeverity.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n/**\n * The AppMessage model module.\n * @module Ntnx/AppMessage\n * @version 4.0.2\n * @class AppMessage\n */\nvar _AppMessage_brand = /*#__PURE__*/new WeakSet();\nclass AppMessage {\n /**\n * Constructs a new <code>AppMessage</code>.\n * Message with associated severity describing status of the current operation.\n * @alias module:Ntnx/AppMessage\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _AppMessage_brand);\n this.$objectType = \"objects.v4.error.AppMessage\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>AppMessage</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/AppMessage} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/AppMessage} The populated <code>AppMessage</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new AppMessage();\n if (data.hasOwnProperty('message') && data.message !== null && data.message !== undefined) {\n obj.setMessage(data['message']);\n }\n if (data.hasOwnProperty('severity') && data.severity !== null && data.severity !== undefined) {\n obj.setSeverity(_common_v1_config_MessageSeverity__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['severity']));\n }\n if (data.hasOwnProperty('code') && data.code !== null && data.code !== undefined) {\n obj.setCode(data['code']);\n }\n if (data.hasOwnProperty('locale') && data.locale !== null && data.locale !== undefined) {\n obj.setLocale(data['locale']);\n }\n if (data.hasOwnProperty('errorGroup') && data.errorGroup !== null && data.errorGroup !== undefined) {\n obj.setErrorGroup(data['errorGroup']);\n }\n if (data.hasOwnProperty('argumentsMap') && data.argumentsMap !== null && data.argumentsMap !== undefined) {\n obj.setArgumentsMap(data['argumentsMap']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns The message string.\n * @return {string}\n */\n getMessage() {\n return this.message;\n }\n\n /**\n * Sets The message string.\n * @param {string} message The message string.\n */\n setMessage(message) {\n this.message = message;\n }\n\n /**\n * @return {MessageSeverity}\n */\n getSeverity() {\n return this.severity;\n }\n\n /**\n * @param {MessageSeverity} severity\n */\n setSeverity(severity) {\n this.severity = severity;\n }\n\n /**\n * Returns The code associated with this message. This string is typically prefixed with the namespace to which the endpoint belongs. For example: VMM-40000\n * @return {string}\n */\n getCode() {\n return this.code;\n }\n\n /**\n * Sets The code associated with this message. This string is typically prefixed with the namespace to which the endpoint belongs. For example: VMM-40000\n * @param {string} code The code associated with this message. This string is typically prefixed with the namespace to which the endpoint belongs. For example: VMM-40000\n */\n setCode(code) {\n this.code = code;\n }\n\n /**\n * Returns Locale for this message. The default locale would be 'en-US'.\n * @return {string}\n */\n getLocale() {\n return this.locale;\n }\n\n /**\n * Sets Locale for this message. The default locale would be 'en-US'.\n * @param {string} locale Locale for this message. The default locale would be 'en-US'.\n */\n setLocale(locale) {\n this.locale = locale;\n }\n\n /**\n * Returns The error group associated with this message of severity ERROR.\n * @return {string}\n */\n getErrorGroup() {\n return this.errorGroup;\n }\n\n /**\n * Sets The error group associated with this message of severity ERROR.\n * @param {string} errorGroup The error group associated with this message of severity ERROR.\n */\n setErrorGroup(errorGroup) {\n this.errorGroup = errorGroup;\n }\n\n /**\n * Returns The map of argument name to value.\n * @return {Object<string, string>}\n */\n getArgumentsMap() {\n return this.argumentsMap;\n }\n\n /**\n * Sets The map of argument name to value.\n * @param {Object<string, string>} argumentsMap The map of argument name to value.\n */\n setArgumentsMap(argumentsMap) {\n this.argumentsMap = argumentsMap;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {\n 'message': this.getMessage()\n } : {}),\n ...(typeof this.getSeverity() !== 'undefined' && this.getSeverity() !== null ? {\n 'severity': this.getSeverity()\n } : {}),\n ...(typeof this.getCode() !== 'undefined' && this.getCode() !== null ? {\n 'code': this.getCode()\n } : {}),\n ...(typeof this.getLocale() !== 'undefined' && this.getLocale() !== null ? {\n 'locale': this.getLocale()\n } : {}),\n ...(typeof this.getErrorGroup() !== 'undefined' && this.getErrorGroup() !== null ? {\n 'errorGroup': this.getErrorGroup()\n } : {}),\n ...(typeof this.getArgumentsMap() !== 'undefined' && this.getArgumentsMap() !== null ? {\n 'argumentsMap': _assertClassBrand(_AppMessage_brand, this, _toJsonMapType).call(this, this.getArgumentsMap(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {\n 'message': this.getMessage()\n } : {}),\n ...(typeof this.getSeverity() !== 'undefined' && this.getSeverity() !== null ? {\n 'severity': this.getSeverity()\n } : {}),\n ...(typeof this.getCode() !== 'undefined' && this.getCode() !== null ? {\n 'code': this.getCode()\n } : {}),\n ...(typeof this.getLocale() !== 'undefined' && this.getLocale() !== null ? {\n 'locale': this.getLocale()\n } : {}),\n ...(typeof this.getErrorGroup() !== 'undefined' && this.getErrorGroup() !== null ? {\n 'errorGroup': this.getErrorGroup()\n } : {}),\n ...(typeof this.getArgumentsMap() !== 'undefined' && this.getArgumentsMap() !== null ? {\n 'argumentsMap': _assertClassBrand(_AppMessage_brand, this, _toJsonMapType).call(this, this.getArgumentsMap())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"message\") {\n if (typeof this.message === 'undefined' || this.message === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"message\", \"undefined or null\");\n }\n }\n if (property === \"severity\") {\n if (typeof this.severity === 'undefined' || this.severity === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"severity\", \"undefined or null\");\n }\n }\n if (property === \"code\") {\n if (typeof this.code === 'undefined' || this.code === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"code\", \"undefined or null\");\n }\n }\n if (property === \"locale\") {\n if (typeof this.locale === 'undefined' || this.locale === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"locale\", \"undefined or null\");\n }\n }\n if (property === \"errorGroup\") {\n if (typeof this.errorGroup === 'undefined' || this.errorGroup === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"errorGroup\", \"undefined or null\");\n }\n }\n if (property === \"argumentsMap\") {\n if (typeof this.argumentsMap === 'undefined' || this.argumentsMap === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"argumentsMap\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * The message string.\n * @memberof AppMessage\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nAppMessage.prototype.message = undefined;\n\n/**\n * @memberof AppMessage\n */\nAppMessage.prototype.severity = undefined;\n\n/**\n * The code associated with this message. This string is typically prefixed with the namespace to which the endpoint belongs. For example: VMM-40000\n * @memberof AppMessage\n */\nAppMessage.prototype.code = undefined;\n\n/**\n * Locale for this message. The default locale would be 'en-US'.\n * @memberof AppMessage\n * @default 'en_US'\n */\nAppMessage.prototype.locale = 'en_US';\n\n/**\n * The error group associated with this message of severity ERROR.\n * @memberof AppMessage\n */\nAppMessage.prototype.errorGroup = undefined;\n\n/**\n * The map of argument name to value.\n * @memberof AppMessage\n */\nAppMessage.prototype.argumentsMap = undefined;\nAppMessage.prototype.$reserved = undefined;\nAppMessage.prototype.$objectType = undefined;\nAppMessage.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/error/AppMessage.js?\n}");
|
|
606
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ AppMessage)\n/* harmony export */ });\n/* harmony import */ var _common_v1_config_MessageSeverity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/config/MessageSeverity */ \"./target/generated-sources/swagger/src/models/common/v1/config/MessageSeverity.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n/**\n * The AppMessage model module.\n * @module Ntnx/AppMessage\n * @version 4.0.3\n * @class AppMessage\n */\nvar _AppMessage_brand = /*#__PURE__*/new WeakSet();\nclass AppMessage {\n /**\n * Constructs a new <code>AppMessage</code>.\n * Message with associated severity describing status of the current operation.\n * @alias module:Ntnx/AppMessage\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _AppMessage_brand);\n this.$objectType = \"objects.v4.error.AppMessage\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>AppMessage</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/AppMessage} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/AppMessage} The populated <code>AppMessage</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new AppMessage();\n if (data.hasOwnProperty('message') && data.message !== null && data.message !== undefined) {\n obj.setMessage(data['message']);\n }\n if (data.hasOwnProperty('severity') && data.severity !== null && data.severity !== undefined) {\n obj.setSeverity(_common_v1_config_MessageSeverity__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['severity']));\n }\n if (data.hasOwnProperty('code') && data.code !== null && data.code !== undefined) {\n obj.setCode(data['code']);\n }\n if (data.hasOwnProperty('locale') && data.locale !== null && data.locale !== undefined) {\n obj.setLocale(data['locale']);\n }\n if (data.hasOwnProperty('errorGroup') && data.errorGroup !== null && data.errorGroup !== undefined) {\n obj.setErrorGroup(data['errorGroup']);\n }\n if (data.hasOwnProperty('argumentsMap') && data.argumentsMap !== null && data.argumentsMap !== undefined) {\n obj.setArgumentsMap(data['argumentsMap']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns The message string.\n * @return {string}\n */\n getMessage() {\n return this.message;\n }\n\n /**\n * Sets The message string.\n * @param {string} message The message string.\n */\n setMessage(message) {\n this.message = message;\n }\n\n /**\n * @return {MessageSeverity}\n */\n getSeverity() {\n return this.severity;\n }\n\n /**\n * @param {MessageSeverity} severity\n */\n setSeverity(severity) {\n this.severity = severity;\n }\n\n /**\n * Returns The code associated with this message. This string is typically prefixed with the namespace to which the endpoint belongs. For example: VMM-40000\n * @return {string}\n */\n getCode() {\n return this.code;\n }\n\n /**\n * Sets The code associated with this message. This string is typically prefixed with the namespace to which the endpoint belongs. For example: VMM-40000\n * @param {string} code The code associated with this message. This string is typically prefixed with the namespace to which the endpoint belongs. For example: VMM-40000\n */\n setCode(code) {\n this.code = code;\n }\n\n /**\n * Returns Locale for this message. The default locale would be 'en-US'.\n * @return {string}\n */\n getLocale() {\n return this.locale;\n }\n\n /**\n * Sets Locale for this message. The default locale would be 'en-US'.\n * @param {string} locale Locale for this message. The default locale would be 'en-US'.\n */\n setLocale(locale) {\n this.locale = locale;\n }\n\n /**\n * Returns The error group associated with this message of severity ERROR.\n * @return {string}\n */\n getErrorGroup() {\n return this.errorGroup;\n }\n\n /**\n * Sets The error group associated with this message of severity ERROR.\n * @param {string} errorGroup The error group associated with this message of severity ERROR.\n */\n setErrorGroup(errorGroup) {\n this.errorGroup = errorGroup;\n }\n\n /**\n * Returns The map of argument name to value.\n * @return {Object<string, string>}\n */\n getArgumentsMap() {\n return this.argumentsMap;\n }\n\n /**\n * Sets The map of argument name to value.\n * @param {Object<string, string>} argumentsMap The map of argument name to value.\n */\n setArgumentsMap(argumentsMap) {\n this.argumentsMap = argumentsMap;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {\n 'message': this.getMessage()\n } : {}),\n ...(typeof this.getSeverity() !== 'undefined' && this.getSeverity() !== null ? {\n 'severity': this.getSeverity()\n } : {}),\n ...(typeof this.getCode() !== 'undefined' && this.getCode() !== null ? {\n 'code': this.getCode()\n } : {}),\n ...(typeof this.getLocale() !== 'undefined' && this.getLocale() !== null ? {\n 'locale': this.getLocale()\n } : {}),\n ...(typeof this.getErrorGroup() !== 'undefined' && this.getErrorGroup() !== null ? {\n 'errorGroup': this.getErrorGroup()\n } : {}),\n ...(typeof this.getArgumentsMap() !== 'undefined' && this.getArgumentsMap() !== null ? {\n 'argumentsMap': _assertClassBrand(_AppMessage_brand, this, _toJsonMapType).call(this, this.getArgumentsMap(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {\n 'message': this.getMessage()\n } : {}),\n ...(typeof this.getSeverity() !== 'undefined' && this.getSeverity() !== null ? {\n 'severity': this.getSeverity()\n } : {}),\n ...(typeof this.getCode() !== 'undefined' && this.getCode() !== null ? {\n 'code': this.getCode()\n } : {}),\n ...(typeof this.getLocale() !== 'undefined' && this.getLocale() !== null ? {\n 'locale': this.getLocale()\n } : {}),\n ...(typeof this.getErrorGroup() !== 'undefined' && this.getErrorGroup() !== null ? {\n 'errorGroup': this.getErrorGroup()\n } : {}),\n ...(typeof this.getArgumentsMap() !== 'undefined' && this.getArgumentsMap() !== null ? {\n 'argumentsMap': _assertClassBrand(_AppMessage_brand, this, _toJsonMapType).call(this, this.getArgumentsMap())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"message\") {\n if (typeof this.message === 'undefined' || this.message === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"message\", \"undefined or null\");\n }\n }\n if (property === \"severity\") {\n if (typeof this.severity === 'undefined' || this.severity === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"severity\", \"undefined or null\");\n }\n }\n if (property === \"code\") {\n if (typeof this.code === 'undefined' || this.code === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"code\", \"undefined or null\");\n }\n }\n if (property === \"locale\") {\n if (typeof this.locale === 'undefined' || this.locale === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"locale\", \"undefined or null\");\n }\n }\n if (property === \"errorGroup\") {\n if (typeof this.errorGroup === 'undefined' || this.errorGroup === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"errorGroup\", \"undefined or null\");\n }\n }\n if (property === \"argumentsMap\") {\n if (typeof this.argumentsMap === 'undefined' || this.argumentsMap === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"argumentsMap\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * The message string.\n * @memberof AppMessage\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nAppMessage.prototype.message = undefined;\n\n/**\n * @memberof AppMessage\n */\nAppMessage.prototype.severity = undefined;\n\n/**\n * The code associated with this message. This string is typically prefixed with the namespace to which the endpoint belongs. For example: VMM-40000\n * @memberof AppMessage\n */\nAppMessage.prototype.code = undefined;\n\n/**\n * Locale for this message. The default locale would be 'en-US'.\n * @memberof AppMessage\n * @default 'en_US'\n */\nAppMessage.prototype.locale = 'en_US';\n\n/**\n * The error group associated with this message of severity ERROR.\n * @memberof AppMessage\n */\nAppMessage.prototype.errorGroup = undefined;\n\n/**\n * The map of argument name to value.\n * @memberof AppMessage\n */\nAppMessage.prototype.argumentsMap = undefined;\nAppMessage.prototype.$reserved = undefined;\nAppMessage.prototype.$objectType = undefined;\nAppMessage.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/error/AppMessage.js?\n}");
|
|
607
607
|
|
|
608
608
|
/***/ },
|
|
609
609
|
|
|
@@ -614,7 +614,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
614
614
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
615
615
|
|
|
616
616
|
"use strict";
|
|
617
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ErrorResponse)\n/* harmony export */ });\n/* harmony import */ var _AppMessage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppMessage */ \"./target/generated-sources/swagger/src/models/objects/v4/error/AppMessage.js\");\n/* harmony import */ var _SchemaValidationError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SchemaValidationError */ \"./target/generated-sources/swagger/src/models/objects/v4/error/SchemaValidationError.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n/**\n * The ErrorResponse model module.\n * @module Ntnx/ErrorResponse\n * @version 4.0.2\n * @class ErrorResponse\n */\nvar _ErrorResponse_brand = /*#__PURE__*/new WeakSet();\nclass ErrorResponse {\n /**\n * Constructs a new <code>ErrorResponse</code>.\n * An error response indicates that the operation has failed either due to a client error(4XX) or server error(5XX). Please look at the HTTP status code and namespace specific error code and error message for further details.\n * @alias module:Ntnx/ErrorResponse\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ErrorResponse_brand);\n this.$objectType = \"objects.v4.error.ErrorResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ErrorResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ErrorResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ErrorResponse} The populated <code>ErrorResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ErrorResponse();\n if (data.hasOwnProperty('error') && data.error !== null && data.error !== undefined) {\n if (Array.isArray(data['error'])) {\n if (data['error'].length === 0) {\n obj.setError([]);\n } else {\n itemArr = [];\n items = data['error'];\n if (items[0].hasOwnProperty('$objectType')) {\n discriminator = items[0]['$objectType'];\n } else {\n discriminator = typeof items[0];\n }\n for (i = 0; i < items.length; i++) {\n switch (discriminator) {\n case 'objects.v4.error.AppMessage':\n item = _AppMessage__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n break;\n default:\n throw \"Unknown list of type \" + discriminator + \" in data\";\n }\n }\n obj.setError(itemArr);\n }\n } else {\n if (data['error'].hasOwnProperty('$objectType')) {\n discriminator = data['error']['$objectType'];\n } else {\n discriminator = typeof data['error'];\n }\n switch (discriminator) {\n case 'objects.v4.error.SchemaValidationError':\n obj.setError(_SchemaValidationError__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['error'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {AppMessage[] | SchemaValidationError}\n */\n getError() {\n return this.error;\n }\n\n /**\n * @param {AppMessage[] | SchemaValidationError} error\n */\n setError(error) {\n this.error = error;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getError() !== 'undefined' && this.getError() !== null ? {\n 'error': typeof this.getError().toJson !== \"undefined\" ? this.getError().toJson(false) : Array.isArray(this.getError()) ? this.getError().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_ErrorResponse_brand, this, _toJsonMapType).call(this, this.getError(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getError() !== 'undefined' && this.getError() !== null ? {\n 'error': typeof this.getError().toJson !== \"undefined\" ? this.getError().toJson() : Array.isArray(this.getError()) ? this.getError().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_ErrorResponse_brand, this, _toJsonMapType).call(this, this.getError())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"error\") {\n if (typeof this.error === 'undefined' || this.error === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"error\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof ErrorResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nErrorResponse.prototype.error = undefined;\nErrorResponse.prototype.$reserved = undefined;\nErrorResponse.prototype.$objectType = undefined;\nErrorResponse.prototype.$unknownFields = undefined;\n\n// Implement OneOfobjects.v4.config.CreateCertificateApiResponsedata interface:\n// Implement OneOfobjects.v4.config.CreateObjectstoreApiResponsedata interface:\n// Implement OneOfobjects.v4.config.ListCertificatesApiResponsedata interface:\n// Implement OneOfobjects.v4.config.DeleteObjectstoreApiResponsedata interface:\n// Implement OneOfobjects.v4.config.ListObjectstoresApiResponsedata interface:\n// Implement OneOfobjects.v4.stats.GetObjectstoreStatsApiResponsedata interface:\n// Implement OneOfobjects.v4.config.GetObjectstoreApiResponsedata interface:\n// Implement OneOfobjects.v4.config.GetCertificateApiResponsedata interface:\n// Implement OneOfobjects.v4.config.GetCaApiResponsedata interface:\n// Implement OneOfobjects.v4.config.UpdateObjectstoreApiResponsedata interface:\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js?\n}");
|
|
617
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ErrorResponse)\n/* harmony export */ });\n/* harmony import */ var _AppMessage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppMessage */ \"./target/generated-sources/swagger/src/models/objects/v4/error/AppMessage.js\");\n/* harmony import */ var _SchemaValidationError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SchemaValidationError */ \"./target/generated-sources/swagger/src/models/objects/v4/error/SchemaValidationError.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n/**\n * The ErrorResponse model module.\n * @module Ntnx/ErrorResponse\n * @version 4.0.3\n * @class ErrorResponse\n */\nvar _ErrorResponse_brand = /*#__PURE__*/new WeakSet();\nclass ErrorResponse {\n /**\n * Constructs a new <code>ErrorResponse</code>.\n * An error response indicates that the operation has failed either due to a client error(4XX) or server error(5XX). Please look at the HTTP status code and namespace specific error code and error message for further details.\n * @alias module:Ntnx/ErrorResponse\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ErrorResponse_brand);\n this.$objectType = \"objects.v4.error.ErrorResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ErrorResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ErrorResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ErrorResponse} The populated <code>ErrorResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ErrorResponse();\n if (data.hasOwnProperty('error') && data.error !== null && data.error !== undefined) {\n if (Array.isArray(data['error'])) {\n if (data['error'].length === 0) {\n obj.setError([]);\n } else {\n itemArr = [];\n items = data['error'];\n if (items[0].hasOwnProperty('$objectType')) {\n discriminator = items[0]['$objectType'];\n } else {\n discriminator = typeof items[0];\n }\n for (i = 0; i < items.length; i++) {\n switch (discriminator) {\n case 'objects.v4.error.AppMessage':\n item = _AppMessage__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n break;\n default:\n throw \"Unknown list of type \" + discriminator + \" in data\";\n }\n }\n obj.setError(itemArr);\n }\n } else {\n if (data['error'].hasOwnProperty('$objectType')) {\n discriminator = data['error']['$objectType'];\n } else {\n discriminator = typeof data['error'];\n }\n switch (discriminator) {\n case 'objects.v4.error.SchemaValidationError':\n obj.setError(_SchemaValidationError__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['error'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {AppMessage[] | SchemaValidationError}\n */\n getError() {\n return this.error;\n }\n\n /**\n * @param {AppMessage[] | SchemaValidationError} error\n */\n setError(error) {\n this.error = error;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getError() !== 'undefined' && this.getError() !== null ? {\n 'error': typeof this.getError().toJson !== \"undefined\" ? this.getError().toJson(false) : Array.isArray(this.getError()) ? this.getError().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_ErrorResponse_brand, this, _toJsonMapType).call(this, this.getError(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getError() !== 'undefined' && this.getError() !== null ? {\n 'error': typeof this.getError().toJson !== \"undefined\" ? this.getError().toJson() : Array.isArray(this.getError()) ? this.getError().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_ErrorResponse_brand, this, _toJsonMapType).call(this, this.getError())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"error\") {\n if (typeof this.error === 'undefined' || this.error === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"error\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_4__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof ErrorResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nErrorResponse.prototype.error = undefined;\nErrorResponse.prototype.$reserved = undefined;\nErrorResponse.prototype.$objectType = undefined;\nErrorResponse.prototype.$unknownFields = undefined;\n\n// Implement OneOfobjects.v4.config.CreateCertificateApiResponsedata interface:\n// Implement OneOfobjects.v4.config.CreateObjectstoreApiResponsedata interface:\n// Implement OneOfobjects.v4.config.ListCertificatesApiResponsedata interface:\n// Implement OneOfobjects.v4.config.DeleteObjectstoreApiResponsedata interface:\n// Implement OneOfobjects.v4.config.ListObjectstoresApiResponsedata interface:\n// Implement OneOfobjects.v4.stats.GetObjectstoreStatsApiResponsedata interface:\n// Implement OneOfobjects.v4.config.GetObjectstoreApiResponsedata interface:\n// Implement OneOfobjects.v4.config.GetCertificateApiResponsedata interface:\n// Implement OneOfobjects.v4.config.GetCaApiResponsedata interface:\n// Implement OneOfobjects.v4.config.UpdateObjectstoreApiResponsedata interface:\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js?\n}");
|
|
618
618
|
|
|
619
619
|
/***/ },
|
|
620
620
|
|
|
@@ -625,7 +625,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
625
625
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
626
626
|
|
|
627
627
|
"use strict";
|
|
628
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ SchemaValidationError)\n/* harmony export */ });\n/* harmony import */ var _SchemaValidationErrorMessage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SchemaValidationErrorMessage */ \"./target/generated-sources/swagger/src/models/objects/v4/error/SchemaValidationErrorMessage.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n/**\n * The SchemaValidationError model module.\n * @module Ntnx/SchemaValidationError\n * @version 4.0.2\n * @class SchemaValidationError\n */\nvar _SchemaValidationError_brand = /*#__PURE__*/new WeakSet();\nclass SchemaValidationError {\n /**\n * Constructs a new <code>SchemaValidationError</code>.\n * This schema is generated from SchemaValidationError.java\n * @alias module:Ntnx/SchemaValidationError\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _SchemaValidationError_brand);\n this.$objectType = \"objects.v4.error.SchemaValidationError\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>SchemaValidationError</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/SchemaValidationError} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/SchemaValidationError} The populated <code>SchemaValidationError</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new SchemaValidationError();\n if (data.hasOwnProperty('timestamp') && data.timestamp !== null && data.timestamp !== undefined) {\n obj.setTimestamp(data['timestamp']);\n }\n if (data.hasOwnProperty('statusCode') && data.statusCode !== null && data.statusCode !== undefined) {\n obj.setStatusCode(data['statusCode']);\n }\n if (data.hasOwnProperty('error') && data.error !== null && data.error !== undefined) {\n obj.setError(data['error']);\n }\n if (data.hasOwnProperty('path') && data.path !== null && data.path !== undefined) {\n obj.setPath(data['path']);\n }\n if (data.hasOwnProperty('validationErrorMessages') && data.validationErrorMessages !== null && data.validationErrorMessages !== undefined) {\n itemArr = [];\n items = data.validationErrorMessages;\n for (i = 0; i < items.length; i++) {\n item = _SchemaValidationErrorMessage__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setValidationErrorMessages(itemArr);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns Timestamp of the response.\n * @return {Date}\n */\n getTimestamp() {\n return this.timestamp;\n }\n\n /**\n * Sets Timestamp of the response.\n * @param {Date} timestamp Timestamp of the response.\n */\n setTimestamp(timestamp) {\n this.timestamp = timestamp;\n }\n\n /**\n * Returns The HTTP status code of the response.\n * @return {Number}\n */\n getStatusCode() {\n return this.statusCode;\n }\n\n /**\n * Sets The HTTP status code of the response.\n * @param {Number} statusCode The HTTP status code of the response.\n */\n setStatusCode(statusCode) {\n this.statusCode = statusCode;\n }\n\n /**\n * Returns The generic error message for the response.\n * @return {string}\n */\n getError() {\n return this.error;\n }\n\n /**\n * Sets The generic error message for the response.\n * @param {string} error The generic error message for the response.\n */\n setError(error) {\n this.error = error;\n }\n\n /**\n * Returns API path on which the request was made.\n * @return {string}\n */\n getPath() {\n return this.path;\n }\n\n /**\n * Sets API path on which the request was made.\n * @param {string} path API path on which the request was made.\n */\n setPath(path) {\n this.path = path;\n }\n\n /**\n * Returns List of validation error messages\n * @return {SchemaValidationErrorMessage[]}\n */\n getValidationErrorMessages() {\n return this.validationErrorMessages;\n }\n\n /**\n * Sets List of validation error messages\n * @param {SchemaValidationErrorMessage[]} validationErrorMessages List of validation error messages\n */\n setValidationErrorMessages(validationErrorMessages) {\n this.validationErrorMessages = validationErrorMessages;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getTimestamp() !== 'undefined' && this.getTimestamp() !== null ? {\n 'timestamp': _assertClassBrand(_SchemaValidationError_brand, this, _handleDateType).call(this, this.getTimestamp(), false)\n } : {}),\n ...(typeof this.getStatusCode() !== 'undefined' && this.getStatusCode() !== null ? {\n 'statusCode': this.getStatusCode()\n } : {}),\n ...(typeof this.getError() !== 'undefined' && this.getError() !== null ? {\n 'error': this.getError()\n } : {}),\n ...(typeof this.getPath() !== 'undefined' && this.getPath() !== null ? {\n 'path': this.getPath()\n } : {}),\n ...(typeof this.getValidationErrorMessages() !== 'undefined' && this.getValidationErrorMessages() !== null ? {\n 'validationErrorMessages': this.getValidationErrorMessages().map(item => item.toJson(false))\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getTimestamp() !== 'undefined' && this.getTimestamp() !== null ? {\n 'timestamp': _assertClassBrand(_SchemaValidationError_brand, this, _handleDateType).call(this, this.getTimestamp(), false)\n } : {}),\n ...(typeof this.getStatusCode() !== 'undefined' && this.getStatusCode() !== null ? {\n 'statusCode': this.getStatusCode()\n } : {}),\n ...(typeof this.getError() !== 'undefined' && this.getError() !== null ? {\n 'error': this.getError()\n } : {}),\n ...(typeof this.getPath() !== 'undefined' && this.getPath() !== null ? {\n 'path': this.getPath()\n } : {}),\n ...(typeof this.getValidationErrorMessages() !== 'undefined' && this.getValidationErrorMessages() !== null ? {\n 'validationErrorMessages': this.getValidationErrorMessages().map(item => item.toJson(false))\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"timestamp\") {\n if (typeof this.timestamp === 'undefined' || this.timestamp === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"timestamp\", \"undefined or null\");\n }\n }\n if (property === \"statusCode\") {\n if (typeof this.statusCode === 'undefined' || this.statusCode === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"statusCode\", \"undefined or null\");\n }\n }\n if (property === \"error\") {\n if (typeof this.error === 'undefined' || this.error === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"error\", \"undefined or null\");\n }\n }\n if (property === \"path\") {\n if (typeof this.path === 'undefined' || this.path === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"path\", \"undefined or null\");\n }\n }\n if (property === \"validationErrorMessages\") {\n if (typeof this.validationErrorMessages === 'undefined' || this.validationErrorMessages === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"validationErrorMessages\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * Timestamp of the response.\n * @memberof SchemaValidationError\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nSchemaValidationError.prototype.timestamp = undefined;\n\n/**\n * The HTTP status code of the response.\n * @memberof SchemaValidationError\n */\nSchemaValidationError.prototype.statusCode = undefined;\n\n/**\n * The generic error message for the response.\n * @memberof SchemaValidationError\n */\nSchemaValidationError.prototype.error = undefined;\n\n/**\n * API path on which the request was made.\n * @memberof SchemaValidationError\n */\nSchemaValidationError.prototype.path = undefined;\n\n/**\n * List of validation error messages\n * @memberof SchemaValidationError\n */\nSchemaValidationError.prototype.validationErrorMessages = undefined;\nSchemaValidationError.prototype.$reserved = undefined;\nSchemaValidationError.prototype.$objectType = undefined;\nSchemaValidationError.prototype.$unknownFields = undefined;\n\n// Implement OneOfobjects.v4.error.ErrorResponseerror interface:\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/error/SchemaValidationError.js?\n}");
|
|
628
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ SchemaValidationError)\n/* harmony export */ });\n/* harmony import */ var _SchemaValidationErrorMessage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SchemaValidationErrorMessage */ \"./target/generated-sources/swagger/src/models/objects/v4/error/SchemaValidationErrorMessage.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n/**\n * The SchemaValidationError model module.\n * @module Ntnx/SchemaValidationError\n * @version 4.0.3\n * @class SchemaValidationError\n */\nvar _SchemaValidationError_brand = /*#__PURE__*/new WeakSet();\nclass SchemaValidationError {\n /**\n * Constructs a new <code>SchemaValidationError</code>.\n * This schema is generated from SchemaValidationError.java\n * @alias module:Ntnx/SchemaValidationError\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _SchemaValidationError_brand);\n this.$objectType = \"objects.v4.error.SchemaValidationError\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>SchemaValidationError</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/SchemaValidationError} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/SchemaValidationError} The populated <code>SchemaValidationError</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new SchemaValidationError();\n if (data.hasOwnProperty('timestamp') && data.timestamp !== null && data.timestamp !== undefined) {\n obj.setTimestamp(data['timestamp']);\n }\n if (data.hasOwnProperty('statusCode') && data.statusCode !== null && data.statusCode !== undefined) {\n obj.setStatusCode(data['statusCode']);\n }\n if (data.hasOwnProperty('error') && data.error !== null && data.error !== undefined) {\n obj.setError(data['error']);\n }\n if (data.hasOwnProperty('path') && data.path !== null && data.path !== undefined) {\n obj.setPath(data['path']);\n }\n if (data.hasOwnProperty('validationErrorMessages') && data.validationErrorMessages !== null && data.validationErrorMessages !== undefined) {\n itemArr = [];\n items = data.validationErrorMessages;\n for (i = 0; i < items.length; i++) {\n item = _SchemaValidationErrorMessage__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setValidationErrorMessages(itemArr);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns Timestamp of the response.\n * @return {Date}\n */\n getTimestamp() {\n return this.timestamp;\n }\n\n /**\n * Sets Timestamp of the response.\n * @param {Date} timestamp Timestamp of the response.\n */\n setTimestamp(timestamp) {\n this.timestamp = timestamp;\n }\n\n /**\n * Returns The HTTP status code of the response.\n * @return {Number}\n */\n getStatusCode() {\n return this.statusCode;\n }\n\n /**\n * Sets The HTTP status code of the response.\n * @param {Number} statusCode The HTTP status code of the response.\n */\n setStatusCode(statusCode) {\n this.statusCode = statusCode;\n }\n\n /**\n * Returns The generic error message for the response.\n * @return {string}\n */\n getError() {\n return this.error;\n }\n\n /**\n * Sets The generic error message for the response.\n * @param {string} error The generic error message for the response.\n */\n setError(error) {\n this.error = error;\n }\n\n /**\n * Returns API path on which the request was made.\n * @return {string}\n */\n getPath() {\n return this.path;\n }\n\n /**\n * Sets API path on which the request was made.\n * @param {string} path API path on which the request was made.\n */\n setPath(path) {\n this.path = path;\n }\n\n /**\n * Returns List of validation error messages\n * @return {SchemaValidationErrorMessage[]}\n */\n getValidationErrorMessages() {\n return this.validationErrorMessages;\n }\n\n /**\n * Sets List of validation error messages\n * @param {SchemaValidationErrorMessage[]} validationErrorMessages List of validation error messages\n */\n setValidationErrorMessages(validationErrorMessages) {\n this.validationErrorMessages = validationErrorMessages;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getTimestamp() !== 'undefined' && this.getTimestamp() !== null ? {\n 'timestamp': _assertClassBrand(_SchemaValidationError_brand, this, _handleDateType).call(this, this.getTimestamp(), false)\n } : {}),\n ...(typeof this.getStatusCode() !== 'undefined' && this.getStatusCode() !== null ? {\n 'statusCode': this.getStatusCode()\n } : {}),\n ...(typeof this.getError() !== 'undefined' && this.getError() !== null ? {\n 'error': this.getError()\n } : {}),\n ...(typeof this.getPath() !== 'undefined' && this.getPath() !== null ? {\n 'path': this.getPath()\n } : {}),\n ...(typeof this.getValidationErrorMessages() !== 'undefined' && this.getValidationErrorMessages() !== null ? {\n 'validationErrorMessages': this.getValidationErrorMessages().map(item => item.toJson(false))\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getTimestamp() !== 'undefined' && this.getTimestamp() !== null ? {\n 'timestamp': _assertClassBrand(_SchemaValidationError_brand, this, _handleDateType).call(this, this.getTimestamp(), false)\n } : {}),\n ...(typeof this.getStatusCode() !== 'undefined' && this.getStatusCode() !== null ? {\n 'statusCode': this.getStatusCode()\n } : {}),\n ...(typeof this.getError() !== 'undefined' && this.getError() !== null ? {\n 'error': this.getError()\n } : {}),\n ...(typeof this.getPath() !== 'undefined' && this.getPath() !== null ? {\n 'path': this.getPath()\n } : {}),\n ...(typeof this.getValidationErrorMessages() !== 'undefined' && this.getValidationErrorMessages() !== null ? {\n 'validationErrorMessages': this.getValidationErrorMessages().map(item => item.toJson(false))\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"timestamp\") {\n if (typeof this.timestamp === 'undefined' || this.timestamp === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"timestamp\", \"undefined or null\");\n }\n }\n if (property === \"statusCode\") {\n if (typeof this.statusCode === 'undefined' || this.statusCode === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"statusCode\", \"undefined or null\");\n }\n }\n if (property === \"error\") {\n if (typeof this.error === 'undefined' || this.error === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"error\", \"undefined or null\");\n }\n }\n if (property === \"path\") {\n if (typeof this.path === 'undefined' || this.path === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"path\", \"undefined or null\");\n }\n }\n if (property === \"validationErrorMessages\") {\n if (typeof this.validationErrorMessages === 'undefined' || this.validationErrorMessages === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"validationErrorMessages\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_3__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * Timestamp of the response.\n * @memberof SchemaValidationError\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nSchemaValidationError.prototype.timestamp = undefined;\n\n/**\n * The HTTP status code of the response.\n * @memberof SchemaValidationError\n */\nSchemaValidationError.prototype.statusCode = undefined;\n\n/**\n * The generic error message for the response.\n * @memberof SchemaValidationError\n */\nSchemaValidationError.prototype.error = undefined;\n\n/**\n * API path on which the request was made.\n * @memberof SchemaValidationError\n */\nSchemaValidationError.prototype.path = undefined;\n\n/**\n * List of validation error messages\n * @memberof SchemaValidationError\n */\nSchemaValidationError.prototype.validationErrorMessages = undefined;\nSchemaValidationError.prototype.$reserved = undefined;\nSchemaValidationError.prototype.$objectType = undefined;\nSchemaValidationError.prototype.$unknownFields = undefined;\n\n// Implement OneOfobjects.v4.error.ErrorResponseerror interface:\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/error/SchemaValidationError.js?\n}");
|
|
629
629
|
|
|
630
630
|
/***/ },
|
|
631
631
|
|
|
@@ -636,7 +636,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
636
636
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
637
637
|
|
|
638
638
|
"use strict";
|
|
639
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ SchemaValidationErrorMessage)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The SchemaValidationErrorMessage model module.\n * @module Ntnx/SchemaValidationErrorMessage\n * @version 4.0.2\n * @class SchemaValidationErrorMessage\n */\nvar _SchemaValidationErrorMessage_brand = /*#__PURE__*/new WeakSet();\nclass SchemaValidationErrorMessage {\n /**\n * Constructs a new <code>SchemaValidationErrorMessage</code>.\n * This schema is generated from SchemaValidationErrorMessage.java\n * @alias module:Ntnx/SchemaValidationErrorMessage\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _SchemaValidationErrorMessage_brand);\n this.$objectType = \"objects.v4.error.SchemaValidationErrorMessage\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>SchemaValidationErrorMessage</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/SchemaValidationErrorMessage} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/SchemaValidationErrorMessage} The populated <code>SchemaValidationErrorMessage</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new SchemaValidationErrorMessage();\n if (data.hasOwnProperty('location') && data.location !== null && data.location !== undefined) {\n obj.setLocation(data['location']);\n }\n if (data.hasOwnProperty('message') && data.message !== null && data.message !== undefined) {\n obj.setMessage(data['message']);\n }\n if (data.hasOwnProperty('attributePath') && data.attributePath !== null && data.attributePath !== undefined) {\n obj.setAttributePath(data['attributePath']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns The part of the request that failed validation. Validation can fail for path, query parameters, and request body.\n * @return {string}\n */\n getLocation() {\n return this.location;\n }\n\n /**\n * Sets The part of the request that failed validation. Validation can fail for path, query parameters, and request body.\n * @param {string} location The part of the request that failed validation. Validation can fail for path, query parameters, and request body.\n */\n setLocation(location) {\n this.location = location;\n }\n\n /**\n * Returns The detailed message for the validation error.\n * @return {string}\n */\n getMessage() {\n return this.message;\n }\n\n /**\n * Sets The detailed message for the validation error.\n * @param {string} message The detailed message for the validation error.\n */\n setMessage(message) {\n this.message = message;\n }\n\n /**\n * Returns The path of the attribute that failed validation in the schema.\n * @return {string}\n */\n getAttributePath() {\n return this.attributePath;\n }\n\n /**\n * Sets The path of the attribute that failed validation in the schema.\n * @param {string} attributePath The path of the attribute that failed validation in the schema.\n */\n setAttributePath(attributePath) {\n this.attributePath = attributePath;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getLocation() !== 'undefined' && this.getLocation() !== null ? {\n 'location': this.getLocation()\n } : {}),\n ...(typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {\n 'message': this.getMessage()\n } : {}),\n ...(typeof this.getAttributePath() !== 'undefined' && this.getAttributePath() !== null ? {\n 'attributePath': this.getAttributePath()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getLocation() !== 'undefined' && this.getLocation() !== null ? {\n 'location': this.getLocation()\n } : {}),\n ...(typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {\n 'message': this.getMessage()\n } : {}),\n ...(typeof this.getAttributePath() !== 'undefined' && this.getAttributePath() !== null ? {\n 'attributePath': this.getAttributePath()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"location\") {\n if (typeof this.location === 'undefined' || this.location === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"location\", \"undefined or null\");\n }\n }\n if (property === \"message\") {\n if (typeof this.message === 'undefined' || this.message === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"message\", \"undefined or null\");\n }\n }\n if (property === \"attributePath\") {\n if (typeof this.attributePath === 'undefined' || this.attributePath === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"attributePath\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * The part of the request that failed validation. Validation can fail for path, query parameters, and request body.\n * @memberof SchemaValidationErrorMessage\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nSchemaValidationErrorMessage.prototype.location = undefined;\n\n/**\n * The detailed message for the validation error.\n * @memberof SchemaValidationErrorMessage\n */\nSchemaValidationErrorMessage.prototype.message = undefined;\n\n/**\n * The path of the attribute that failed validation in the schema.\n * @memberof SchemaValidationErrorMessage\n */\nSchemaValidationErrorMessage.prototype.attributePath = undefined;\nSchemaValidationErrorMessage.prototype.$reserved = undefined;\nSchemaValidationErrorMessage.prototype.$objectType = undefined;\nSchemaValidationErrorMessage.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/error/SchemaValidationErrorMessage.js?\n}");
|
|
639
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ SchemaValidationErrorMessage)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The SchemaValidationErrorMessage model module.\n * @module Ntnx/SchemaValidationErrorMessage\n * @version 4.0.3\n * @class SchemaValidationErrorMessage\n */\nvar _SchemaValidationErrorMessage_brand = /*#__PURE__*/new WeakSet();\nclass SchemaValidationErrorMessage {\n /**\n * Constructs a new <code>SchemaValidationErrorMessage</code>.\n * This schema is generated from SchemaValidationErrorMessage.java\n * @alias module:Ntnx/SchemaValidationErrorMessage\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _SchemaValidationErrorMessage_brand);\n this.$objectType = \"objects.v4.error.SchemaValidationErrorMessage\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>SchemaValidationErrorMessage</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/SchemaValidationErrorMessage} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/SchemaValidationErrorMessage} The populated <code>SchemaValidationErrorMessage</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new SchemaValidationErrorMessage();\n if (data.hasOwnProperty('location') && data.location !== null && data.location !== undefined) {\n obj.setLocation(data['location']);\n }\n if (data.hasOwnProperty('message') && data.message !== null && data.message !== undefined) {\n obj.setMessage(data['message']);\n }\n if (data.hasOwnProperty('attributePath') && data.attributePath !== null && data.attributePath !== undefined) {\n obj.setAttributePath(data['attributePath']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns The part of the request that failed validation. Validation can fail for path, query parameters, and request body.\n * @return {string}\n */\n getLocation() {\n return this.location;\n }\n\n /**\n * Sets The part of the request that failed validation. Validation can fail for path, query parameters, and request body.\n * @param {string} location The part of the request that failed validation. Validation can fail for path, query parameters, and request body.\n */\n setLocation(location) {\n this.location = location;\n }\n\n /**\n * Returns The detailed message for the validation error.\n * @return {string}\n */\n getMessage() {\n return this.message;\n }\n\n /**\n * Sets The detailed message for the validation error.\n * @param {string} message The detailed message for the validation error.\n */\n setMessage(message) {\n this.message = message;\n }\n\n /**\n * Returns The path of the attribute that failed validation in the schema.\n * @return {string}\n */\n getAttributePath() {\n return this.attributePath;\n }\n\n /**\n * Sets The path of the attribute that failed validation in the schema.\n * @param {string} attributePath The path of the attribute that failed validation in the schema.\n */\n setAttributePath(attributePath) {\n this.attributePath = attributePath;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getLocation() !== 'undefined' && this.getLocation() !== null ? {\n 'location': this.getLocation()\n } : {}),\n ...(typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {\n 'message': this.getMessage()\n } : {}),\n ...(typeof this.getAttributePath() !== 'undefined' && this.getAttributePath() !== null ? {\n 'attributePath': this.getAttributePath()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getLocation() !== 'undefined' && this.getLocation() !== null ? {\n 'location': this.getLocation()\n } : {}),\n ...(typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {\n 'message': this.getMessage()\n } : {}),\n ...(typeof this.getAttributePath() !== 'undefined' && this.getAttributePath() !== null ? {\n 'attributePath': this.getAttributePath()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"location\") {\n if (typeof this.location === 'undefined' || this.location === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"location\", \"undefined or null\");\n }\n }\n if (property === \"message\") {\n if (typeof this.message === 'undefined' || this.message === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"message\", \"undefined or null\");\n }\n }\n if (property === \"attributePath\") {\n if (typeof this.attributePath === 'undefined' || this.attributePath === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"attributePath\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * The part of the request that failed validation. Validation can fail for path, query parameters, and request body.\n * @memberof SchemaValidationErrorMessage\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nSchemaValidationErrorMessage.prototype.location = undefined;\n\n/**\n * The detailed message for the validation error.\n * @memberof SchemaValidationErrorMessage\n */\nSchemaValidationErrorMessage.prototype.message = undefined;\n\n/**\n * The path of the attribute that failed validation in the schema.\n * @memberof SchemaValidationErrorMessage\n */\nSchemaValidationErrorMessage.prototype.attributePath = undefined;\nSchemaValidationErrorMessage.prototype.$reserved = undefined;\nSchemaValidationErrorMessage.prototype.$objectType = undefined;\nSchemaValidationErrorMessage.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/error/SchemaValidationErrorMessage.js?\n}");
|
|
640
640
|
|
|
641
641
|
/***/ },
|
|
642
642
|
|
|
@@ -647,7 +647,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
647
647
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
648
648
|
|
|
649
649
|
"use strict";
|
|
650
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ GetObjectstoreStatsApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _ObjectstoreStats__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ObjectstoreStats */ \"./target/generated-sources/swagger/src/models/objects/v4/stats/ObjectstoreStats.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The GetObjectstoreStatsApiResponse model module.\n * @module Ntnx/GetObjectstoreStatsApiResponse\n * @version 4.0.2\n * @class GetObjectstoreStatsApiResponse\n */\nvar _GetObjectstoreStatsApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass GetObjectstoreStatsApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"] {\n /**\n * Constructs a new <code>GetObjectstoreStatsApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/stats/object-stores/{extId} Get operation\n * @alias module:Ntnx/GetObjectstoreStatsApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _GetObjectstoreStatsApiResponse_brand);\n this.$objectType = \"objects.v4.stats.GetObjectstoreStatsApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>GetObjectstoreStatsApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/GetObjectstoreStatsApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/GetObjectstoreStatsApiResponse} The populated <code>GetObjectstoreStatsApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new GetObjectstoreStatsApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'objects.v4.stats.ObjectstoreStats':\n obj.setData(_ObjectstoreStats__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {ObjectstoreStats | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {ObjectstoreStats | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_GetObjectstoreStatsApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_GetObjectstoreStatsApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof GetObjectstoreStatsApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nGetObjectstoreStatsApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof GetObjectstoreStatsApiResponse\n */\nGetObjectstoreStatsApiResponse.prototype.data = undefined;\nGetObjectstoreStatsApiResponse.prototype.$reserved = undefined;\nGetObjectstoreStatsApiResponse.prototype.$objectType = undefined;\nGetObjectstoreStatsApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js?\n}");
|
|
650
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ GetObjectstoreStatsApiResponse)\n/* harmony export */ });\n/* harmony import */ var _common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/response/ApiResponseMetadata */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiResponseMetadata.js\");\n/* harmony import */ var _error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../error/ErrorResponse */ \"./target/generated-sources/swagger/src/models/objects/v4/error/ErrorResponse.js\");\n/* harmony import */ var _ObjectstoreStats__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ObjectstoreStats */ \"./target/generated-sources/swagger/src/models/objects/v4/stats/ObjectstoreStats.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\n/* harmony import */ var _Paginable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Paginable */ \"./target/generated-sources/swagger/src/Paginable.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n/**\n * The GetObjectstoreStatsApiResponse model module.\n * @module Ntnx/GetObjectstoreStatsApiResponse\n * @version 4.0.3\n * @class GetObjectstoreStatsApiResponse\n */\nvar _GetObjectstoreStatsApiResponse_brand = /*#__PURE__*/new WeakSet();\nclass GetObjectstoreStatsApiResponse extends _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"] {\n /**\n * Constructs a new <code>GetObjectstoreStatsApiResponse</code>.\n * REST response for all response codes in API path /objects/v4.0/stats/object-stores/{extId} Get operation\n * @alias module:Ntnx/GetObjectstoreStatsApiResponse\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _GetObjectstoreStatsApiResponse_brand);\n this.$objectType = \"objects.v4.stats.GetObjectstoreStatsApiResponse\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>GetObjectstoreStatsApiResponse</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/GetObjectstoreStatsApiResponse} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/GetObjectstoreStatsApiResponse} The populated <code>GetObjectstoreStatsApiResponse</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new GetObjectstoreStatsApiResponse();\n if (data.hasOwnProperty('metadata')) {\n _Paginable__WEBPACK_IMPORTED_MODULE_6__[\"default\"].constructFromObject(data['metadata'], obj);\n }\n if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {\n obj.setMetadata(_common_v1_response_ApiResponseMetadata__WEBPACK_IMPORTED_MODULE_0__[\"default\"].constructFromObject(data['metadata']));\n }\n if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {\n if (data['data'].hasOwnProperty('$objectType')) {\n discriminator = data['data']['$objectType'];\n } else {\n discriminator = typeof data['data'];\n }\n switch (discriminator) {\n case 'objects.v4.stats.ObjectstoreStats':\n obj.setData(_ObjectstoreStats__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n case 'objects.v4.error.ErrorResponse':\n obj.setData(_error_ErrorResponse__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructFromObject(data['data'], undefined));\n break;\n default:\n throw \"Unknown datatype \" + discriminator + \" in data\";\n }\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * @return {ApiResponseMetadata}\n */\n getMetadata() {\n return this.metadata;\n }\n\n /**\n * @param {ApiResponseMetadata} metadata\n */\n setMetadata(metadata) {\n this.metadata = metadata;\n }\n\n /**\n * @return {ObjectstoreStats | ErrorResponse}\n */\n getData() {\n return this.data;\n }\n\n /**\n * @param {ObjectstoreStats | ErrorResponse} data\n */\n setData(data) {\n this.data = data;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson(false) : item) : _assertClassBrand(_GetObjectstoreStatsApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {\n 'metadata': this.getMetadata().toJson(false)\n } : {}),\n ...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {\n 'data': typeof this.getData().toJson !== \"undefined\" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== \"undefined\" ? item.toJson() : item) : _assertClassBrand(_GetObjectstoreStatsApiResponse_brand, this, _toJsonMapType).call(this, this.getData())\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"metadata\") {\n if (typeof this.metadata === 'undefined' || this.metadata === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"metadata\", \"undefined or null\");\n }\n }\n if (property === \"data\") {\n if (typeof this.data === 'undefined' || this.data === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"data\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_5__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * @memberof GetObjectstoreStatsApiResponse\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nGetObjectstoreStatsApiResponse.prototype.metadata = undefined;\n\n/**\n * @memberof GetObjectstoreStatsApiResponse\n */\nGetObjectstoreStatsApiResponse.prototype.data = undefined;\nGetObjectstoreStatsApiResponse.prototype.$reserved = undefined;\nGetObjectstoreStatsApiResponse.prototype.$objectType = undefined;\nGetObjectstoreStatsApiResponse.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js?\n}");
|
|
651
651
|
|
|
652
652
|
/***/ },
|
|
653
653
|
|
|
@@ -658,7 +658,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
658
658
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
659
659
|
|
|
660
660
|
"use strict";
|
|
661
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ObjectstoreStats)\n/* harmony export */ });\n/* harmony import */ var _common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/config/TenantAwareModel */ \"./target/generated-sources/swagger/src/models/common/v1/config/TenantAwareModel.js\");\n/* harmony import */ var _common_v1_response_ApiLink__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/v1/response/ApiLink */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiLink.js\");\n/* harmony import */ var _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/v1/response/ExternalizableAbstractModel */ \"./target/generated-sources/swagger/src/models/common/v1/response/ExternalizableAbstractModel.js\");\n/* harmony import */ var _common_v1_stats_TimeIntValuePair__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/v1/stats/TimeIntValuePair */ \"./target/generated-sources/swagger/src/models/common/v1/stats/TimeIntValuePair.js\");\n/* harmony import */ var _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./TimeFloatValuePair */ \"./target/generated-sources/swagger/src/models/objects/v4/stats/TimeFloatValuePair.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n\n/**\n * The ObjectstoreStats model module.\n * @module Ntnx/ObjectstoreStats\n * @version 4.0.2\n * @class ObjectstoreStats\n * @extends ExternalizableAbstractModel\n */\nvar _ObjectstoreStats_brand = /*#__PURE__*/new WeakSet();\nclass ObjectstoreStats extends _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_2__[\"default\"] {\n /**\n * Constructs a new <code>ObjectstoreStats</code>.\n * @alias module:Ntnx/ObjectstoreStats\n * @extends module:Ntnx/ExternalizableAbstractModel\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ObjectstoreStats_brand);\n this.$objectType = \"objects.v4.stats.ObjectstoreStats\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ObjectstoreStats</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ObjectstoreStats} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ObjectstoreStats} The populated <code>ObjectstoreStats</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ObjectstoreStats();\n _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data, obj, true);\n if (data.hasOwnProperty('objectCount') && data.objectCount !== null && data.objectCount !== undefined) {\n itemArr = [];\n items = data.objectCount;\n for (i = 0; i < items.length; i++) {\n item = _common_v1_stats_TimeIntValuePair__WEBPACK_IMPORTED_MODULE_3__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setObjectCount(itemArr);\n }\n if (data.hasOwnProperty('bucketCount') && data.bucketCount !== null && data.bucketCount !== undefined) {\n itemArr = [];\n items = data.bucketCount;\n for (i = 0; i < items.length; i++) {\n item = _common_v1_stats_TimeIntValuePair__WEBPACK_IMPORTED_MODULE_3__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setBucketCount(itemArr);\n }\n if (data.hasOwnProperty('storageUsageBytes') && data.storageUsageBytes !== null && data.storageUsageBytes !== undefined) {\n itemArr = [];\n items = data.storageUsageBytes;\n for (i = 0; i < items.length; i++) {\n item = _common_v1_stats_TimeIntValuePair__WEBPACK_IMPORTED_MODULE_3__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setStorageUsageBytes(itemArr);\n }\n if (data.hasOwnProperty('inboundBytesPerSecond') && data.inboundBytesPerSecond !== null && data.inboundBytesPerSecond !== undefined) {\n itemArr = [];\n items = data.inboundBytesPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setInboundBytesPerSecond(itemArr);\n }\n if (data.hasOwnProperty('outboundBytesPerSecond') && data.outboundBytesPerSecond !== null && data.outboundBytesPerSecond !== undefined) {\n itemArr = [];\n items = data.outboundBytesPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setOutboundBytesPerSecond(itemArr);\n }\n if (data.hasOwnProperty('getRequestThroughputBytesPerSecond') && data.getRequestThroughputBytesPerSecond !== null && data.getRequestThroughputBytesPerSecond !== undefined) {\n itemArr = [];\n items = data.getRequestThroughputBytesPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setGetRequestThroughputBytesPerSecond(itemArr);\n }\n if (data.hasOwnProperty('putRequestThroughputBytesPerSecond') && data.putRequestThroughputBytesPerSecond !== null && data.putRequestThroughputBytesPerSecond !== undefined) {\n itemArr = [];\n items = data.putRequestThroughputBytesPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setPutRequestThroughputBytesPerSecond(itemArr);\n }\n if (data.hasOwnProperty('postRequestsPerSecond') && data.postRequestsPerSecond !== null && data.postRequestsPerSecond !== undefined) {\n itemArr = [];\n items = data.postRequestsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setPostRequestsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('headRequestsPerSecond') && data.headRequestsPerSecond !== null && data.headRequestsPerSecond !== undefined) {\n itemArr = [];\n items = data.headRequestsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setHeadRequestsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('getRequestsPerSecond') && data.getRequestsPerSecond !== null && data.getRequestsPerSecond !== undefined) {\n itemArr = [];\n items = data.getRequestsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setGetRequestsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('putRequestsPerSecond') && data.putRequestsPerSecond !== null && data.putRequestsPerSecond !== undefined) {\n itemArr = [];\n items = data.putRequestsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setPutRequestsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('deleteRequestsPerSecond') && data.deleteRequestsPerSecond !== null && data.deleteRequestsPerSecond !== undefined) {\n itemArr = [];\n items = data.deleteRequestsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setDeleteRequestsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('objectOperationsPerSecond') && data.objectOperationsPerSecond !== null && data.objectOperationsPerSecond !== undefined) {\n itemArr = [];\n items = data.objectOperationsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setObjectOperationsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('getObjectTtfbMsecs') && data.getObjectTtfbMsecs !== null && data.getObjectTtfbMsecs !== undefined) {\n itemArr = [];\n items = data.getObjectTtfbMsecs;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setGetObjectTtfbMsecs(itemArr);\n }\n if (data.hasOwnProperty('getBucketOperationsPerSecond') && data.getBucketOperationsPerSecond !== null && data.getBucketOperationsPerSecond !== undefined) {\n itemArr = [];\n items = data.getBucketOperationsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setGetBucketOperationsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('listMultipartUploadsOperationsPerSecond') && data.listMultipartUploadsOperationsPerSecond !== null && data.listMultipartUploadsOperationsPerSecond !== undefined) {\n itemArr = [];\n items = data.listMultipartUploadsOperationsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setListMultipartUploadsOperationsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('multipartUploadStartOperationsPerSecond') && data.multipartUploadStartOperationsPerSecond !== null && data.multipartUploadStartOperationsPerSecond !== undefined) {\n itemArr = [];\n items = data.multipartUploadStartOperationsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setMultipartUploadStartOperationsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('selectObjectContentOperationsPerSecond') && data.selectObjectContentOperationsPerSecond !== null && data.selectObjectContentOperationsPerSecond !== undefined) {\n itemArr = [];\n items = data.selectObjectContentOperationsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setSelectObjectContentOperationsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('nfsReadRequestsPerSecond') && data.nfsReadRequestsPerSecond !== null && data.nfsReadRequestsPerSecond !== undefined) {\n itemArr = [];\n items = data.nfsReadRequestsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setNfsReadRequestsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('nfsWriteRequestsPerSecond') && data.nfsWriteRequestsPerSecond !== null && data.nfsWriteRequestsPerSecond !== undefined) {\n itemArr = [];\n items = data.nfsWriteRequestsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setNfsWriteRequestsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('nfsReadThroughputBytesPerSecond') && data.nfsReadThroughputBytesPerSecond !== null && data.nfsReadThroughputBytesPerSecond !== undefined) {\n itemArr = [];\n items = data.nfsReadThroughputBytesPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setNfsReadThroughputBytesPerSecond(itemArr);\n }\n if (data.hasOwnProperty('nfsWriteThroughputBytesPerSecond') && data.nfsWriteThroughputBytesPerSecond !== null && data.nfsWriteThroughputBytesPerSecond !== undefined) {\n itemArr = [];\n items = data.nfsWriteThroughputBytesPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setNfsWriteThroughputBytesPerSecond(itemArr);\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns Number of Objects in the Object store. This stat is updated every 10 minutes. It includes the count of the incomplete multipart uploads. \n * @return {TimeIntValuePair[]}\n */\n getObjectCount() {\n return this.objectCount;\n }\n\n /**\n * Sets Number of Objects in the Object store. This stat is updated every 10 minutes. It includes the count of the incomplete multipart uploads. \n * @param {TimeIntValuePair[]} objectCount Number of Objects in the Object store. This stat is updated every 10 minutes. It includes the count of the incomplete multipart uploads. \n */\n setObjectCount(objectCount) {\n this.objectCount = objectCount;\n }\n\n /**\n * Returns Number of Buckets in the Object store. This stat is updated every 10 minutes. \n * @return {TimeIntValuePair[]}\n */\n getBucketCount() {\n return this.bucketCount;\n }\n\n /**\n * Sets Number of Buckets in the Object store. This stat is updated every 10 minutes. \n * @param {TimeIntValuePair[]} bucketCount Number of Buckets in the Object store. This stat is updated every 10 minutes. \n */\n setBucketCount(bucketCount) {\n this.bucketCount = bucketCount;\n }\n\n /**\n * Returns Total storage in bytes used by the Objects and Buckets. This stat is updated every 10 minutes. It includes the storage used by the incomplete multipart uploads. \n * @return {TimeIntValuePair[]}\n */\n getStorageUsageBytes() {\n return this.storageUsageBytes;\n }\n\n /**\n * Sets Total storage in bytes used by the Objects and Buckets. This stat is updated every 10 minutes. It includes the storage used by the incomplete multipart uploads. \n * @param {TimeIntValuePair[]} storageUsageBytes Total storage in bytes used by the Objects and Buckets. This stat is updated every 10 minutes. It includes the storage used by the incomplete multipart uploads. \n */\n setStorageUsageBytes(storageUsageBytes) {\n this.storageUsageBytes = storageUsageBytes;\n }\n\n /**\n * Returns Number of bytes written per second to the Object store from operations on the Objects and Buckets.\n * @return {TimeFloatValuePair[]}\n */\n getInboundBytesPerSecond() {\n return this.inboundBytesPerSecond;\n }\n\n /**\n * Sets Number of bytes written per second to the Object store from operations on the Objects and Buckets.\n * @param {TimeFloatValuePair[]} inboundBytesPerSecond Number of bytes written per second to the Object store from operations on the Objects and Buckets.\n */\n setInboundBytesPerSecond(inboundBytesPerSecond) {\n this.inboundBytesPerSecond = inboundBytesPerSecond;\n }\n\n /**\n * Returns Number of bytes read per second from the Object store from operations on the Objects and Buckets.\n * @return {TimeFloatValuePair[]}\n */\n getOutboundBytesPerSecond() {\n return this.outboundBytesPerSecond;\n }\n\n /**\n * Sets Number of bytes read per second from the Object store from operations on the Objects and Buckets.\n * @param {TimeFloatValuePair[]} outboundBytesPerSecond Number of bytes read per second from the Object store from operations on the Objects and Buckets.\n */\n setOutboundBytesPerSecond(outboundBytesPerSecond) {\n this.outboundBytesPerSecond = outboundBytesPerSecond;\n }\n\n /**\n * Returns Throughput of HTTP GET requests in bytes per second.\n * @return {TimeFloatValuePair[]}\n */\n getGetRequestThroughputBytesPerSecond() {\n return this.getRequestThroughputBytesPerSecond;\n }\n\n /**\n * Sets Throughput of HTTP GET requests in bytes per second.\n * @param {TimeFloatValuePair[]} getRequestThroughputBytesPerSecond Throughput of HTTP GET requests in bytes per second.\n */\n setGetRequestThroughputBytesPerSecond(getRequestThroughputBytesPerSecond) {\n this.getRequestThroughputBytesPerSecond = getRequestThroughputBytesPerSecond;\n }\n\n /**\n * Returns Throughput of HTTP PUT requests in bytes per second.\n * @return {TimeFloatValuePair[]}\n */\n getPutRequestThroughputBytesPerSecond() {\n return this.putRequestThroughputBytesPerSecond;\n }\n\n /**\n * Sets Throughput of HTTP PUT requests in bytes per second.\n * @param {TimeFloatValuePair[]} putRequestThroughputBytesPerSecond Throughput of HTTP PUT requests in bytes per second.\n */\n setPutRequestThroughputBytesPerSecond(putRequestThroughputBytesPerSecond) {\n this.putRequestThroughputBytesPerSecond = putRequestThroughputBytesPerSecond;\n }\n\n /**\n * Returns Number of HTTP POST requests per second on the Objects and Buckets of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getPostRequestsPerSecond() {\n return this.postRequestsPerSecond;\n }\n\n /**\n * Sets Number of HTTP POST requests per second on the Objects and Buckets of the Object store.\n * @param {TimeFloatValuePair[]} postRequestsPerSecond Number of HTTP POST requests per second on the Objects and Buckets of the Object store.\n */\n setPostRequestsPerSecond(postRequestsPerSecond) {\n this.postRequestsPerSecond = postRequestsPerSecond;\n }\n\n /**\n * Returns Number of HTTP HEAD requests per second on the Objects and Buckets of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getHeadRequestsPerSecond() {\n return this.headRequestsPerSecond;\n }\n\n /**\n * Sets Number of HTTP HEAD requests per second on the Objects and Buckets of the Object store.\n * @param {TimeFloatValuePair[]} headRequestsPerSecond Number of HTTP HEAD requests per second on the Objects and Buckets of the Object store.\n */\n setHeadRequestsPerSecond(headRequestsPerSecond) {\n this.headRequestsPerSecond = headRequestsPerSecond;\n }\n\n /**\n * Returns Number of HTTP GET requests per second on the Objects and Buckets of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getGetRequestsPerSecond() {\n return this.getRequestsPerSecond;\n }\n\n /**\n * Sets Number of HTTP GET requests per second on the Objects and Buckets of the Object store.\n * @param {TimeFloatValuePair[]} getRequestsPerSecond Number of HTTP GET requests per second on the Objects and Buckets of the Object store.\n */\n setGetRequestsPerSecond(getRequestsPerSecond) {\n this.getRequestsPerSecond = getRequestsPerSecond;\n }\n\n /**\n * Returns Number of HTTP PUT requests per second on the Objects and Buckets of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getPutRequestsPerSecond() {\n return this.putRequestsPerSecond;\n }\n\n /**\n * Sets Number of HTTP PUT requests per second on the Objects and Buckets of the Object store.\n * @param {TimeFloatValuePair[]} putRequestsPerSecond Number of HTTP PUT requests per second on the Objects and Buckets of the Object store.\n */\n setPutRequestsPerSecond(putRequestsPerSecond) {\n this.putRequestsPerSecond = putRequestsPerSecond;\n }\n\n /**\n * Returns Number of HTTP DELETE requests per second on the Objects and Buckets of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getDeleteRequestsPerSecond() {\n return this.deleteRequestsPerSecond;\n }\n\n /**\n * Sets Number of HTTP DELETE requests per second on the Objects and Buckets of the Object store.\n * @param {TimeFloatValuePair[]} deleteRequestsPerSecond Number of HTTP DELETE requests per second on the Objects and Buckets of the Object store.\n */\n setDeleteRequestsPerSecond(deleteRequestsPerSecond) {\n this.deleteRequestsPerSecond = deleteRequestsPerSecond;\n }\n\n /**\n * Returns Number of operations per second on the objects of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getObjectOperationsPerSecond() {\n return this.objectOperationsPerSecond;\n }\n\n /**\n * Sets Number of operations per second on the objects of the Object store.\n * @param {TimeFloatValuePair[]} objectOperationsPerSecond Number of operations per second on the objects of the Object store.\n */\n setObjectOperationsPerSecond(objectOperationsPerSecond) {\n this.objectOperationsPerSecond = objectOperationsPerSecond;\n }\n\n /**\n * Returns Time to the first byte in milliseconds for Get Object requests.\n * @return {TimeFloatValuePair[]}\n */\n getGetObjectTtfbMsecs() {\n return this.getObjectTtfbMsecs;\n }\n\n /**\n * Sets Time to the first byte in milliseconds for Get Object requests.\n * @param {TimeFloatValuePair[]} getObjectTtfbMsecs Time to the first byte in milliseconds for Get Object requests.\n */\n setGetObjectTtfbMsecs(getObjectTtfbMsecs) {\n this.getObjectTtfbMsecs = getObjectTtfbMsecs;\n }\n\n /**\n * Returns Number of GetBucket operations per second.\n * @return {TimeFloatValuePair[]}\n */\n getGetBucketOperationsPerSecond() {\n return this.getBucketOperationsPerSecond;\n }\n\n /**\n * Sets Number of GetBucket operations per second.\n * @param {TimeFloatValuePair[]} getBucketOperationsPerSecond Number of GetBucket operations per second.\n */\n setGetBucketOperationsPerSecond(getBucketOperationsPerSecond) {\n this.getBucketOperationsPerSecond = getBucketOperationsPerSecond;\n }\n\n /**\n * Returns The number of ListMultipartUploads operations per second.\n * @return {TimeFloatValuePair[]}\n */\n getListMultipartUploadsOperationsPerSecond() {\n return this.listMultipartUploadsOperationsPerSecond;\n }\n\n /**\n * Sets The number of ListMultipartUploads operations per second.\n * @param {TimeFloatValuePair[]} listMultipartUploadsOperationsPerSecond The number of ListMultipartUploads operations per second.\n */\n setListMultipartUploadsOperationsPerSecond(listMultipartUploadsOperationsPerSecond) {\n this.listMultipartUploadsOperationsPerSecond = listMultipartUploadsOperationsPerSecond;\n }\n\n /**\n * Returns The number of CreateMultipartUpload operations per second.\n * @return {TimeFloatValuePair[]}\n */\n getMultipartUploadStartOperationsPerSecond() {\n return this.multipartUploadStartOperationsPerSecond;\n }\n\n /**\n * Sets The number of CreateMultipartUpload operations per second.\n * @param {TimeFloatValuePair[]} multipartUploadStartOperationsPerSecond The number of CreateMultipartUpload operations per second.\n */\n setMultipartUploadStartOperationsPerSecond(multipartUploadStartOperationsPerSecond) {\n this.multipartUploadStartOperationsPerSecond = multipartUploadStartOperationsPerSecond;\n }\n\n /**\n * Returns The number of SelectObjectContent operations per second.\n * @return {TimeFloatValuePair[]}\n */\n getSelectObjectContentOperationsPerSecond() {\n return this.selectObjectContentOperationsPerSecond;\n }\n\n /**\n * Sets The number of SelectObjectContent operations per second.\n * @param {TimeFloatValuePair[]} selectObjectContentOperationsPerSecond The number of SelectObjectContent operations per second.\n */\n setSelectObjectContentOperationsPerSecond(selectObjectContentOperationsPerSecond) {\n this.selectObjectContentOperationsPerSecond = selectObjectContentOperationsPerSecond;\n }\n\n /**\n * Returns Number of Network File System (NFS) read requests per second on the objects of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getNfsReadRequestsPerSecond() {\n return this.nfsReadRequestsPerSecond;\n }\n\n /**\n * Sets Number of Network File System (NFS) read requests per second on the objects of the Object store.\n * @param {TimeFloatValuePair[]} nfsReadRequestsPerSecond Number of Network File System (NFS) read requests per second on the objects of the Object store.\n */\n setNfsReadRequestsPerSecond(nfsReadRequestsPerSecond) {\n this.nfsReadRequestsPerSecond = nfsReadRequestsPerSecond;\n }\n\n /**\n * Returns Number of Network File System (NFS) write requests per second on the objects of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getNfsWriteRequestsPerSecond() {\n return this.nfsWriteRequestsPerSecond;\n }\n\n /**\n * Sets Number of Network File System (NFS) write requests per second on the objects of the Object store.\n * @param {TimeFloatValuePair[]} nfsWriteRequestsPerSecond Number of Network File System (NFS) write requests per second on the objects of the Object store.\n */\n setNfsWriteRequestsPerSecond(nfsWriteRequestsPerSecond) {\n this.nfsWriteRequestsPerSecond = nfsWriteRequestsPerSecond;\n }\n\n /**\n * Returns Throughput of Network File System (NFS) read operations in bytes per second on the objects of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getNfsReadThroughputBytesPerSecond() {\n return this.nfsReadThroughputBytesPerSecond;\n }\n\n /**\n * Sets Throughput of Network File System (NFS) read operations in bytes per second on the objects of the Object store.\n * @param {TimeFloatValuePair[]} nfsReadThroughputBytesPerSecond Throughput of Network File System (NFS) read operations in bytes per second on the objects of the Object store.\n */\n setNfsReadThroughputBytesPerSecond(nfsReadThroughputBytesPerSecond) {\n this.nfsReadThroughputBytesPerSecond = nfsReadThroughputBytesPerSecond;\n }\n\n /**\n * Returns Throughput of Network File System (NFS) write operations in bytes per second on the objects of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getNfsWriteThroughputBytesPerSecond() {\n return this.nfsWriteThroughputBytesPerSecond;\n }\n\n /**\n * Sets Throughput of Network File System (NFS) write operations in bytes per second on the objects of the Object store.\n * @param {TimeFloatValuePair[]} nfsWriteThroughputBytesPerSecond Throughput of Network File System (NFS) write operations in bytes per second on the objects of the Object store.\n */\n setNfsWriteThroughputBytesPerSecond(nfsWriteThroughputBytesPerSecond) {\n this.nfsWriteThroughputBytesPerSecond = nfsWriteThroughputBytesPerSecond;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getObjectCount() !== 'undefined' && this.getObjectCount() !== null ? {\n 'objectCount': this.getObjectCount().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getBucketCount() !== 'undefined' && this.getBucketCount() !== null ? {\n 'bucketCount': this.getBucketCount().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getStorageUsageBytes() !== 'undefined' && this.getStorageUsageBytes() !== null ? {\n 'storageUsageBytes': this.getStorageUsageBytes().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getInboundBytesPerSecond() !== 'undefined' && this.getInboundBytesPerSecond() !== null ? {\n 'inboundBytesPerSecond': this.getInboundBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getOutboundBytesPerSecond() !== 'undefined' && this.getOutboundBytesPerSecond() !== null ? {\n 'outboundBytesPerSecond': this.getOutboundBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetRequestThroughputBytesPerSecond() !== 'undefined' && this.getGetRequestThroughputBytesPerSecond() !== null ? {\n 'getRequestThroughputBytesPerSecond': this.getGetRequestThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getPutRequestThroughputBytesPerSecond() !== 'undefined' && this.getPutRequestThroughputBytesPerSecond() !== null ? {\n 'putRequestThroughputBytesPerSecond': this.getPutRequestThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getPostRequestsPerSecond() !== 'undefined' && this.getPostRequestsPerSecond() !== null ? {\n 'postRequestsPerSecond': this.getPostRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getHeadRequestsPerSecond() !== 'undefined' && this.getHeadRequestsPerSecond() !== null ? {\n 'headRequestsPerSecond': this.getHeadRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetRequestsPerSecond() !== 'undefined' && this.getGetRequestsPerSecond() !== null ? {\n 'getRequestsPerSecond': this.getGetRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getPutRequestsPerSecond() !== 'undefined' && this.getPutRequestsPerSecond() !== null ? {\n 'putRequestsPerSecond': this.getPutRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getDeleteRequestsPerSecond() !== 'undefined' && this.getDeleteRequestsPerSecond() !== null ? {\n 'deleteRequestsPerSecond': this.getDeleteRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getObjectOperationsPerSecond() !== 'undefined' && this.getObjectOperationsPerSecond() !== null ? {\n 'objectOperationsPerSecond': this.getObjectOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetObjectTtfbMsecs() !== 'undefined' && this.getGetObjectTtfbMsecs() !== null ? {\n 'getObjectTtfbMsecs': this.getGetObjectTtfbMsecs().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetBucketOperationsPerSecond() !== 'undefined' && this.getGetBucketOperationsPerSecond() !== null ? {\n 'getBucketOperationsPerSecond': this.getGetBucketOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getListMultipartUploadsOperationsPerSecond() !== 'undefined' && this.getListMultipartUploadsOperationsPerSecond() !== null ? {\n 'listMultipartUploadsOperationsPerSecond': this.getListMultipartUploadsOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getMultipartUploadStartOperationsPerSecond() !== 'undefined' && this.getMultipartUploadStartOperationsPerSecond() !== null ? {\n 'multipartUploadStartOperationsPerSecond': this.getMultipartUploadStartOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getSelectObjectContentOperationsPerSecond() !== 'undefined' && this.getSelectObjectContentOperationsPerSecond() !== null ? {\n 'selectObjectContentOperationsPerSecond': this.getSelectObjectContentOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsReadRequestsPerSecond() !== 'undefined' && this.getNfsReadRequestsPerSecond() !== null ? {\n 'nfsReadRequestsPerSecond': this.getNfsReadRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsWriteRequestsPerSecond() !== 'undefined' && this.getNfsWriteRequestsPerSecond() !== null ? {\n 'nfsWriteRequestsPerSecond': this.getNfsWriteRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsReadThroughputBytesPerSecond() !== 'undefined' && this.getNfsReadThroughputBytesPerSecond() !== null ? {\n 'nfsReadThroughputBytesPerSecond': this.getNfsReadThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsWriteThroughputBytesPerSecond() !== 'undefined' && this.getNfsWriteThroughputBytesPerSecond() !== null ? {\n 'nfsWriteThroughputBytesPerSecond': this.getNfsWriteThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {\n 'extId': this.getExtId()\n } : {}),\n ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {\n 'links': this.getLinks().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {\n 'tenantId': this.getTenantId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getObjectCount() !== 'undefined' && this.getObjectCount() !== null ? {\n 'objectCount': this.getObjectCount().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getBucketCount() !== 'undefined' && this.getBucketCount() !== null ? {\n 'bucketCount': this.getBucketCount().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getStorageUsageBytes() !== 'undefined' && this.getStorageUsageBytes() !== null ? {\n 'storageUsageBytes': this.getStorageUsageBytes().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getInboundBytesPerSecond() !== 'undefined' && this.getInboundBytesPerSecond() !== null ? {\n 'inboundBytesPerSecond': this.getInboundBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getOutboundBytesPerSecond() !== 'undefined' && this.getOutboundBytesPerSecond() !== null ? {\n 'outboundBytesPerSecond': this.getOutboundBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetRequestThroughputBytesPerSecond() !== 'undefined' && this.getGetRequestThroughputBytesPerSecond() !== null ? {\n 'getRequestThroughputBytesPerSecond': this.getGetRequestThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getPutRequestThroughputBytesPerSecond() !== 'undefined' && this.getPutRequestThroughputBytesPerSecond() !== null ? {\n 'putRequestThroughputBytesPerSecond': this.getPutRequestThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getPostRequestsPerSecond() !== 'undefined' && this.getPostRequestsPerSecond() !== null ? {\n 'postRequestsPerSecond': this.getPostRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getHeadRequestsPerSecond() !== 'undefined' && this.getHeadRequestsPerSecond() !== null ? {\n 'headRequestsPerSecond': this.getHeadRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetRequestsPerSecond() !== 'undefined' && this.getGetRequestsPerSecond() !== null ? {\n 'getRequestsPerSecond': this.getGetRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getPutRequestsPerSecond() !== 'undefined' && this.getPutRequestsPerSecond() !== null ? {\n 'putRequestsPerSecond': this.getPutRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getDeleteRequestsPerSecond() !== 'undefined' && this.getDeleteRequestsPerSecond() !== null ? {\n 'deleteRequestsPerSecond': this.getDeleteRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getObjectOperationsPerSecond() !== 'undefined' && this.getObjectOperationsPerSecond() !== null ? {\n 'objectOperationsPerSecond': this.getObjectOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetObjectTtfbMsecs() !== 'undefined' && this.getGetObjectTtfbMsecs() !== null ? {\n 'getObjectTtfbMsecs': this.getGetObjectTtfbMsecs().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetBucketOperationsPerSecond() !== 'undefined' && this.getGetBucketOperationsPerSecond() !== null ? {\n 'getBucketOperationsPerSecond': this.getGetBucketOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getListMultipartUploadsOperationsPerSecond() !== 'undefined' && this.getListMultipartUploadsOperationsPerSecond() !== null ? {\n 'listMultipartUploadsOperationsPerSecond': this.getListMultipartUploadsOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getMultipartUploadStartOperationsPerSecond() !== 'undefined' && this.getMultipartUploadStartOperationsPerSecond() !== null ? {\n 'multipartUploadStartOperationsPerSecond': this.getMultipartUploadStartOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getSelectObjectContentOperationsPerSecond() !== 'undefined' && this.getSelectObjectContentOperationsPerSecond() !== null ? {\n 'selectObjectContentOperationsPerSecond': this.getSelectObjectContentOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsReadRequestsPerSecond() !== 'undefined' && this.getNfsReadRequestsPerSecond() !== null ? {\n 'nfsReadRequestsPerSecond': this.getNfsReadRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsWriteRequestsPerSecond() !== 'undefined' && this.getNfsWriteRequestsPerSecond() !== null ? {\n 'nfsWriteRequestsPerSecond': this.getNfsWriteRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsReadThroughputBytesPerSecond() !== 'undefined' && this.getNfsReadThroughputBytesPerSecond() !== null ? {\n 'nfsReadThroughputBytesPerSecond': this.getNfsReadThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsWriteThroughputBytesPerSecond() !== 'undefined' && this.getNfsWriteThroughputBytesPerSecond() !== null ? {\n 'nfsWriteThroughputBytesPerSecond': this.getNfsWriteThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_5__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"objectCount\") {\n if (typeof this.objectCount === 'undefined' || this.objectCount === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"objectCount\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.objectCount, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"objectCount\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.objectCount, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"objectCount\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"bucketCount\") {\n if (typeof this.bucketCount === 'undefined' || this.bucketCount === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"bucketCount\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.bucketCount, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"bucketCount\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.bucketCount, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"bucketCount\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"storageUsageBytes\") {\n if (typeof this.storageUsageBytes === 'undefined' || this.storageUsageBytes === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"storageUsageBytes\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.storageUsageBytes, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"storageUsageBytes\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.storageUsageBytes, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"storageUsageBytes\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"inboundBytesPerSecond\") {\n if (typeof this.inboundBytesPerSecond === 'undefined' || this.inboundBytesPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"inboundBytesPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.inboundBytesPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"inboundBytesPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.inboundBytesPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"inboundBytesPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"outboundBytesPerSecond\") {\n if (typeof this.outboundBytesPerSecond === 'undefined' || this.outboundBytesPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"outboundBytesPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.outboundBytesPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"outboundBytesPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.outboundBytesPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"outboundBytesPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"getRequestThroughputBytesPerSecond\") {\n if (typeof this.getRequestThroughputBytesPerSecond === 'undefined' || this.getRequestThroughputBytesPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getRequestThroughputBytesPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.getRequestThroughputBytesPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getRequestThroughputBytesPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.getRequestThroughputBytesPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getRequestThroughputBytesPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"putRequestThroughputBytesPerSecond\") {\n if (typeof this.putRequestThroughputBytesPerSecond === 'undefined' || this.putRequestThroughputBytesPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"putRequestThroughputBytesPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.putRequestThroughputBytesPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"putRequestThroughputBytesPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.putRequestThroughputBytesPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"putRequestThroughputBytesPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"postRequestsPerSecond\") {\n if (typeof this.postRequestsPerSecond === 'undefined' || this.postRequestsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"postRequestsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.postRequestsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"postRequestsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.postRequestsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"postRequestsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"headRequestsPerSecond\") {\n if (typeof this.headRequestsPerSecond === 'undefined' || this.headRequestsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"headRequestsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.headRequestsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"headRequestsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.headRequestsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"headRequestsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"getRequestsPerSecond\") {\n if (typeof this.getRequestsPerSecond === 'undefined' || this.getRequestsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getRequestsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.getRequestsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getRequestsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.getRequestsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getRequestsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"putRequestsPerSecond\") {\n if (typeof this.putRequestsPerSecond === 'undefined' || this.putRequestsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"putRequestsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.putRequestsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"putRequestsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.putRequestsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"putRequestsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"deleteRequestsPerSecond\") {\n if (typeof this.deleteRequestsPerSecond === 'undefined' || this.deleteRequestsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"deleteRequestsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.deleteRequestsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"deleteRequestsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.deleteRequestsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"deleteRequestsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"objectOperationsPerSecond\") {\n if (typeof this.objectOperationsPerSecond === 'undefined' || this.objectOperationsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"objectOperationsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.objectOperationsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"objectOperationsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.objectOperationsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"objectOperationsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"getObjectTtfbMsecs\") {\n if (typeof this.getObjectTtfbMsecs === 'undefined' || this.getObjectTtfbMsecs === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getObjectTtfbMsecs\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.getObjectTtfbMsecs, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getObjectTtfbMsecs\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.getObjectTtfbMsecs, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getObjectTtfbMsecs\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"getBucketOperationsPerSecond\") {\n if (typeof this.getBucketOperationsPerSecond === 'undefined' || this.getBucketOperationsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getBucketOperationsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.getBucketOperationsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getBucketOperationsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.getBucketOperationsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getBucketOperationsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"listMultipartUploadsOperationsPerSecond\") {\n if (typeof this.listMultipartUploadsOperationsPerSecond === 'undefined' || this.listMultipartUploadsOperationsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"listMultipartUploadsOperationsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.listMultipartUploadsOperationsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"listMultipartUploadsOperationsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.listMultipartUploadsOperationsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"listMultipartUploadsOperationsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"multipartUploadStartOperationsPerSecond\") {\n if (typeof this.multipartUploadStartOperationsPerSecond === 'undefined' || this.multipartUploadStartOperationsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"multipartUploadStartOperationsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.multipartUploadStartOperationsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"multipartUploadStartOperationsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.multipartUploadStartOperationsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"multipartUploadStartOperationsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"selectObjectContentOperationsPerSecond\") {\n if (typeof this.selectObjectContentOperationsPerSecond === 'undefined' || this.selectObjectContentOperationsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"selectObjectContentOperationsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.selectObjectContentOperationsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"selectObjectContentOperationsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.selectObjectContentOperationsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"selectObjectContentOperationsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"nfsReadRequestsPerSecond\") {\n if (typeof this.nfsReadRequestsPerSecond === 'undefined' || this.nfsReadRequestsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsReadRequestsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.nfsReadRequestsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsReadRequestsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.nfsReadRequestsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsReadRequestsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"nfsWriteRequestsPerSecond\") {\n if (typeof this.nfsWriteRequestsPerSecond === 'undefined' || this.nfsWriteRequestsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsWriteRequestsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.nfsWriteRequestsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsWriteRequestsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.nfsWriteRequestsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsWriteRequestsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"nfsReadThroughputBytesPerSecond\") {\n if (typeof this.nfsReadThroughputBytesPerSecond === 'undefined' || this.nfsReadThroughputBytesPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsReadThroughputBytesPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.nfsReadThroughputBytesPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsReadThroughputBytesPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.nfsReadThroughputBytesPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsReadThroughputBytesPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"nfsWriteThroughputBytesPerSecond\") {\n if (typeof this.nfsWriteThroughputBytesPerSecond === 'undefined' || this.nfsWriteThroughputBytesPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsWriteThroughputBytesPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.nfsWriteThroughputBytesPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsWriteThroughputBytesPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.nfsWriteThroughputBytesPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsWriteThroughputBytesPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * Number of Objects in the Object store. This stat is updated every 10 minutes. It includes the count of the incomplete multipart uploads. \n * @memberof ObjectstoreStats\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nObjectstoreStats.prototype.objectCount = undefined;\n\n/**\n * Number of Buckets in the Object store. This stat is updated every 10 minutes. \n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.bucketCount = undefined;\n\n/**\n * Total storage in bytes used by the Objects and Buckets. This stat is updated every 10 minutes. It includes the storage used by the incomplete multipart uploads. \n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.storageUsageBytes = undefined;\n\n/**\n * Number of bytes written per second to the Object store from operations on the Objects and Buckets.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.inboundBytesPerSecond = undefined;\n\n/**\n * Number of bytes read per second from the Object store from operations on the Objects and Buckets.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.outboundBytesPerSecond = undefined;\n\n/**\n * Throughput of HTTP GET requests in bytes per second.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.getRequestThroughputBytesPerSecond = undefined;\n\n/**\n * Throughput of HTTP PUT requests in bytes per second.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.putRequestThroughputBytesPerSecond = undefined;\n\n/**\n * Number of HTTP POST requests per second on the Objects and Buckets of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.postRequestsPerSecond = undefined;\n\n/**\n * Number of HTTP HEAD requests per second on the Objects and Buckets of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.headRequestsPerSecond = undefined;\n\n/**\n * Number of HTTP GET requests per second on the Objects and Buckets of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.getRequestsPerSecond = undefined;\n\n/**\n * Number of HTTP PUT requests per second on the Objects and Buckets of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.putRequestsPerSecond = undefined;\n\n/**\n * Number of HTTP DELETE requests per second on the Objects and Buckets of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.deleteRequestsPerSecond = undefined;\n\n/**\n * Number of operations per second on the objects of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.objectOperationsPerSecond = undefined;\n\n/**\n * Time to the first byte in milliseconds for Get Object requests.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.getObjectTtfbMsecs = undefined;\n\n/**\n * Number of GetBucket operations per second.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.getBucketOperationsPerSecond = undefined;\n\n/**\n * The number of ListMultipartUploads operations per second.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.listMultipartUploadsOperationsPerSecond = undefined;\n\n/**\n * The number of CreateMultipartUpload operations per second.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.multipartUploadStartOperationsPerSecond = undefined;\n\n/**\n * The number of SelectObjectContent operations per second.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.selectObjectContentOperationsPerSecond = undefined;\n\n/**\n * Number of Network File System (NFS) read requests per second on the objects of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.nfsReadRequestsPerSecond = undefined;\n\n/**\n * Number of Network File System (NFS) write requests per second on the objects of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.nfsWriteRequestsPerSecond = undefined;\n\n/**\n * Throughput of Network File System (NFS) read operations in bytes per second on the objects of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.nfsReadThroughputBytesPerSecond = undefined;\n\n/**\n * Throughput of Network File System (NFS) write operations in bytes per second on the objects of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.nfsWriteThroughputBytesPerSecond = undefined;\n\n/**\n * A globally unique identifier of an instance that is suitable for external consumption. \n * @memberof ObjectstoreStats\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_2__[\"default\"].prototype.extId = undefined;\n/**\n * A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @memberof ObjectstoreStats\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_2__[\"default\"].prototype.links = undefined;\n/**\n * 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). \n * @memberof ObjectstoreStats\n */\n_common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_0__[\"default\"].prototype.tenantId = undefined;\n// Implement OneOfobjects.v4.stats.GetObjectstoreStatsApiResponsedata interface:\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/stats/ObjectstoreStats.js?\n}");
|
|
661
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ObjectstoreStats)\n/* harmony export */ });\n/* harmony import */ var _common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/v1/config/TenantAwareModel */ \"./target/generated-sources/swagger/src/models/common/v1/config/TenantAwareModel.js\");\n/* harmony import */ var _common_v1_response_ApiLink__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/v1/response/ApiLink */ \"./target/generated-sources/swagger/src/models/common/v1/response/ApiLink.js\");\n/* harmony import */ var _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/v1/response/ExternalizableAbstractModel */ \"./target/generated-sources/swagger/src/models/common/v1/response/ExternalizableAbstractModel.js\");\n/* harmony import */ var _common_v1_stats_TimeIntValuePair__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/v1/stats/TimeIntValuePair */ \"./target/generated-sources/swagger/src/models/common/v1/stats/TimeIntValuePair.js\");\n/* harmony import */ var _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./TimeFloatValuePair */ \"./target/generated-sources/swagger/src/models/objects/v4/stats/TimeFloatValuePair.js\");\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n\n\n\n\n\n/**\n * The ObjectstoreStats model module.\n * @module Ntnx/ObjectstoreStats\n * @version 4.0.3\n * @class ObjectstoreStats\n * @extends ExternalizableAbstractModel\n */\nvar _ObjectstoreStats_brand = /*#__PURE__*/new WeakSet();\nclass ObjectstoreStats extends _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_2__[\"default\"] {\n /**\n * Constructs a new <code>ObjectstoreStats</code>.\n * @alias module:Ntnx/ObjectstoreStats\n * @extends module:Ntnx/ExternalizableAbstractModel\n */\n constructor() {\n super();\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _ObjectstoreStats_brand);\n this.$objectType = \"objects.v4.stats.ObjectstoreStats\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>ObjectstoreStats</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/ObjectstoreStats} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/ObjectstoreStats} The populated <code>ObjectstoreStats</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new ObjectstoreStats();\n _common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructFromObject(data, obj, true);\n if (data.hasOwnProperty('objectCount') && data.objectCount !== null && data.objectCount !== undefined) {\n itemArr = [];\n items = data.objectCount;\n for (i = 0; i < items.length; i++) {\n item = _common_v1_stats_TimeIntValuePair__WEBPACK_IMPORTED_MODULE_3__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setObjectCount(itemArr);\n }\n if (data.hasOwnProperty('bucketCount') && data.bucketCount !== null && data.bucketCount !== undefined) {\n itemArr = [];\n items = data.bucketCount;\n for (i = 0; i < items.length; i++) {\n item = _common_v1_stats_TimeIntValuePair__WEBPACK_IMPORTED_MODULE_3__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setBucketCount(itemArr);\n }\n if (data.hasOwnProperty('storageUsageBytes') && data.storageUsageBytes !== null && data.storageUsageBytes !== undefined) {\n itemArr = [];\n items = data.storageUsageBytes;\n for (i = 0; i < items.length; i++) {\n item = _common_v1_stats_TimeIntValuePair__WEBPACK_IMPORTED_MODULE_3__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setStorageUsageBytes(itemArr);\n }\n if (data.hasOwnProperty('inboundBytesPerSecond') && data.inboundBytesPerSecond !== null && data.inboundBytesPerSecond !== undefined) {\n itemArr = [];\n items = data.inboundBytesPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setInboundBytesPerSecond(itemArr);\n }\n if (data.hasOwnProperty('outboundBytesPerSecond') && data.outboundBytesPerSecond !== null && data.outboundBytesPerSecond !== undefined) {\n itemArr = [];\n items = data.outboundBytesPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setOutboundBytesPerSecond(itemArr);\n }\n if (data.hasOwnProperty('getRequestThroughputBytesPerSecond') && data.getRequestThroughputBytesPerSecond !== null && data.getRequestThroughputBytesPerSecond !== undefined) {\n itemArr = [];\n items = data.getRequestThroughputBytesPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setGetRequestThroughputBytesPerSecond(itemArr);\n }\n if (data.hasOwnProperty('putRequestThroughputBytesPerSecond') && data.putRequestThroughputBytesPerSecond !== null && data.putRequestThroughputBytesPerSecond !== undefined) {\n itemArr = [];\n items = data.putRequestThroughputBytesPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setPutRequestThroughputBytesPerSecond(itemArr);\n }\n if (data.hasOwnProperty('postRequestsPerSecond') && data.postRequestsPerSecond !== null && data.postRequestsPerSecond !== undefined) {\n itemArr = [];\n items = data.postRequestsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setPostRequestsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('headRequestsPerSecond') && data.headRequestsPerSecond !== null && data.headRequestsPerSecond !== undefined) {\n itemArr = [];\n items = data.headRequestsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setHeadRequestsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('getRequestsPerSecond') && data.getRequestsPerSecond !== null && data.getRequestsPerSecond !== undefined) {\n itemArr = [];\n items = data.getRequestsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setGetRequestsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('putRequestsPerSecond') && data.putRequestsPerSecond !== null && data.putRequestsPerSecond !== undefined) {\n itemArr = [];\n items = data.putRequestsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setPutRequestsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('deleteRequestsPerSecond') && data.deleteRequestsPerSecond !== null && data.deleteRequestsPerSecond !== undefined) {\n itemArr = [];\n items = data.deleteRequestsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setDeleteRequestsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('objectOperationsPerSecond') && data.objectOperationsPerSecond !== null && data.objectOperationsPerSecond !== undefined) {\n itemArr = [];\n items = data.objectOperationsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setObjectOperationsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('getObjectTtfbMsecs') && data.getObjectTtfbMsecs !== null && data.getObjectTtfbMsecs !== undefined) {\n itemArr = [];\n items = data.getObjectTtfbMsecs;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setGetObjectTtfbMsecs(itemArr);\n }\n if (data.hasOwnProperty('getBucketOperationsPerSecond') && data.getBucketOperationsPerSecond !== null && data.getBucketOperationsPerSecond !== undefined) {\n itemArr = [];\n items = data.getBucketOperationsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setGetBucketOperationsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('listMultipartUploadsOperationsPerSecond') && data.listMultipartUploadsOperationsPerSecond !== null && data.listMultipartUploadsOperationsPerSecond !== undefined) {\n itemArr = [];\n items = data.listMultipartUploadsOperationsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setListMultipartUploadsOperationsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('multipartUploadStartOperationsPerSecond') && data.multipartUploadStartOperationsPerSecond !== null && data.multipartUploadStartOperationsPerSecond !== undefined) {\n itemArr = [];\n items = data.multipartUploadStartOperationsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setMultipartUploadStartOperationsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('selectObjectContentOperationsPerSecond') && data.selectObjectContentOperationsPerSecond !== null && data.selectObjectContentOperationsPerSecond !== undefined) {\n itemArr = [];\n items = data.selectObjectContentOperationsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setSelectObjectContentOperationsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('nfsReadRequestsPerSecond') && data.nfsReadRequestsPerSecond !== null && data.nfsReadRequestsPerSecond !== undefined) {\n itemArr = [];\n items = data.nfsReadRequestsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setNfsReadRequestsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('nfsWriteRequestsPerSecond') && data.nfsWriteRequestsPerSecond !== null && data.nfsWriteRequestsPerSecond !== undefined) {\n itemArr = [];\n items = data.nfsWriteRequestsPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setNfsWriteRequestsPerSecond(itemArr);\n }\n if (data.hasOwnProperty('nfsReadThroughputBytesPerSecond') && data.nfsReadThroughputBytesPerSecond !== null && data.nfsReadThroughputBytesPerSecond !== undefined) {\n itemArr = [];\n items = data.nfsReadThroughputBytesPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setNfsReadThroughputBytesPerSecond(itemArr);\n }\n if (data.hasOwnProperty('nfsWriteThroughputBytesPerSecond') && data.nfsWriteThroughputBytesPerSecond !== null && data.nfsWriteThroughputBytesPerSecond !== undefined) {\n itemArr = [];\n items = data.nfsWriteThroughputBytesPerSecond;\n for (i = 0; i < items.length; i++) {\n item = _TimeFloatValuePair__WEBPACK_IMPORTED_MODULE_4__[\"default\"].constructFromObject(items[i], undefined);\n itemArr.push(item);\n }\n obj.setNfsWriteThroughputBytesPerSecond(itemArr);\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns Number of Objects in the Object store. This stat is updated every 10 minutes. It includes the count of the incomplete multipart uploads. \n * @return {TimeIntValuePair[]}\n */\n getObjectCount() {\n return this.objectCount;\n }\n\n /**\n * Sets Number of Objects in the Object store. This stat is updated every 10 minutes. It includes the count of the incomplete multipart uploads. \n * @param {TimeIntValuePair[]} objectCount Number of Objects in the Object store. This stat is updated every 10 minutes. It includes the count of the incomplete multipart uploads. \n */\n setObjectCount(objectCount) {\n this.objectCount = objectCount;\n }\n\n /**\n * Returns Number of Buckets in the Object store. This stat is updated every 10 minutes. \n * @return {TimeIntValuePair[]}\n */\n getBucketCount() {\n return this.bucketCount;\n }\n\n /**\n * Sets Number of Buckets in the Object store. This stat is updated every 10 minutes. \n * @param {TimeIntValuePair[]} bucketCount Number of Buckets in the Object store. This stat is updated every 10 minutes. \n */\n setBucketCount(bucketCount) {\n this.bucketCount = bucketCount;\n }\n\n /**\n * Returns Total storage in bytes used by the Objects and Buckets. This stat is updated every 10 minutes. It includes the storage used by the incomplete multipart uploads. \n * @return {TimeIntValuePair[]}\n */\n getStorageUsageBytes() {\n return this.storageUsageBytes;\n }\n\n /**\n * Sets Total storage in bytes used by the Objects and Buckets. This stat is updated every 10 minutes. It includes the storage used by the incomplete multipart uploads. \n * @param {TimeIntValuePair[]} storageUsageBytes Total storage in bytes used by the Objects and Buckets. This stat is updated every 10 minutes. It includes the storage used by the incomplete multipart uploads. \n */\n setStorageUsageBytes(storageUsageBytes) {\n this.storageUsageBytes = storageUsageBytes;\n }\n\n /**\n * Returns Number of bytes written per second to the Object store from operations on the Objects and Buckets.\n * @return {TimeFloatValuePair[]}\n */\n getInboundBytesPerSecond() {\n return this.inboundBytesPerSecond;\n }\n\n /**\n * Sets Number of bytes written per second to the Object store from operations on the Objects and Buckets.\n * @param {TimeFloatValuePair[]} inboundBytesPerSecond Number of bytes written per second to the Object store from operations on the Objects and Buckets.\n */\n setInboundBytesPerSecond(inboundBytesPerSecond) {\n this.inboundBytesPerSecond = inboundBytesPerSecond;\n }\n\n /**\n * Returns Number of bytes read per second from the Object store from operations on the Objects and Buckets.\n * @return {TimeFloatValuePair[]}\n */\n getOutboundBytesPerSecond() {\n return this.outboundBytesPerSecond;\n }\n\n /**\n * Sets Number of bytes read per second from the Object store from operations on the Objects and Buckets.\n * @param {TimeFloatValuePair[]} outboundBytesPerSecond Number of bytes read per second from the Object store from operations on the Objects and Buckets.\n */\n setOutboundBytesPerSecond(outboundBytesPerSecond) {\n this.outboundBytesPerSecond = outboundBytesPerSecond;\n }\n\n /**\n * Returns Throughput of HTTP GET requests in bytes per second.\n * @return {TimeFloatValuePair[]}\n */\n getGetRequestThroughputBytesPerSecond() {\n return this.getRequestThroughputBytesPerSecond;\n }\n\n /**\n * Sets Throughput of HTTP GET requests in bytes per second.\n * @param {TimeFloatValuePair[]} getRequestThroughputBytesPerSecond Throughput of HTTP GET requests in bytes per second.\n */\n setGetRequestThroughputBytesPerSecond(getRequestThroughputBytesPerSecond) {\n this.getRequestThroughputBytesPerSecond = getRequestThroughputBytesPerSecond;\n }\n\n /**\n * Returns Throughput of HTTP PUT requests in bytes per second.\n * @return {TimeFloatValuePair[]}\n */\n getPutRequestThroughputBytesPerSecond() {\n return this.putRequestThroughputBytesPerSecond;\n }\n\n /**\n * Sets Throughput of HTTP PUT requests in bytes per second.\n * @param {TimeFloatValuePair[]} putRequestThroughputBytesPerSecond Throughput of HTTP PUT requests in bytes per second.\n */\n setPutRequestThroughputBytesPerSecond(putRequestThroughputBytesPerSecond) {\n this.putRequestThroughputBytesPerSecond = putRequestThroughputBytesPerSecond;\n }\n\n /**\n * Returns Number of HTTP POST requests per second on the Objects and Buckets of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getPostRequestsPerSecond() {\n return this.postRequestsPerSecond;\n }\n\n /**\n * Sets Number of HTTP POST requests per second on the Objects and Buckets of the Object store.\n * @param {TimeFloatValuePair[]} postRequestsPerSecond Number of HTTP POST requests per second on the Objects and Buckets of the Object store.\n */\n setPostRequestsPerSecond(postRequestsPerSecond) {\n this.postRequestsPerSecond = postRequestsPerSecond;\n }\n\n /**\n * Returns Number of HTTP HEAD requests per second on the Objects and Buckets of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getHeadRequestsPerSecond() {\n return this.headRequestsPerSecond;\n }\n\n /**\n * Sets Number of HTTP HEAD requests per second on the Objects and Buckets of the Object store.\n * @param {TimeFloatValuePair[]} headRequestsPerSecond Number of HTTP HEAD requests per second on the Objects and Buckets of the Object store.\n */\n setHeadRequestsPerSecond(headRequestsPerSecond) {\n this.headRequestsPerSecond = headRequestsPerSecond;\n }\n\n /**\n * Returns Number of HTTP GET requests per second on the Objects and Buckets of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getGetRequestsPerSecond() {\n return this.getRequestsPerSecond;\n }\n\n /**\n * Sets Number of HTTP GET requests per second on the Objects and Buckets of the Object store.\n * @param {TimeFloatValuePair[]} getRequestsPerSecond Number of HTTP GET requests per second on the Objects and Buckets of the Object store.\n */\n setGetRequestsPerSecond(getRequestsPerSecond) {\n this.getRequestsPerSecond = getRequestsPerSecond;\n }\n\n /**\n * Returns Number of HTTP PUT requests per second on the Objects and Buckets of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getPutRequestsPerSecond() {\n return this.putRequestsPerSecond;\n }\n\n /**\n * Sets Number of HTTP PUT requests per second on the Objects and Buckets of the Object store.\n * @param {TimeFloatValuePair[]} putRequestsPerSecond Number of HTTP PUT requests per second on the Objects and Buckets of the Object store.\n */\n setPutRequestsPerSecond(putRequestsPerSecond) {\n this.putRequestsPerSecond = putRequestsPerSecond;\n }\n\n /**\n * Returns Number of HTTP DELETE requests per second on the Objects and Buckets of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getDeleteRequestsPerSecond() {\n return this.deleteRequestsPerSecond;\n }\n\n /**\n * Sets Number of HTTP DELETE requests per second on the Objects and Buckets of the Object store.\n * @param {TimeFloatValuePair[]} deleteRequestsPerSecond Number of HTTP DELETE requests per second on the Objects and Buckets of the Object store.\n */\n setDeleteRequestsPerSecond(deleteRequestsPerSecond) {\n this.deleteRequestsPerSecond = deleteRequestsPerSecond;\n }\n\n /**\n * Returns Number of operations per second on the objects of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getObjectOperationsPerSecond() {\n return this.objectOperationsPerSecond;\n }\n\n /**\n * Sets Number of operations per second on the objects of the Object store.\n * @param {TimeFloatValuePair[]} objectOperationsPerSecond Number of operations per second on the objects of the Object store.\n */\n setObjectOperationsPerSecond(objectOperationsPerSecond) {\n this.objectOperationsPerSecond = objectOperationsPerSecond;\n }\n\n /**\n * Returns Time to the first byte in milliseconds for Get Object requests.\n * @return {TimeFloatValuePair[]}\n */\n getGetObjectTtfbMsecs() {\n return this.getObjectTtfbMsecs;\n }\n\n /**\n * Sets Time to the first byte in milliseconds for Get Object requests.\n * @param {TimeFloatValuePair[]} getObjectTtfbMsecs Time to the first byte in milliseconds for Get Object requests.\n */\n setGetObjectTtfbMsecs(getObjectTtfbMsecs) {\n this.getObjectTtfbMsecs = getObjectTtfbMsecs;\n }\n\n /**\n * Returns Number of GetBucket operations per second.\n * @return {TimeFloatValuePair[]}\n */\n getGetBucketOperationsPerSecond() {\n return this.getBucketOperationsPerSecond;\n }\n\n /**\n * Sets Number of GetBucket operations per second.\n * @param {TimeFloatValuePair[]} getBucketOperationsPerSecond Number of GetBucket operations per second.\n */\n setGetBucketOperationsPerSecond(getBucketOperationsPerSecond) {\n this.getBucketOperationsPerSecond = getBucketOperationsPerSecond;\n }\n\n /**\n * Returns The number of ListMultipartUploads operations per second.\n * @return {TimeFloatValuePair[]}\n */\n getListMultipartUploadsOperationsPerSecond() {\n return this.listMultipartUploadsOperationsPerSecond;\n }\n\n /**\n * Sets The number of ListMultipartUploads operations per second.\n * @param {TimeFloatValuePair[]} listMultipartUploadsOperationsPerSecond The number of ListMultipartUploads operations per second.\n */\n setListMultipartUploadsOperationsPerSecond(listMultipartUploadsOperationsPerSecond) {\n this.listMultipartUploadsOperationsPerSecond = listMultipartUploadsOperationsPerSecond;\n }\n\n /**\n * Returns The number of CreateMultipartUpload operations per second.\n * @return {TimeFloatValuePair[]}\n */\n getMultipartUploadStartOperationsPerSecond() {\n return this.multipartUploadStartOperationsPerSecond;\n }\n\n /**\n * Sets The number of CreateMultipartUpload operations per second.\n * @param {TimeFloatValuePair[]} multipartUploadStartOperationsPerSecond The number of CreateMultipartUpload operations per second.\n */\n setMultipartUploadStartOperationsPerSecond(multipartUploadStartOperationsPerSecond) {\n this.multipartUploadStartOperationsPerSecond = multipartUploadStartOperationsPerSecond;\n }\n\n /**\n * Returns The number of SelectObjectContent operations per second.\n * @return {TimeFloatValuePair[]}\n */\n getSelectObjectContentOperationsPerSecond() {\n return this.selectObjectContentOperationsPerSecond;\n }\n\n /**\n * Sets The number of SelectObjectContent operations per second.\n * @param {TimeFloatValuePair[]} selectObjectContentOperationsPerSecond The number of SelectObjectContent operations per second.\n */\n setSelectObjectContentOperationsPerSecond(selectObjectContentOperationsPerSecond) {\n this.selectObjectContentOperationsPerSecond = selectObjectContentOperationsPerSecond;\n }\n\n /**\n * Returns Number of Network File System (NFS) read requests per second on the objects of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getNfsReadRequestsPerSecond() {\n return this.nfsReadRequestsPerSecond;\n }\n\n /**\n * Sets Number of Network File System (NFS) read requests per second on the objects of the Object store.\n * @param {TimeFloatValuePair[]} nfsReadRequestsPerSecond Number of Network File System (NFS) read requests per second on the objects of the Object store.\n */\n setNfsReadRequestsPerSecond(nfsReadRequestsPerSecond) {\n this.nfsReadRequestsPerSecond = nfsReadRequestsPerSecond;\n }\n\n /**\n * Returns Number of Network File System (NFS) write requests per second on the objects of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getNfsWriteRequestsPerSecond() {\n return this.nfsWriteRequestsPerSecond;\n }\n\n /**\n * Sets Number of Network File System (NFS) write requests per second on the objects of the Object store.\n * @param {TimeFloatValuePair[]} nfsWriteRequestsPerSecond Number of Network File System (NFS) write requests per second on the objects of the Object store.\n */\n setNfsWriteRequestsPerSecond(nfsWriteRequestsPerSecond) {\n this.nfsWriteRequestsPerSecond = nfsWriteRequestsPerSecond;\n }\n\n /**\n * Returns Throughput of Network File System (NFS) read operations in bytes per second on the objects of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getNfsReadThroughputBytesPerSecond() {\n return this.nfsReadThroughputBytesPerSecond;\n }\n\n /**\n * Sets Throughput of Network File System (NFS) read operations in bytes per second on the objects of the Object store.\n * @param {TimeFloatValuePair[]} nfsReadThroughputBytesPerSecond Throughput of Network File System (NFS) read operations in bytes per second on the objects of the Object store.\n */\n setNfsReadThroughputBytesPerSecond(nfsReadThroughputBytesPerSecond) {\n this.nfsReadThroughputBytesPerSecond = nfsReadThroughputBytesPerSecond;\n }\n\n /**\n * Returns Throughput of Network File System (NFS) write operations in bytes per second on the objects of the Object store.\n * @return {TimeFloatValuePair[]}\n */\n getNfsWriteThroughputBytesPerSecond() {\n return this.nfsWriteThroughputBytesPerSecond;\n }\n\n /**\n * Sets Throughput of Network File System (NFS) write operations in bytes per second on the objects of the Object store.\n * @param {TimeFloatValuePair[]} nfsWriteThroughputBytesPerSecond Throughput of Network File System (NFS) write operations in bytes per second on the objects of the Object store.\n */\n setNfsWriteThroughputBytesPerSecond(nfsWriteThroughputBytesPerSecond) {\n this.nfsWriteThroughputBytesPerSecond = nfsWriteThroughputBytesPerSecond;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getObjectCount() !== 'undefined' && this.getObjectCount() !== null ? {\n 'objectCount': this.getObjectCount().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getBucketCount() !== 'undefined' && this.getBucketCount() !== null ? {\n 'bucketCount': this.getBucketCount().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getStorageUsageBytes() !== 'undefined' && this.getStorageUsageBytes() !== null ? {\n 'storageUsageBytes': this.getStorageUsageBytes().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getInboundBytesPerSecond() !== 'undefined' && this.getInboundBytesPerSecond() !== null ? {\n 'inboundBytesPerSecond': this.getInboundBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getOutboundBytesPerSecond() !== 'undefined' && this.getOutboundBytesPerSecond() !== null ? {\n 'outboundBytesPerSecond': this.getOutboundBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetRequestThroughputBytesPerSecond() !== 'undefined' && this.getGetRequestThroughputBytesPerSecond() !== null ? {\n 'getRequestThroughputBytesPerSecond': this.getGetRequestThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getPutRequestThroughputBytesPerSecond() !== 'undefined' && this.getPutRequestThroughputBytesPerSecond() !== null ? {\n 'putRequestThroughputBytesPerSecond': this.getPutRequestThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getPostRequestsPerSecond() !== 'undefined' && this.getPostRequestsPerSecond() !== null ? {\n 'postRequestsPerSecond': this.getPostRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getHeadRequestsPerSecond() !== 'undefined' && this.getHeadRequestsPerSecond() !== null ? {\n 'headRequestsPerSecond': this.getHeadRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetRequestsPerSecond() !== 'undefined' && this.getGetRequestsPerSecond() !== null ? {\n 'getRequestsPerSecond': this.getGetRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getPutRequestsPerSecond() !== 'undefined' && this.getPutRequestsPerSecond() !== null ? {\n 'putRequestsPerSecond': this.getPutRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getDeleteRequestsPerSecond() !== 'undefined' && this.getDeleteRequestsPerSecond() !== null ? {\n 'deleteRequestsPerSecond': this.getDeleteRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getObjectOperationsPerSecond() !== 'undefined' && this.getObjectOperationsPerSecond() !== null ? {\n 'objectOperationsPerSecond': this.getObjectOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetObjectTtfbMsecs() !== 'undefined' && this.getGetObjectTtfbMsecs() !== null ? {\n 'getObjectTtfbMsecs': this.getGetObjectTtfbMsecs().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetBucketOperationsPerSecond() !== 'undefined' && this.getGetBucketOperationsPerSecond() !== null ? {\n 'getBucketOperationsPerSecond': this.getGetBucketOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getListMultipartUploadsOperationsPerSecond() !== 'undefined' && this.getListMultipartUploadsOperationsPerSecond() !== null ? {\n 'listMultipartUploadsOperationsPerSecond': this.getListMultipartUploadsOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getMultipartUploadStartOperationsPerSecond() !== 'undefined' && this.getMultipartUploadStartOperationsPerSecond() !== null ? {\n 'multipartUploadStartOperationsPerSecond': this.getMultipartUploadStartOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getSelectObjectContentOperationsPerSecond() !== 'undefined' && this.getSelectObjectContentOperationsPerSecond() !== null ? {\n 'selectObjectContentOperationsPerSecond': this.getSelectObjectContentOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsReadRequestsPerSecond() !== 'undefined' && this.getNfsReadRequestsPerSecond() !== null ? {\n 'nfsReadRequestsPerSecond': this.getNfsReadRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsWriteRequestsPerSecond() !== 'undefined' && this.getNfsWriteRequestsPerSecond() !== null ? {\n 'nfsWriteRequestsPerSecond': this.getNfsWriteRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsReadThroughputBytesPerSecond() !== 'undefined' && this.getNfsReadThroughputBytesPerSecond() !== null ? {\n 'nfsReadThroughputBytesPerSecond': this.getNfsReadThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsWriteThroughputBytesPerSecond() !== 'undefined' && this.getNfsWriteThroughputBytesPerSecond() !== null ? {\n 'nfsWriteThroughputBytesPerSecond': this.getNfsWriteThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {\n 'extId': this.getExtId()\n } : {}),\n ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {\n 'links': this.getLinks().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {\n 'tenantId': this.getTenantId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getObjectCount() !== 'undefined' && this.getObjectCount() !== null ? {\n 'objectCount': this.getObjectCount().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getBucketCount() !== 'undefined' && this.getBucketCount() !== null ? {\n 'bucketCount': this.getBucketCount().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getStorageUsageBytes() !== 'undefined' && this.getStorageUsageBytes() !== null ? {\n 'storageUsageBytes': this.getStorageUsageBytes().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getInboundBytesPerSecond() !== 'undefined' && this.getInboundBytesPerSecond() !== null ? {\n 'inboundBytesPerSecond': this.getInboundBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getOutboundBytesPerSecond() !== 'undefined' && this.getOutboundBytesPerSecond() !== null ? {\n 'outboundBytesPerSecond': this.getOutboundBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetRequestThroughputBytesPerSecond() !== 'undefined' && this.getGetRequestThroughputBytesPerSecond() !== null ? {\n 'getRequestThroughputBytesPerSecond': this.getGetRequestThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getPutRequestThroughputBytesPerSecond() !== 'undefined' && this.getPutRequestThroughputBytesPerSecond() !== null ? {\n 'putRequestThroughputBytesPerSecond': this.getPutRequestThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getPostRequestsPerSecond() !== 'undefined' && this.getPostRequestsPerSecond() !== null ? {\n 'postRequestsPerSecond': this.getPostRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getHeadRequestsPerSecond() !== 'undefined' && this.getHeadRequestsPerSecond() !== null ? {\n 'headRequestsPerSecond': this.getHeadRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetRequestsPerSecond() !== 'undefined' && this.getGetRequestsPerSecond() !== null ? {\n 'getRequestsPerSecond': this.getGetRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getPutRequestsPerSecond() !== 'undefined' && this.getPutRequestsPerSecond() !== null ? {\n 'putRequestsPerSecond': this.getPutRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getDeleteRequestsPerSecond() !== 'undefined' && this.getDeleteRequestsPerSecond() !== null ? {\n 'deleteRequestsPerSecond': this.getDeleteRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getObjectOperationsPerSecond() !== 'undefined' && this.getObjectOperationsPerSecond() !== null ? {\n 'objectOperationsPerSecond': this.getObjectOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetObjectTtfbMsecs() !== 'undefined' && this.getGetObjectTtfbMsecs() !== null ? {\n 'getObjectTtfbMsecs': this.getGetObjectTtfbMsecs().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getGetBucketOperationsPerSecond() !== 'undefined' && this.getGetBucketOperationsPerSecond() !== null ? {\n 'getBucketOperationsPerSecond': this.getGetBucketOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getListMultipartUploadsOperationsPerSecond() !== 'undefined' && this.getListMultipartUploadsOperationsPerSecond() !== null ? {\n 'listMultipartUploadsOperationsPerSecond': this.getListMultipartUploadsOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getMultipartUploadStartOperationsPerSecond() !== 'undefined' && this.getMultipartUploadStartOperationsPerSecond() !== null ? {\n 'multipartUploadStartOperationsPerSecond': this.getMultipartUploadStartOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getSelectObjectContentOperationsPerSecond() !== 'undefined' && this.getSelectObjectContentOperationsPerSecond() !== null ? {\n 'selectObjectContentOperationsPerSecond': this.getSelectObjectContentOperationsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsReadRequestsPerSecond() !== 'undefined' && this.getNfsReadRequestsPerSecond() !== null ? {\n 'nfsReadRequestsPerSecond': this.getNfsReadRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsWriteRequestsPerSecond() !== 'undefined' && this.getNfsWriteRequestsPerSecond() !== null ? {\n 'nfsWriteRequestsPerSecond': this.getNfsWriteRequestsPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsReadThroughputBytesPerSecond() !== 'undefined' && this.getNfsReadThroughputBytesPerSecond() !== null ? {\n 'nfsReadThroughputBytesPerSecond': this.getNfsReadThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n ...(typeof this.getNfsWriteThroughputBytesPerSecond() !== 'undefined' && this.getNfsWriteThroughputBytesPerSecond() !== null ? {\n 'nfsWriteThroughputBytesPerSecond': this.getNfsWriteThroughputBytesPerSecond().map(item => item.toJson(false))\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_5__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"objectCount\") {\n if (typeof this.objectCount === 'undefined' || this.objectCount === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"objectCount\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.objectCount, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"objectCount\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.objectCount, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"objectCount\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"bucketCount\") {\n if (typeof this.bucketCount === 'undefined' || this.bucketCount === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"bucketCount\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.bucketCount, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"bucketCount\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.bucketCount, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"bucketCount\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"storageUsageBytes\") {\n if (typeof this.storageUsageBytes === 'undefined' || this.storageUsageBytes === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"storageUsageBytes\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.storageUsageBytes, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"storageUsageBytes\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.storageUsageBytes, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"storageUsageBytes\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"inboundBytesPerSecond\") {\n if (typeof this.inboundBytesPerSecond === 'undefined' || this.inboundBytesPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"inboundBytesPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.inboundBytesPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"inboundBytesPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.inboundBytesPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"inboundBytesPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"outboundBytesPerSecond\") {\n if (typeof this.outboundBytesPerSecond === 'undefined' || this.outboundBytesPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"outboundBytesPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.outboundBytesPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"outboundBytesPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.outboundBytesPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"outboundBytesPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"getRequestThroughputBytesPerSecond\") {\n if (typeof this.getRequestThroughputBytesPerSecond === 'undefined' || this.getRequestThroughputBytesPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getRequestThroughputBytesPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.getRequestThroughputBytesPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getRequestThroughputBytesPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.getRequestThroughputBytesPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getRequestThroughputBytesPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"putRequestThroughputBytesPerSecond\") {\n if (typeof this.putRequestThroughputBytesPerSecond === 'undefined' || this.putRequestThroughputBytesPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"putRequestThroughputBytesPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.putRequestThroughputBytesPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"putRequestThroughputBytesPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.putRequestThroughputBytesPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"putRequestThroughputBytesPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"postRequestsPerSecond\") {\n if (typeof this.postRequestsPerSecond === 'undefined' || this.postRequestsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"postRequestsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.postRequestsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"postRequestsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.postRequestsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"postRequestsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"headRequestsPerSecond\") {\n if (typeof this.headRequestsPerSecond === 'undefined' || this.headRequestsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"headRequestsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.headRequestsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"headRequestsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.headRequestsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"headRequestsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"getRequestsPerSecond\") {\n if (typeof this.getRequestsPerSecond === 'undefined' || this.getRequestsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getRequestsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.getRequestsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getRequestsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.getRequestsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getRequestsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"putRequestsPerSecond\") {\n if (typeof this.putRequestsPerSecond === 'undefined' || this.putRequestsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"putRequestsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.putRequestsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"putRequestsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.putRequestsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"putRequestsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"deleteRequestsPerSecond\") {\n if (typeof this.deleteRequestsPerSecond === 'undefined' || this.deleteRequestsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"deleteRequestsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.deleteRequestsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"deleteRequestsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.deleteRequestsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"deleteRequestsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"objectOperationsPerSecond\") {\n if (typeof this.objectOperationsPerSecond === 'undefined' || this.objectOperationsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"objectOperationsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.objectOperationsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"objectOperationsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.objectOperationsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"objectOperationsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"getObjectTtfbMsecs\") {\n if (typeof this.getObjectTtfbMsecs === 'undefined' || this.getObjectTtfbMsecs === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getObjectTtfbMsecs\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.getObjectTtfbMsecs, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getObjectTtfbMsecs\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.getObjectTtfbMsecs, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getObjectTtfbMsecs\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"getBucketOperationsPerSecond\") {\n if (typeof this.getBucketOperationsPerSecond === 'undefined' || this.getBucketOperationsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getBucketOperationsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.getBucketOperationsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getBucketOperationsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.getBucketOperationsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"getBucketOperationsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"listMultipartUploadsOperationsPerSecond\") {\n if (typeof this.listMultipartUploadsOperationsPerSecond === 'undefined' || this.listMultipartUploadsOperationsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"listMultipartUploadsOperationsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.listMultipartUploadsOperationsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"listMultipartUploadsOperationsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.listMultipartUploadsOperationsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"listMultipartUploadsOperationsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"multipartUploadStartOperationsPerSecond\") {\n if (typeof this.multipartUploadStartOperationsPerSecond === 'undefined' || this.multipartUploadStartOperationsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"multipartUploadStartOperationsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.multipartUploadStartOperationsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"multipartUploadStartOperationsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.multipartUploadStartOperationsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"multipartUploadStartOperationsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"selectObjectContentOperationsPerSecond\") {\n if (typeof this.selectObjectContentOperationsPerSecond === 'undefined' || this.selectObjectContentOperationsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"selectObjectContentOperationsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.selectObjectContentOperationsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"selectObjectContentOperationsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.selectObjectContentOperationsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"selectObjectContentOperationsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"nfsReadRequestsPerSecond\") {\n if (typeof this.nfsReadRequestsPerSecond === 'undefined' || this.nfsReadRequestsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsReadRequestsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.nfsReadRequestsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsReadRequestsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.nfsReadRequestsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsReadRequestsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"nfsWriteRequestsPerSecond\") {\n if (typeof this.nfsWriteRequestsPerSecond === 'undefined' || this.nfsWriteRequestsPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsWriteRequestsPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.nfsWriteRequestsPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsWriteRequestsPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.nfsWriteRequestsPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsWriteRequestsPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"nfsReadThroughputBytesPerSecond\") {\n if (typeof this.nfsReadThroughputBytesPerSecond === 'undefined' || this.nfsReadThroughputBytesPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsReadThroughputBytesPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.nfsReadThroughputBytesPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsReadThroughputBytesPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.nfsReadThroughputBytesPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsReadThroughputBytesPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n if (property === \"nfsWriteThroughputBytesPerSecond\") {\n if (typeof this.nfsWriteThroughputBytesPerSecond === 'undefined' || this.nfsWriteThroughputBytesPerSecond === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsWriteThroughputBytesPerSecond\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMaxItems(this.nfsWriteThroughputBytesPerSecond, 150)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsWriteThroughputBytesPerSecond\", \"does not satisfy required maxItems constraint: 150\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].validateMinItems(this.nfsWriteThroughputBytesPerSecond, 1)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\"nfsWriteThroughputBytesPerSecond\", \"does not satisfy required minItems constraint: 1\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_7__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * Number of Objects in the Object store. This stat is updated every 10 minutes. It includes the count of the incomplete multipart uploads. \n * @memberof ObjectstoreStats\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nObjectstoreStats.prototype.objectCount = undefined;\n\n/**\n * Number of Buckets in the Object store. This stat is updated every 10 minutes. \n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.bucketCount = undefined;\n\n/**\n * Total storage in bytes used by the Objects and Buckets. This stat is updated every 10 minutes. It includes the storage used by the incomplete multipart uploads. \n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.storageUsageBytes = undefined;\n\n/**\n * Number of bytes written per second to the Object store from operations on the Objects and Buckets.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.inboundBytesPerSecond = undefined;\n\n/**\n * Number of bytes read per second from the Object store from operations on the Objects and Buckets.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.outboundBytesPerSecond = undefined;\n\n/**\n * Throughput of HTTP GET requests in bytes per second.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.getRequestThroughputBytesPerSecond = undefined;\n\n/**\n * Throughput of HTTP PUT requests in bytes per second.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.putRequestThroughputBytesPerSecond = undefined;\n\n/**\n * Number of HTTP POST requests per second on the Objects and Buckets of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.postRequestsPerSecond = undefined;\n\n/**\n * Number of HTTP HEAD requests per second on the Objects and Buckets of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.headRequestsPerSecond = undefined;\n\n/**\n * Number of HTTP GET requests per second on the Objects and Buckets of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.getRequestsPerSecond = undefined;\n\n/**\n * Number of HTTP PUT requests per second on the Objects and Buckets of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.putRequestsPerSecond = undefined;\n\n/**\n * Number of HTTP DELETE requests per second on the Objects and Buckets of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.deleteRequestsPerSecond = undefined;\n\n/**\n * Number of operations per second on the objects of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.objectOperationsPerSecond = undefined;\n\n/**\n * Time to the first byte in milliseconds for Get Object requests.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.getObjectTtfbMsecs = undefined;\n\n/**\n * Number of GetBucket operations per second.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.getBucketOperationsPerSecond = undefined;\n\n/**\n * The number of ListMultipartUploads operations per second.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.listMultipartUploadsOperationsPerSecond = undefined;\n\n/**\n * The number of CreateMultipartUpload operations per second.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.multipartUploadStartOperationsPerSecond = undefined;\n\n/**\n * The number of SelectObjectContent operations per second.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.selectObjectContentOperationsPerSecond = undefined;\n\n/**\n * Number of Network File System (NFS) read requests per second on the objects of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.nfsReadRequestsPerSecond = undefined;\n\n/**\n * Number of Network File System (NFS) write requests per second on the objects of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.nfsWriteRequestsPerSecond = undefined;\n\n/**\n * Throughput of Network File System (NFS) read operations in bytes per second on the objects of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.nfsReadThroughputBytesPerSecond = undefined;\n\n/**\n * Throughput of Network File System (NFS) write operations in bytes per second on the objects of the Object store.\n * @memberof ObjectstoreStats\n */\nObjectstoreStats.prototype.nfsWriteThroughputBytesPerSecond = undefined;\n\n/**\n * A globally unique identifier of an instance that is suitable for external consumption. \n * @memberof ObjectstoreStats\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_2__[\"default\"].prototype.extId = undefined;\n/**\n * A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. \n * @memberof ObjectstoreStats\n */\n_common_v1_response_ExternalizableAbstractModel__WEBPACK_IMPORTED_MODULE_2__[\"default\"].prototype.links = undefined;\n/**\n * 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). \n * @memberof ObjectstoreStats\n */\n_common_v1_config_TenantAwareModel__WEBPACK_IMPORTED_MODULE_0__[\"default\"].prototype.tenantId = undefined;\n// Implement OneOfobjects.v4.stats.GetObjectstoreStatsApiResponsedata interface:\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/stats/ObjectstoreStats.js?\n}");
|
|
662
662
|
|
|
663
663
|
/***/ },
|
|
664
664
|
|
|
@@ -669,7 +669,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
669
669
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
670
670
|
|
|
671
671
|
"use strict";
|
|
672
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ TimeFloatValuePair)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The TimeFloatValuePair model module.\n * @module Ntnx/TimeFloatValuePair\n * @version 4.0.2\n * @class TimeFloatValuePair\n */\nvar _TimeFloatValuePair_brand = /*#__PURE__*/new WeakSet();\nclass TimeFloatValuePair {\n /**\n * Constructs a new <code>TimeFloatValuePair</code>.\n * A time value pair representing a stat associated with a given entity at a given point of date and time represented in extended ISO-8601 format.\n * @alias module:Ntnx/TimeFloatValuePair\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _TimeFloatValuePair_brand);\n this.$objectType = \"objects.v4.stats.TimeFloatValuePair\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>TimeFloatValuePair</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/TimeFloatValuePair} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/TimeFloatValuePair} The populated <code>TimeFloatValuePair</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new TimeFloatValuePair();\n if (data.hasOwnProperty('value') && data.value !== null && data.value !== undefined) {\n obj.setValue(data['value']);\n }\n if (data.hasOwnProperty('timestamp') && data.timestamp !== null && data.timestamp !== undefined) {\n obj.setTimestamp(data['timestamp']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns Value of the stat at the recorded date and time in extended ISO-8601 format.\n * @return {Number}\n */\n getValue() {\n return this.value;\n }\n\n /**\n * Sets Value of the stat at the recorded date and time in extended ISO-8601 format.\n * @param {Number} value Value of the stat at the recorded date and time in extended ISO-8601 format.\n */\n setValue(value) {\n this.value = value;\n }\n\n /**\n * Returns The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n * @return {Date}\n */\n getTimestamp() {\n return this.timestamp;\n }\n\n /**\n * Sets The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n * @param {Date} timestamp The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n */\n setTimestamp(timestamp) {\n this.timestamp = timestamp;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getTimestamp() !== 'undefined' && this.getTimestamp() !== null ? {\n 'timestamp': _assertClassBrand(_TimeFloatValuePair_brand, this, _handleDateType).call(this, this.getTimestamp(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getTimestamp() !== 'undefined' && this.getTimestamp() !== null ? {\n 'timestamp': _assertClassBrand(_TimeFloatValuePair_brand, this, _handleDateType).call(this, this.getTimestamp(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"value\") {\n if (typeof this.value === 'undefined' || this.value === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"undefined or null\");\n }\n }\n if (property === \"timestamp\") {\n if (typeof this.timestamp === 'undefined' || this.timestamp === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"timestamp\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * Value of the stat at the recorded date and time in extended ISO-8601 format.\n * @memberof TimeFloatValuePair\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nTimeFloatValuePair.prototype.value = undefined;\n\n/**\n * The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n * @memberof TimeFloatValuePair\n */\nTimeFloatValuePair.prototype.timestamp = undefined;\nTimeFloatValuePair.prototype.$reserved = undefined;\nTimeFloatValuePair.prototype.$objectType = undefined;\nTimeFloatValuePair.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/stats/TimeFloatValuePair.js?\n}");
|
|
672
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ TimeFloatValuePair)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\nfunction _assertClassBrand(e, t, n) { if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError(\"Private element is not present on this object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The TimeFloatValuePair model module.\n * @module Ntnx/TimeFloatValuePair\n * @version 4.0.3\n * @class TimeFloatValuePair\n */\nvar _TimeFloatValuePair_brand = /*#__PURE__*/new WeakSet();\nclass TimeFloatValuePair {\n /**\n * Constructs a new <code>TimeFloatValuePair</code>.\n * A time value pair representing a stat associated with a given entity at a given point of date and time represented in extended ISO-8601 format.\n * @alias module:Ntnx/TimeFloatValuePair\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _TimeFloatValuePair_brand);\n this.$objectType = \"objects.v4.stats.TimeFloatValuePair\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r0\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>TimeFloatValuePair</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/TimeFloatValuePair} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/TimeFloatValuePair} The populated <code>TimeFloatValuePair</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new TimeFloatValuePair();\n if (data.hasOwnProperty('value') && data.value !== null && data.value !== undefined) {\n obj.setValue(data['value']);\n }\n if (data.hasOwnProperty('timestamp') && data.timestamp !== null && data.timestamp !== undefined) {\n obj.setTimestamp(data['timestamp']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns Value of the stat at the recorded date and time in extended ISO-8601 format.\n * @return {Number}\n */\n getValue() {\n return this.value;\n }\n\n /**\n * Sets Value of the stat at the recorded date and time in extended ISO-8601 format.\n * @param {Number} value Value of the stat at the recorded date and time in extended ISO-8601 format.\n */\n setValue(value) {\n this.value = value;\n }\n\n /**\n * Returns The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n * @return {Date}\n */\n getTimestamp() {\n return this.timestamp;\n }\n\n /**\n * Sets The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n * @param {Date} timestamp The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n */\n setTimestamp(timestamp) {\n this.timestamp = timestamp;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getTimestamp() !== 'undefined' && this.getTimestamp() !== null ? {\n 'timestamp': _assertClassBrand(_TimeFloatValuePair_brand, this, _handleDateType).call(this, this.getTimestamp(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {\n 'value': this.getValue()\n } : {}),\n ...(typeof this.getTimestamp() !== 'undefined' && this.getTimestamp() !== null ? {\n 'timestamp': _assertClassBrand(_TimeFloatValuePair_brand, this, _handleDateType).call(this, this.getTimestamp(), false)\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"value\") {\n if (typeof this.value === 'undefined' || this.value === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"value\", \"undefined or null\");\n }\n }\n if (property === \"timestamp\") {\n if (typeof this.timestamp === 'undefined' || this.timestamp === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"timestamp\", \"undefined or null\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * Value of the stat at the recorded date and time in extended ISO-8601 format.\n * @memberof TimeFloatValuePair\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nTimeFloatValuePair.prototype.value = undefined;\n\n/**\n * The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html\n * @memberof TimeFloatValuePair\n */\nTimeFloatValuePair.prototype.timestamp = undefined;\nTimeFloatValuePair.prototype.$reserved = undefined;\nTimeFloatValuePair.prototype.$objectType = undefined;\nTimeFloatValuePair.prototype.$unknownFields = undefined;\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/objects/v4/stats/TimeFloatValuePair.js?\n}");
|
|
673
673
|
|
|
674
674
|
/***/ },
|
|
675
675
|
|
|
@@ -680,7 +680,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
680
680
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
681
681
|
|
|
682
682
|
"use strict";
|
|
683
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ TaskReference)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.2\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The TaskReference model module.\n * @module Ntnx/TaskReference\n * @version 4.0.2\n * @class TaskReference\n */\nvar _TaskReference_brand = /*#__PURE__*/new WeakSet();\nclass TaskReference {\n /**\n * Constructs a new <code>TaskReference</code>.\n * A reference to a task tracking an asynchronous operation. The status of the task can be queried by making a GET request to the task URI provided in the metadata section of the API response.\n * @alias module:Ntnx/TaskReference\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _TaskReference_brand);\n this.$objectType = \"prism.v4.config.TaskReference\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r2\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>TaskReference</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/TaskReference} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/TaskReference} The populated <code>TaskReference</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new TaskReference();\n if (data.hasOwnProperty('extId') && data.extId !== null && data.extId !== undefined) {\n obj.setExtId(data['extId']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns A globally unique identifier for a task.\n * @return {string}\n */\n getExtId() {\n return this.extId;\n }\n\n /**\n * Sets A globally unique identifier for a task.\n * @param {string} extId A globally unique identifier for a task.\n */\n setExtId(extId) {\n this.extId = extId;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {\n 'extId': this.getExtId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {\n 'extId': this.getExtId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"extId\") {\n if (typeof this.extId === 'undefined' || this.extId === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"extId\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validatePattern(this.extId, /^[a-zA-Z0-9\\/+]*={0,2}:[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}/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"extId\", \"does not satisfy required pattern: /^[a-zA-Z0-9\\/+]*={0,2}:[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}/\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * A globally unique identifier for a task.\n * @memberof TaskReference\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nTaskReference.prototype.extId = undefined;\nTaskReference.prototype.$reserved = undefined;\nTaskReference.prototype.$objectType = undefined;\nTaskReference.prototype.$unknownFields = undefined;\n\n// Implement OneOfobjects.v4.config.CreateCertificateApiResponsedata interface:\n// Implement OneOfobjects.v4.config.CreateObjectstoreApiResponsedata interface:\n// Implement OneOfobjects.v4.config.DeleteObjectstoreApiResponsedata interface:\n// Implement OneOfobjects.v4.config.UpdateObjectstoreApiResponsedata interface:\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/prism/v4/config/TaskReference.js?\n}");
|
|
683
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ TaskReference)\n/* harmony export */ });\n/* harmony import */ var _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../validation/ValidationScopes */ \"./target/generated-sources/swagger/src/models/validation/ValidationScopes.js\");\n/* harmony import */ var _utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils/ValidationUtils */ \"./target/generated-sources/swagger/src/utils/ValidationUtils.js\");\n/* harmony import */ var _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../validation/ValidationError */ \"./target/generated-sources/swagger/src/models/validation/ValidationError.js\");\nfunction _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }\nfunction _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); }\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\n\n\n\n/**\n * The TaskReference model module.\n * @module Ntnx/TaskReference\n * @version 4.0.3\n * @class TaskReference\n */\nvar _TaskReference_brand = /*#__PURE__*/new WeakSet();\nclass TaskReference {\n /**\n * Constructs a new <code>TaskReference</code>.\n * A reference to a task tracking an asynchronous operation. The status of the task can be queried by making a GET request to the task URI provided in the metadata section of the API response.\n * @alias module:Ntnx/TaskReference\n */\n constructor() {\n /*\n * toJson method for a map type which supports map with primitive keys and values of object types\n * @param {Object} obj\n * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.\n * Otherwise, just returns the input object.\n */\n _classPrivateMethodInitSpec(this, _TaskReference_brand);\n this.$objectType = \"prism.v4.config.TaskReference\";\n /** @type {object<string, any>} */\n this.$reserved = {\n '$fv': \"v4.r3\"\n };\n /** @type {object<string, any>} */\n this.$unknownFields = {};\n }\n\n /**\n * Constructs a <code>TaskReference</code> from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:Ntnx/TaskReference} obj Optional instance to populate.\n * @param callFromChild {Boolean} Flag to recognise calling instance\n * @return {module:Ntnx/TaskReference} The populated <code>TaskReference</code> instance.\n */\n static constructFromObject(data, obj = null, callFromChild = false) {\n let items, item, i, itemArr, discriminator;\n if (data) {\n obj = obj || new TaskReference();\n if (data.hasOwnProperty('extId') && data.extId !== null && data.extId !== undefined) {\n obj.setExtId(data['extId']);\n }\n if (data.hasOwnProperty('$reserved')) {\n obj.$reserved = data['$reserved'];\n }\n if (data.hasOwnProperty('$objectType')) {\n obj.$objectType = data['$objectType'];\n }\n if (data.hasOwnProperty('$unknownFields')) {\n obj.$unknownFields = data['$unknownFields'];\n }\n if (!callFromChild) {\n obj.$unknownFields = {\n ...data.$unknownFields\n };\n for (const property in data) {\n // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,\n // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).\n // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.\n // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.\n if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === \"$\" && property.endsWith(\"ItemDiscriminator\"))) {\n obj.$unknownFields[property] = data[property];\n }\n }\n }\n }\n return obj;\n }\n\n /**\n * Converts a given snake_case string to camelCase.\n * @param {string} snakeStr - The input string in snake_case format.\n * @returns {string} - The converted string in camelCase format.\n */\n static snakeToCamel(snakeStr) {\n return snakeStr.replace(/(_\\w)/g, match => match[1].toUpperCase());\n }\n\n /**\n * Returns A globally unique identifier for a task.\n * @return {string}\n */\n getExtId() {\n return this.extId;\n }\n\n /**\n * Sets A globally unique identifier for a task.\n * @param {string} extId A globally unique identifier for a task.\n */\n setExtId(extId) {\n this.extId = extId;\n }\n get$Reserved() {\n return this.$reserved;\n }\n get$ObjectType() {\n return this.$objectType;\n }\n get$UnknownFields() {\n return this.$unknownFields;\n }\n toJson(forMutation) {\n if (forMutation === false) {\n return {\n ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {\n 'extId': this.getExtId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n return {\n ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {\n 'extId': this.getExtId()\n } : {}),\n '$reserved': this.get$Reserved(),\n '$objectType': this.get$ObjectType(),\n ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),\n '$unknownFields': {}\n };\n }\n validate(scope, properties) {\n let propList = [];\n if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _validation_ValidationScopes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n //cases validate() and validate(scope)\n propList = [];\n } else if (arguments.length === 1) {\n //case validate(properties)\n propList = arguments[0];\n scope = null;\n } else {\n //case validate(scope, properties)\n propList = arguments[1];\n }\n let res = [];\n let err = null;\n propList.forEach(property => {\n err = this.validateProperty(property, scope);\n if (err) {\n res.push(err);\n }\n });\n return new Promise(function (resolve, reject) {\n if (res.length !== 0) {\n reject(err);\n } else {\n resolve();\n }\n });\n }\n validateProperty(scope, property) {\n if (property === \"extId\") {\n if (typeof this.extId === 'undefined' || this.extId === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"extId\", \"undefined or null\");\n }\n if (!_utils_ValidationUtils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].validatePattern(this.extId, /^[a-zA-Z0-9\\/+]*={0,2}:[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}/)) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"extId\", \"does not satisfy required pattern: /^[a-zA-Z0-9\\/+]*={0,2}:[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}/\");\n }\n }\n if (property === \"$reserved\") {\n if (typeof this.$reserved === 'undefined' || this.$reserved === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$reserved\", \"undefined or null\");\n }\n }\n if (property === \"$objectType\") {\n if (typeof this.$objectType === 'undefined' || this.$objectType === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$objectType\", \"undefined or null\");\n }\n }\n if (property === \"$unknownFields\") {\n if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](\"$unknownFields\", \"undefined or null\");\n }\n }\n return new _validation_ValidationError__WEBPACK_IMPORTED_MODULE_2__[\"default\"](property, \"no such property exists\");\n }\n}\n\n/**\n * A globally unique identifier for a task.\n * @memberof TaskReference\n */\nfunction _toJsonMapType(obj, forMutation) {\n if (obj instanceof Map) {\n return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== \"undefined\" ? v.toJson(forMutation) : v]));\n } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {\n return Object.fromEntries(Array.from(Object.entries(obj), entry => {\n return [entry[0], typeof entry[1].toJson !== \"undefined\" ? entry[1].toJson(forMutation) : entry[1]];\n }));\n }\n return obj;\n}\n/*\n* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting\n* @param {Object} obj Object to serialize\n* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization\n* @returns {Object|string} Returns serialized date object or original input object\n*/\nfunction _handleDateType(obj, isDateOnly) {\n if (obj instanceof Date && isDateOnly !== undefined) {\n return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();\n }\n return obj;\n}\nTaskReference.prototype.extId = undefined;\nTaskReference.prototype.$reserved = undefined;\nTaskReference.prototype.$objectType = undefined;\nTaskReference.prototype.$unknownFields = undefined;\n\n// Implement OneOfobjects.v4.config.CreateCertificateApiResponsedata interface:\n// Implement OneOfobjects.v4.config.CreateObjectstoreApiResponsedata interface:\n// Implement OneOfobjects.v4.config.DeleteObjectstoreApiResponsedata interface:\n// Implement OneOfobjects.v4.config.UpdateObjectstoreApiResponsedata interface:\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/prism/v4/config/TaskReference.js?\n}");
|
|
684
684
|
|
|
685
685
|
/***/ },
|
|
686
686
|
|
|
@@ -691,7 +691,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
691
691
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
692
692
|
|
|
693
693
|
"use strict";
|
|
694
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ValidationError)\n/* harmony export */ });\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.
|
|
694
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ValidationError)\n/* harmony export */ });\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\nclass ValidationError {\n constructor(name, message) {\n this.name = name;\n this.message = message;\n }\n getName() {\n return this.name;\n }\n setName(name) {\n this.name = name;\n }\n getMessage() {\n return this.message;\n }\n setMessage(message) {\n this.message = message;\n }\n toJson() {\n return {\n 'name': this.getName(),\n 'message': this.getMessage()\n };\n }\n}\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/models/validation/ValidationError.js?\n}");
|
|
695
695
|
|
|
696
696
|
/***/ },
|
|
697
697
|
|
|
@@ -713,7 +713,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
713
713
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
714
714
|
|
|
715
715
|
"use strict";
|
|
716
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ValidationUtils)\n/* harmony export */ });\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.
|
|
716
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ValidationUtils)\n/* harmony export */ });\n/*\n * Nutanix Objects Storage Management APIs\n *\n * OpenAPI spec version: 4.0.3\n *\n * NOTE: This class is auto generated by the Open API Dev Platform.\n *\n * Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE\n *\n * Do not edit the class manually.\n *\n */\n\nclass ValidationUtils {\n static validateMaximum(value, maximum) {\n return !(maximum === null || value > maximum);\n }\n static validateMinimum(value, minimum) {\n return !(minimum === null || value < minimum);\n }\n static validateExclusiveMaximum(value, eMaximum) {\n return !(eMaximum === null || value > eMaximum);\n }\n static validateExclusiveMinimum(value, eMinimum) {\n return !(eMinimum === null || value > eMinimum);\n }\n static validateMultipleOf(value, multipleOf) {\n return !(multipleOf === null || value % multipleOf === 0);\n }\n static validateMaxLength(value, maxLength) {\n return !(maxLength === null || value.length > maxLength);\n }\n static validateMinLength(value, minLength) {\n return !(minLength === null || value.length < minLength);\n }\n static validatePattern(value, pattern) {\n return !(pattern === null || value.match(pattern) === null);\n }\n static validateMaxItems(value, maxItems) {\n return !(maxItems === null || value.length > maxItems);\n }\n static validateMinItems(value, minItems) {\n return !(minItems === null || value.length < minItems);\n }\n static validateUniqueItems(value, uniqueItems) {\n return !(uniqueItems === null || !uniqueItems || value.length !== new Set(value).size);\n }\n}\n\n//# sourceURL=webpack://Ntnx/./target/generated-sources/swagger/src/utils/ValidationUtils.js?\n}");
|
|
717
717
|
|
|
718
718
|
/***/ },
|
|
719
719
|
|
|
@@ -727,16 +727,6 @@ eval("{/* (ignored) */\n\n//# sourceURL=webpack://Ntnx/fs_(ignored)?\n}");
|
|
|
727
727
|
|
|
728
728
|
/***/ },
|
|
729
729
|
|
|
730
|
-
/***/ "?aee4"
|
|
731
|
-
/*!***********************!*\
|
|
732
|
-
!*** https (ignored) ***!
|
|
733
|
-
\***********************/
|
|
734
|
-
() {
|
|
735
|
-
|
|
736
|
-
eval("{/* (ignored) */\n\n//# sourceURL=webpack://Ntnx/https_(ignored)?\n}");
|
|
737
|
-
|
|
738
|
-
/***/ },
|
|
739
|
-
|
|
740
730
|
/***/ "?bdc3"
|
|
741
731
|
/*!************************!*\
|
|
742
732
|
!*** buffer (ignored) ***!
|
|
@@ -757,6 +747,16 @@ eval("{/* (ignored) */\n\n//# sourceURL=webpack://Ntnx/fs_(ignored)?\n}");
|
|
|
757
747
|
|
|
758
748
|
/***/ },
|
|
759
749
|
|
|
750
|
+
/***/ "?aee4"
|
|
751
|
+
/*!***********************!*\
|
|
752
|
+
!*** https (ignored) ***!
|
|
753
|
+
\***********************/
|
|
754
|
+
() {
|
|
755
|
+
|
|
756
|
+
eval("{/* (ignored) */\n\n//# sourceURL=webpack://Ntnx/https_(ignored)?\n}");
|
|
757
|
+
|
|
758
|
+
/***/ },
|
|
759
|
+
|
|
760
760
|
/***/ "?fdee"
|
|
761
761
|
/*!****************************!*\
|
|
762
762
|
!*** stream/web (ignored) ***!
|
|
@@ -779,12 +779,6 @@ eval("{/* (ignored) */\n\n//# sourceURL=webpack://Ntnx/stream/web_(ignored)?\n}"
|
|
|
779
779
|
/******/ if (cachedModule !== undefined) {
|
|
780
780
|
/******/ return cachedModule.exports;
|
|
781
781
|
/******/ }
|
|
782
|
-
/******/ // Check if module exists (development only)
|
|
783
|
-
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
784
|
-
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
785
|
-
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
786
|
-
/******/ throw e;
|
|
787
|
-
/******/ }
|
|
788
782
|
/******/ // Create a new module (and put it into the cache)
|
|
789
783
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
790
784
|
/******/ // no module.id needed
|
|
@@ -793,6 +787,12 @@ eval("{/* (ignored) */\n\n//# sourceURL=webpack://Ntnx/stream/web_(ignored)?\n}"
|
|
|
793
787
|
/******/ };
|
|
794
788
|
/******/
|
|
795
789
|
/******/ // Execute the module function
|
|
790
|
+
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
791
|
+
/******/ delete __webpack_module_cache__[moduleId];
|
|
792
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
793
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
794
|
+
/******/ throw e;
|
|
795
|
+
/******/ }
|
|
796
796
|
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
797
797
|
/******/
|
|
798
798
|
/******/ // Return the exports of the module
|