@nutanix-scratch/objects-js-client 4.0.1-beta.1 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/README.md +33 -20
  2. package/dist/Ntnx-Objects-js-client-prod.js +1 -1
  3. package/dist/Ntnx-Objects-js-client.js +331 -259
  4. package/dist/es/ApiClient.d.ts +35 -7
  5. package/dist/es/ApiClient.js +862 -684
  6. package/dist/es/Paginable.d.ts +1 -1
  7. package/dist/es/Paginable.js +144 -183
  8. package/dist/es/apis/objectstores-endpoints.d.ts +9 -70
  9. package/dist/es/apis/objectstores-endpoints.js +407 -477
  10. package/dist/es/apis/stats-endpoints.d.ts +46 -0
  11. package/dist/es/apis/stats-endpoints.js +122 -0
  12. package/dist/es/index.d.ts +13 -1
  13. package/dist/es/index.js +152 -104
  14. package/dist/es/models/common/v1/config/FQDN.d.ts +2 -7
  15. package/dist/es/models/common/v1/config/FQDN.js +141 -180
  16. package/dist/es/models/common/v1/config/Flag.d.ts +2 -8
  17. package/dist/es/models/common/v1/config/Flag.js +170 -211
  18. package/dist/es/models/common/v1/config/IPAddress.d.ts +2 -20
  19. package/dist/es/models/common/v1/config/IPAddress.js +170 -217
  20. package/dist/es/models/common/v1/config/IPv4Address.d.ts +2 -8
  21. package/dist/es/models/common/v1/config/IPv4Address.js +174 -215
  22. package/dist/es/models/common/v1/config/IPv6Address.d.ts +2 -8
  23. package/dist/es/models/common/v1/config/IPv6Address.js +174 -215
  24. package/dist/es/models/common/v1/config/KVPair.d.ts +2 -8
  25. package/dist/es/models/common/v1/config/KVPair.js +225 -270
  26. package/dist/es/models/common/v1/config/MapOfStringWrapper.d.ts +2 -7
  27. package/dist/es/models/common/v1/config/MapOfStringWrapper.js +139 -178
  28. package/dist/es/models/common/v1/config/Message.d.ts +2 -10
  29. package/dist/es/models/common/v1/config/Message.js +213 -258
  30. package/dist/es/models/common/v1/config/MessageSeverity.js +7 -9
  31. package/dist/es/models/common/v1/config/Metadata.d.ts +2 -11
  32. package/dist/es/models/common/v1/config/Metadata.js +261 -308
  33. package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +5 -10
  34. package/dist/es/models/common/v1/config/TenantAwareModel.js +138 -178
  35. package/dist/es/models/common/v1/response/ApiLink.d.ts +2 -8
  36. package/dist/es/models/common/v1/response/ApiLink.js +165 -206
  37. package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +2 -40
  38. package/dist/es/models/common/v1/response/ApiResponseMetadata.js +281 -344
  39. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -15
  40. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +155 -203
  41. package/dist/es/models/common/v1/stats/DownSamplingOperator.d.ts +19 -0
  42. package/dist/es/models/common/v1/stats/DownSamplingOperator.js +107 -0
  43. package/dist/es/models/common/v1/stats/TimeIntValuePair.d.ts +58 -0
  44. package/dist/es/models/common/v1/stats/TimeIntValuePair.js +272 -0
  45. package/dist/es/models/objects/v4/config/Certificate.d.ts +24 -34
  46. package/dist/es/models/objects/v4/config/Certificate.js +342 -310
  47. package/dist/es/models/objects/v4/config/CertificateProjection.d.ts +1 -1
  48. package/dist/es/models/objects/v4/config/CertificateProjection.js +75 -103
  49. package/dist/es/models/objects/v4/config/CreateCertificateApiResponse.d.ts +2 -43
  50. package/dist/es/models/objects/v4/config/CreateCertificateApiResponse.js +187 -242
  51. package/dist/es/models/objects/v4/config/CreateObjectstoreApiResponse.d.ts +2 -43
  52. package/dist/es/models/objects/v4/config/CreateObjectstoreApiResponse.js +187 -242
  53. package/dist/es/models/objects/v4/config/DeleteObjectstoreApiResponse.d.ts +2 -43
  54. package/dist/es/models/objects/v4/config/DeleteObjectstoreApiResponse.js +187 -242
  55. package/dist/es/models/objects/v4/config/GetCaApiResponse.d.ts +2 -45
  56. package/dist/es/models/objects/v4/config/GetCaApiResponse.js +187 -242
  57. package/dist/es/models/objects/v4/config/GetCertificateApiResponse.d.ts +2 -43
  58. package/dist/es/models/objects/v4/config/GetCertificateApiResponse.js +187 -242
  59. package/dist/es/models/objects/v4/config/GetObjectstoreApiResponse.d.ts +2 -43
  60. package/dist/es/models/objects/v4/config/GetObjectstoreApiResponse.js +187 -242
  61. package/dist/es/models/objects/v4/config/ListCertificatesApiResponse.d.ts +2 -43
  62. package/dist/es/models/objects/v4/config/ListCertificatesApiResponse.js +213 -268
  63. package/dist/es/models/objects/v4/config/ListObjectstoresApiResponse.d.ts +2 -43
  64. package/dist/es/models/objects/v4/config/ListObjectstoresApiResponse.js +213 -268
  65. package/dist/es/models/objects/v4/config/ObjectStore.d.ts +1 -96
  66. package/dist/es/models/objects/v4/config/ObjectStore.js +629 -712
  67. package/dist/es/models/objects/v4/config/ObjectStoreProjection.d.ts +1 -129
  68. package/dist/es/models/objects/v4/config/ObjectStoreProjection.js +222 -239
  69. package/dist/es/models/objects/v4/config/State.js +7 -9
  70. package/dist/es/models/objects/v4/config/UpdateObjectstoreApiResponse.d.ts +2 -43
  71. package/dist/es/models/objects/v4/config/UpdateObjectstoreApiResponse.js +187 -242
  72. package/dist/es/models/objects/v4/error/AppMessage.d.ts +5 -15
  73. package/dist/es/models/objects/v4/error/AppMessage.js +265 -314
  74. package/dist/es/models/objects/v4/error/ErrorResponse.d.ts +2 -7
  75. package/dist/es/models/objects/v4/error/ErrorResponse.js +177 -219
  76. package/dist/es/models/objects/v4/error/SchemaValidationError.d.ts +2 -18
  77. package/dist/es/models/objects/v4/error/SchemaValidationError.js +249 -300
  78. package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +2 -9
  79. package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.js +191 -234
  80. package/dist/es/models/objects/v4/stats/GetObjectstoreStatsApiResponse.d.ts +58 -0
  81. package/dist/es/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js +288 -0
  82. package/dist/es/models/objects/v4/stats/ObjectstoreStats.d.ts +255 -0
  83. package/dist/es/models/objects/v4/stats/ObjectstoreStats.js +1253 -0
  84. package/dist/es/models/objects/v4/stats/TimeFloatValuePair.d.ts +58 -0
  85. package/dist/es/models/objects/v4/stats/TimeFloatValuePair.js +272 -0
  86. package/dist/es/models/prism/v4/config/TaskReference.d.ts +2 -7
  87. package/dist/es/models/prism/v4/config/TaskReference.js +142 -181
  88. package/dist/es/models/validation/ValidationError.js +26 -42
  89. package/dist/es/models/validation/ValidationScopes.js +3 -3
  90. package/dist/es/utils/ValidationUtils.js +39 -69
  91. package/dist/lib/ApiClient.d.ts +35 -7
  92. package/dist/lib/ApiClient.js +862 -684
  93. package/dist/lib/Paginable.d.ts +1 -1
  94. package/dist/lib/Paginable.js +144 -183
  95. package/dist/lib/apis/objectstores-endpoints.d.ts +9 -70
  96. package/dist/lib/apis/objectstores-endpoints.js +407 -477
  97. package/dist/lib/apis/stats-endpoints.d.ts +46 -0
  98. package/dist/lib/apis/stats-endpoints.js +122 -0
  99. package/dist/lib/index.d.ts +13 -1
  100. package/dist/lib/index.js +152 -104
  101. package/dist/lib/models/common/v1/config/FQDN.d.ts +2 -7
  102. package/dist/lib/models/common/v1/config/FQDN.js +141 -180
  103. package/dist/lib/models/common/v1/config/Flag.d.ts +2 -8
  104. package/dist/lib/models/common/v1/config/Flag.js +170 -211
  105. package/dist/lib/models/common/v1/config/IPAddress.d.ts +2 -20
  106. package/dist/lib/models/common/v1/config/IPAddress.js +170 -217
  107. package/dist/lib/models/common/v1/config/IPv4Address.d.ts +2 -8
  108. package/dist/lib/models/common/v1/config/IPv4Address.js +174 -215
  109. package/dist/lib/models/common/v1/config/IPv6Address.d.ts +2 -8
  110. package/dist/lib/models/common/v1/config/IPv6Address.js +174 -215
  111. package/dist/lib/models/common/v1/config/KVPair.d.ts +2 -8
  112. package/dist/lib/models/common/v1/config/KVPair.js +225 -270
  113. package/dist/lib/models/common/v1/config/MapOfStringWrapper.d.ts +2 -7
  114. package/dist/lib/models/common/v1/config/MapOfStringWrapper.js +139 -178
  115. package/dist/lib/models/common/v1/config/Message.d.ts +2 -10
  116. package/dist/lib/models/common/v1/config/Message.js +213 -258
  117. package/dist/lib/models/common/v1/config/MessageSeverity.js +7 -9
  118. package/dist/lib/models/common/v1/config/Metadata.d.ts +2 -11
  119. package/dist/lib/models/common/v1/config/Metadata.js +261 -308
  120. package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +5 -10
  121. package/dist/lib/models/common/v1/config/TenantAwareModel.js +138 -178
  122. package/dist/lib/models/common/v1/response/ApiLink.d.ts +2 -8
  123. package/dist/lib/models/common/v1/response/ApiLink.js +165 -206
  124. package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +2 -40
  125. package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +281 -344
  126. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -15
  127. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +155 -203
  128. package/dist/lib/models/common/v1/stats/DownSamplingOperator.d.ts +19 -0
  129. package/dist/lib/models/common/v1/stats/DownSamplingOperator.js +107 -0
  130. package/dist/lib/models/common/v1/stats/TimeIntValuePair.d.ts +58 -0
  131. package/dist/lib/models/common/v1/stats/TimeIntValuePair.js +272 -0
  132. package/dist/lib/models/objects/v4/config/Certificate.d.ts +24 -34
  133. package/dist/lib/models/objects/v4/config/Certificate.js +342 -310
  134. package/dist/lib/models/objects/v4/config/CertificateProjection.d.ts +1 -1
  135. package/dist/lib/models/objects/v4/config/CertificateProjection.js +75 -103
  136. package/dist/lib/models/objects/v4/config/CreateCertificateApiResponse.d.ts +2 -43
  137. package/dist/lib/models/objects/v4/config/CreateCertificateApiResponse.js +187 -242
  138. package/dist/lib/models/objects/v4/config/CreateObjectstoreApiResponse.d.ts +2 -43
  139. package/dist/lib/models/objects/v4/config/CreateObjectstoreApiResponse.js +187 -242
  140. package/dist/lib/models/objects/v4/config/DeleteObjectstoreApiResponse.d.ts +2 -43
  141. package/dist/lib/models/objects/v4/config/DeleteObjectstoreApiResponse.js +187 -242
  142. package/dist/lib/models/objects/v4/config/GetCaApiResponse.d.ts +2 -45
  143. package/dist/lib/models/objects/v4/config/GetCaApiResponse.js +187 -242
  144. package/dist/lib/models/objects/v4/config/GetCertificateApiResponse.d.ts +2 -43
  145. package/dist/lib/models/objects/v4/config/GetCertificateApiResponse.js +187 -242
  146. package/dist/lib/models/objects/v4/config/GetObjectstoreApiResponse.d.ts +2 -43
  147. package/dist/lib/models/objects/v4/config/GetObjectstoreApiResponse.js +187 -242
  148. package/dist/lib/models/objects/v4/config/ListCertificatesApiResponse.d.ts +2 -43
  149. package/dist/lib/models/objects/v4/config/ListCertificatesApiResponse.js +213 -268
  150. package/dist/lib/models/objects/v4/config/ListObjectstoresApiResponse.d.ts +2 -43
  151. package/dist/lib/models/objects/v4/config/ListObjectstoresApiResponse.js +213 -268
  152. package/dist/lib/models/objects/v4/config/ObjectStore.d.ts +1 -96
  153. package/dist/lib/models/objects/v4/config/ObjectStore.js +629 -712
  154. package/dist/lib/models/objects/v4/config/ObjectStoreProjection.d.ts +1 -129
  155. package/dist/lib/models/objects/v4/config/ObjectStoreProjection.js +222 -239
  156. package/dist/lib/models/objects/v4/config/State.js +7 -9
  157. package/dist/lib/models/objects/v4/config/UpdateObjectstoreApiResponse.d.ts +2 -43
  158. package/dist/lib/models/objects/v4/config/UpdateObjectstoreApiResponse.js +187 -242
  159. package/dist/lib/models/objects/v4/error/AppMessage.d.ts +5 -15
  160. package/dist/lib/models/objects/v4/error/AppMessage.js +265 -314
  161. package/dist/lib/models/objects/v4/error/ErrorResponse.d.ts +2 -7
  162. package/dist/lib/models/objects/v4/error/ErrorResponse.js +177 -219
  163. package/dist/lib/models/objects/v4/error/SchemaValidationError.d.ts +2 -18
  164. package/dist/lib/models/objects/v4/error/SchemaValidationError.js +249 -300
  165. package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +2 -9
  166. package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.js +191 -234
  167. package/dist/lib/models/objects/v4/stats/GetObjectstoreStatsApiResponse.d.ts +58 -0
  168. package/dist/lib/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js +288 -0
  169. package/dist/lib/models/objects/v4/stats/ObjectstoreStats.d.ts +255 -0
  170. package/dist/lib/models/objects/v4/stats/ObjectstoreStats.js +1253 -0
  171. package/dist/lib/models/objects/v4/stats/TimeFloatValuePair.d.ts +58 -0
  172. package/dist/lib/models/objects/v4/stats/TimeFloatValuePair.js +272 -0
  173. package/dist/lib/models/prism/v4/config/TaskReference.d.ts +2 -7
  174. package/dist/lib/models/prism/v4/config/TaskReference.js +142 -181
  175. package/dist/lib/models/validation/ValidationError.js +26 -42
  176. package/dist/lib/models/validation/ValidationScopes.js +3 -3
  177. package/dist/lib/utils/ValidationUtils.js +39 -69
  178. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The ExternalizableAbstractModel model module.
3
3
  * @module Ntnx/ExternalizableAbstractModel
4
- * @version 4.0.1-beta-1
4
+ * @version 4.0.2
5
5
  * @class ExternalizableAbstractModel
6
6
  * @extends TenantAwareModel
7
7
  */
@@ -28,20 +28,6 @@ export default class ExternalizableAbstractModel extends TenantAwareModel {
28
28
  */
29
29
  setLinks(links: ApiLink[]): void;
30
30
  links: ApiLink[];
31
- toJson(forMutation: any): {
32
- $reserved: any;
33
- $objectType: string;
34
- $unknownFields: any;
35
- tenantId?: string;
36
- links?: {
37
- $reserved: any;
38
- $objectType: string;
39
- $unknownFields: any;
40
- rel?: string;
41
- href?: string;
42
- }[];
43
- extId?: string;
44
- };
45
31
  #private;
46
32
  }
47
33
  import TenantAwareModel from "../config/TenantAwareModel";
@@ -3,44 +3,22 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = void 0;
7
- var _TenantAwareModel2 = _interopRequireDefault(require("../config/TenantAwareModel"));
6
+ exports.default = void 0;
7
+ var _TenantAwareModel = _interopRequireDefault(require("../config/TenantAwareModel"));
8
8
  var _ApiLink = _interopRequireDefault(require("./ApiLink"));
9
9
  var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
10
10
  var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
11
11
  var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
14
- function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
15
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
17
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
18
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
19
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
20
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
21
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
22
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
23
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
24
- function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
25
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
26
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
27
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
28
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
29
- function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
30
- function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
31
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
32
- function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
33
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
34
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
35
13
  function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
36
14
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } /*
37
15
  * Nutanix Objects Storage Management APIs
38
16
  *
39
- * OpenAPI spec version: 4.0.1-beta-1
17
+ * OpenAPI spec version: 4.0.2
40
18
  *
41
19
  * NOTE: This class is auto generated by the Open API Dev Platform.
42
20
  *
43
- * Open API Dev Platform Codegen version: 16.9.0.8546-RELEASE
21
+ * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE
44
22
  *
45
23
  * Do not edit the class manually.
46
24
  *
@@ -48,37 +26,34 @@ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("C
48
26
  /**
49
27
  * The ExternalizableAbstractModel model module.
50
28
  * @module Ntnx/ExternalizableAbstractModel
51
- * @version 4.0.1-beta-1
29
+ * @version 4.0.2
52
30
  * @class ExternalizableAbstractModel
53
31
  * @extends TenantAwareModel
54
32
  */
55
33
  var _ExternalizableAbstractModel_brand = /*#__PURE__*/new WeakSet();
56
- var ExternalizableAbstractModel = exports["default"] = /*#__PURE__*/function (_TenantAwareModel) {
34
+ class ExternalizableAbstractModel extends _TenantAwareModel.default {
57
35
  /**
58
36
  * Constructs a new <code>ExternalizableAbstractModel</code>.
59
37
  * 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
60
38
  * @alias module:Ntnx/ExternalizableAbstractModel
61
39
  * @extends module:Ntnx/TenantAwareModel
62
40
  */
63
- function ExternalizableAbstractModel() {
64
- var _this;
65
- _classCallCheck(this, ExternalizableAbstractModel);
66
- _this = _callSuper(this, ExternalizableAbstractModel);
41
+ constructor() {
42
+ super();
67
43
  /*
68
44
  * toJson method for a map type which supports map with primitive keys and values of object types
69
45
  * @param {Object} obj
70
46
  * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
71
47
  * Otherwise, just returns the input object.
72
48
  */
73
- _classPrivateMethodInitSpec(_this, _ExternalizableAbstractModel_brand);
74
- _this.$objectType = "common.v1.response.ExternalizableAbstractModel";
49
+ _classPrivateMethodInitSpec(this, _ExternalizableAbstractModel_brand);
50
+ this.$objectType = "common.v1.response.ExternalizableAbstractModel";
75
51
  /** @type {object<string, any>} */
76
- _this.$reserved = {
52
+ this.$reserved = {
77
53
  '$fv': "v1.r0"
78
54
  };
79
55
  /** @type {object<string, any>} */
80
- _this.$unknownFields = {};
81
- return _this;
56
+ this.$unknownFields = {};
82
57
  }
83
58
 
84
59
  /**
@@ -89,195 +64,172 @@ var ExternalizableAbstractModel = exports["default"] = /*#__PURE__*/function (_T
89
64
  * @param callFromChild {Boolean} Flag to recognise calling instance
90
65
  * @return {module:Ntnx/ExternalizableAbstractModel} The populated <code>ExternalizableAbstractModel</code> instance.
91
66
  */
92
- _inherits(ExternalizableAbstractModel, _TenantAwareModel);
93
- return _createClass(ExternalizableAbstractModel, [{
94
- key: "getExtId",
95
- value:
96
- /**
97
- * Returns A globally unique identifier of an instance that is suitable for external consumption.
98
- * @return {string}
99
- */
100
- function getExtId() {
101
- return this.extId;
67
+ static constructFromObject(data, obj = null, callFromChild = false) {
68
+ let items, item, i, itemArr, discriminator;
69
+ if (data) {
70
+ obj = obj || new ExternalizableAbstractModel();
71
+ _TenantAwareModel.default.constructFromObject(data, obj, true);
72
+ if (data.hasOwnProperty('extId') && data.extId !== null && data.extId !== undefined) {
73
+ obj.setExtId(data['extId']);
74
+ }
75
+ if (data.hasOwnProperty('links') && data.links !== null && data.links !== undefined) {
76
+ itemArr = [];
77
+ items = data.links;
78
+ for (i = 0; i < items.length; i++) {
79
+ item = _ApiLink.default.constructFromObject(items[i], undefined);
80
+ itemArr.push(item);
81
+ }
82
+ obj.setLinks(itemArr);
83
+ }
84
+ if (!callFromChild) {
85
+ obj.$unknownFields = {
86
+ ...data.$unknownFields
87
+ };
88
+ for (const property in data) {
89
+ // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,
90
+ // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).
91
+ // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.
92
+ // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.
93
+ if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
94
+ obj.$unknownFields[property] = data[property];
95
+ }
96
+ }
97
+ }
102
98
  }
99
+ return obj;
100
+ }
103
101
 
104
- /**
105
- * Sets A globally unique identifier of an instance that is suitable for external consumption.
106
- * @param {string} extId A globally unique identifier of an instance that is suitable for external consumption.
107
- */
108
- }, {
109
- key: "setExtId",
110
- value: function setExtId(extId) {
111
- this.extId = extId;
112
- }
102
+ /**
103
+ * Converts a given snake_case string to camelCase.
104
+ * @param {string} snakeStr - The input string in snake_case format.
105
+ * @returns {string} - The converted string in camelCase format.
106
+ */
107
+ static snakeToCamel(snakeStr) {
108
+ return snakeStr.replace(/(_\w)/g, match => match[1].toUpperCase());
109
+ }
113
110
 
114
- /**
115
- * 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.
116
- * @return {ApiLink[]}
117
- */
118
- }, {
119
- key: "getLinks",
120
- value: function getLinks() {
121
- return this.links;
122
- }
111
+ /**
112
+ * Returns A globally unique identifier of an instance that is suitable for external consumption.
113
+ * @return {string}
114
+ */
115
+ getExtId() {
116
+ return this.extId;
117
+ }
123
118
 
124
- /**
125
- * 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.
126
- * @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.
127
- */
128
- }, {
129
- key: "setLinks",
130
- value: function setLinks(links) {
131
- this.links = links;
132
- }
133
- }, {
134
- key: "toJson",
135
- value: function toJson(forMutation) {
136
- if (forMutation === false) {
137
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {
119
+ /**
120
+ * Sets A globally unique identifier of an instance that is suitable for external consumption.
121
+ * @param {string} extId A globally unique identifier of an instance that is suitable for external consumption.
122
+ */
123
+ setExtId(extId) {
124
+ this.extId = extId;
125
+ }
126
+
127
+ /**
128
+ * 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.
129
+ * @return {ApiLink[]}
130
+ */
131
+ getLinks() {
132
+ return this.links;
133
+ }
134
+
135
+ /**
136
+ * 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.
137
+ * @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.
138
+ */
139
+ setLinks(links) {
140
+ this.links = links;
141
+ }
142
+ toJson(forMutation) {
143
+ if (forMutation === false) {
144
+ return {
145
+ ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {
138
146
  'extId': this.getExtId()
139
- } : {}), typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {
140
- 'links': this.getLinks().map(function (item) {
141
- return item.toJson(false);
142
- })
143
- } : {}), typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {
147
+ } : {}),
148
+ ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {
149
+ 'links': this.getLinks().map(item => item.toJson(false))
150
+ } : {}),
151
+ ...(typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {
144
152
  'tenantId': this.getTenantId()
145
- } : {}), {}, {
146
- '$reserved': this.get$Reserved(),
147
- '$objectType': this.get$ObjectType(),
148
- '$unknownFields': this.get$UnknownFields()
149
- });
150
- }
151
- return {
153
+ } : {}),
152
154
  '$reserved': this.get$Reserved(),
153
155
  '$objectType': this.get$ObjectType(),
154
- '$unknownFields': this.get$UnknownFields()
156
+ ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),
157
+ '$unknownFields': {}
155
158
  };
156
159
  }
157
- }, {
158
- key: "validate",
159
- value: function validate(scope, properties) {
160
- var _this2 = this;
161
- var propList = [];
162
- if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes["default"]) {
163
- //cases validate() and validate(scope)
164
- propList = [];
165
- } else if (arguments.length === 1) {
166
- //case validate(properties)
167
- propList = arguments[0];
168
- scope = null;
160
+ return {
161
+ '$reserved': this.get$Reserved(),
162
+ '$objectType': this.get$ObjectType(),
163
+ ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),
164
+ '$unknownFields': {}
165
+ };
166
+ }
167
+ validate(scope, properties) {
168
+ let propList = [];
169
+ if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes.default) {
170
+ //cases validate() and validate(scope)
171
+ propList = [];
172
+ } else if (arguments.length === 1) {
173
+ //case validate(properties)
174
+ propList = arguments[0];
175
+ scope = null;
176
+ } else {
177
+ //case validate(scope, properties)
178
+ propList = arguments[1];
179
+ }
180
+ let res = [];
181
+ let err = null;
182
+ propList.forEach(property => {
183
+ err = this.validateProperty(property, scope);
184
+ if (err) {
185
+ res.push(err);
186
+ }
187
+ });
188
+ return new Promise(function (resolve, reject) {
189
+ if (res.length !== 0) {
190
+ reject(err);
169
191
  } else {
170
- //case validate(scope, properties)
171
- propList = arguments[1];
192
+ resolve();
172
193
  }
173
- var res = [];
174
- var err = null;
175
- propList.forEach(function (property) {
176
- err = _this2.validateProperty(property, scope);
177
- if (err) {
178
- res.push(err);
179
- }
180
- });
181
- return new Promise(function (resolve, reject) {
182
- if (res.length !== 0) {
183
- reject(err);
184
- } else {
185
- resolve();
186
- }
187
- });
188
- }
189
- }, {
190
- key: "validateProperty",
191
- value: function validateProperty(scope, property) {
192
- if (property === "extId") {
193
- if (typeof this.extId === 'undefined' || this.extId === null) {
194
- return new _ValidationError["default"]("extId", "undefined or null");
195
- }
196
- if (typeof scope === 'undefined' || scope === null) {
197
- if (!_ValidationUtils["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}$/)) {
198
- return new _ValidationError["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}$/");
199
- }
200
- } else if (scope === _ValidationScopes["default"].update) {
201
- if (!_ValidationUtils["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}$/)) {
202
- return new _ValidationError["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}$/");
203
- }
204
- }
194
+ });
195
+ }
196
+ validateProperty(scope, property) {
197
+ if (property === "extId") {
198
+ if (typeof this.extId === 'undefined' || this.extId === null) {
199
+ return new _ValidationError.default("extId", "undefined or null");
205
200
  }
206
- if (property === "links") {
207
- if (typeof this.links === 'undefined' || this.links === null) {
208
- return new _ValidationError["default"]("links", "undefined or null");
201
+ if (typeof scope === 'undefined' || scope === null) {
202
+ if (!_ValidationUtils.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}$/)) {
203
+ return new _ValidationError.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}$/");
209
204
  }
210
- if (!_ValidationUtils["default"].validateMaxItems(this.links, 20)) {
211
- return new _ValidationError["default"]("links", "does not satisfy required maxItems constraint: 20");
205
+ } else if (scope === _ValidationScopes.default.update) {
206
+ if (!_ValidationUtils.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}$/)) {
207
+ return new _ValidationError.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}$/");
212
208
  }
213
209
  }
214
- return new _ValidationError["default"](property, "no such property exists");
215
210
  }
216
- }], [{
217
- key: "constructFromObject",
218
- value: function constructFromObject(data) {
219
- var obj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
220
- var callFromChild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
221
- var items, item, i, itemArr, discriminator;
222
- if (data) {
223
- obj = obj || new ExternalizableAbstractModel();
224
- _TenantAwareModel2["default"].constructFromObject(data, obj, true);
225
- if (data.hasOwnProperty('extId') && data.extId !== null && data.extId !== undefined) {
226
- obj.setExtId(data['extId']);
227
- }
228
- if (data.hasOwnProperty('links') && data.links !== null && data.links !== undefined) {
229
- itemArr = [];
230
- items = data.links;
231
- for (i = 0; i < items.length; i++) {
232
- item = _ApiLink["default"].constructFromObject(items[i], undefined);
233
- itemArr.push(item);
234
- }
235
- obj.setLinks(itemArr);
236
- }
237
- if (!callFromChild) {
238
- obj.$unknownFields = _objectSpread({}, data.$unknownFields);
239
- for (var property in data) {
240
- // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,
241
- // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).
242
- // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.
243
- // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.
244
- if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
245
- obj.$unknownFields[property] = data[property];
246
- }
247
- }
248
- }
211
+ if (property === "links") {
212
+ if (typeof this.links === 'undefined' || this.links === null) {
213
+ return new _ValidationError.default("links", "undefined or null");
214
+ }
215
+ if (!_ValidationUtils.default.validateMaxItems(this.links, 20)) {
216
+ return new _ValidationError.default("links", "does not satisfy required maxItems constraint: 20");
249
217
  }
250
- return obj;
251
218
  }
219
+ return new _ValidationError.default(property, "no such property exists");
220
+ }
221
+ }
252
222
 
253
- /**
254
- * Converts a given snake_case string to camelCase.
255
- * @param {string} snakeStr - The input string in snake_case format.
256
- * @returns {string} - The converted string in camelCase format.
257
- */
258
- }, {
259
- key: "snakeToCamel",
260
- value: function snakeToCamel(snakeStr) {
261
- return snakeStr.replace(/(_\w)/g, function (match) {
262
- return match[1].toUpperCase();
263
- });
264
- }
265
- }]);
266
- }(_TenantAwareModel2["default"]);
267
223
  /**
268
224
  * A globally unique identifier of an instance that is suitable for external consumption.
269
225
  * @memberof ExternalizableAbstractModel
270
226
  */
227
+ exports.default = ExternalizableAbstractModel;
271
228
  function _toJsonMapType(obj, forMutation) {
272
229
  if (obj instanceof Map) {
273
- return Object.fromEntries(Array.from(obj, function (_ref) {
274
- var _ref2 = _slicedToArray(_ref, 2),
275
- k = _ref2[0],
276
- v = _ref2[1];
277
- return [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v];
278
- }));
279
- } else if (_typeof(obj) === 'object' && obj != null && obj.constructor === Object) {
280
- return Object.fromEntries(Array.from(Object.entries(obj), function (entry) {
230
+ return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v]));
231
+ } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {
232
+ return Object.fromEntries(Array.from(Object.entries(obj), entry => {
281
233
  return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
282
234
  }));
283
235
  }
@@ -304,7 +256,7 @@ ExternalizableAbstractModel.prototype.extId = undefined;
304
256
  ExternalizableAbstractModel.prototype.links = undefined;
305
257
 
306
258
  /**
307
- * 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).
259
+ * 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).
308
260
  * @memberof ExternalizableAbstractModel
309
261
  */
310
- _TenantAwareModel2["default"].prototype.tenantId = undefined;
262
+ _TenantAwareModel.default.prototype.tenantId = undefined;
@@ -0,0 +1,19 @@
1
+ export default DownSamplingOperator;
2
+ /**
3
+ * *
4
+ */
5
+ type DownSamplingOperator = string;
6
+ declare namespace DownSamplingOperator {
7
+ /**
8
+ * Returns a <code>DownSamplingOperator</code> enum value from a JavaScript object name.
9
+ * @param {Object} obj The plain JavaScript object containing the name of the enum value.
10
+ * @return {DownSamplingOperator} The enum <code>DownSamplingOperator</code> value.
11
+ */
12
+ function constructFromObject(obj: any): string;
13
+ /**
14
+ * Validates <code>DownSamplingOperator</code> enum value.
15
+ * @param {Object} obj The plain JavaScript object containing the name of the enum value.
16
+ * @return {null} Throws error for invalid value.
17
+ */
18
+ function validate(obj: any): null;
19
+ }
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
8
+ var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
9
+ var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ /*
12
+ * Nutanix Objects Storage Management APIs
13
+ *
14
+ * OpenAPI spec version: 4.0.2
15
+ *
16
+ * NOTE: This class is auto generated by the Open API Dev Platform.
17
+ *
18
+ * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE
19
+ *
20
+ * Do not edit the class manually.
21
+ *
22
+ */
23
+
24
+ /**
25
+ * Enum class DownSamplingOperator.
26
+ * @enum {string}
27
+ * @readonly
28
+ */
29
+ const DownSamplingOperator = {
30
+ /**
31
+ * Unknown value.
32
+ * @const
33
+ */
34
+ $UNKNOWN: "$UNKNOWN",
35
+ /**
36
+ * Redacted value.
37
+ * @const
38
+ */
39
+ $REDACTED: "$REDACTED",
40
+ /**
41
+ * Aggregation with sum of all values.
42
+ * @const
43
+ */
44
+ SUM: "SUM",
45
+ /**
46
+ * Aggregation containing lowest of all values.
47
+ * @const
48
+ */
49
+ MIN: "MIN",
50
+ /**
51
+ * Aggregation containing highest of all values.
52
+ * @const
53
+ */
54
+ MAX: "MAX",
55
+ /**
56
+ * Aggregation indicating mean or average of all values.
57
+ * @const
58
+ */
59
+ AVG: "AVG",
60
+ /**
61
+ * Aggregation containing total count of values.
62
+ * @const
63
+ */
64
+ COUNT: "COUNT",
65
+ /**
66
+ * Aggregation containing only the last recorded value.
67
+ * @const
68
+ */
69
+ LAST: "LAST"
70
+ };
71
+
72
+ /**
73
+ * Returns a <code>DownSamplingOperator</code> enum value from a JavaScript object name.
74
+ * @param {Object} obj The plain JavaScript object containing the name of the enum value.
75
+ * @return {DownSamplingOperator} The enum <code>DownSamplingOperator</code> value.
76
+ */
77
+ DownSamplingOperator.constructFromObject = function (obj) {
78
+ if (typeof obj === 'string' || obj instanceof String) {
79
+ let enumVal = Object.keys(DownSamplingOperator).find(key => DownSamplingOperator[key] === obj);
80
+ return enumVal === undefined || enumVal === null ? DownSamplingOperator.$UNKNOWN : DownSamplingOperator[enumVal];
81
+ } else {
82
+ throw new Error("Received object name is not an instance of String");
83
+ }
84
+ };
85
+
86
+ /**
87
+ * Validates <code>DownSamplingOperator</code> enum value.
88
+ * @param {Object} obj The plain JavaScript object containing the name of the enum value.
89
+ * @return {null} Throws error for invalid value.
90
+ */
91
+ DownSamplingOperator.validate = function (obj) {
92
+ switch (obj) {
93
+ case DownSamplingOperator.$UNKNOWN:
94
+ case DownSamplingOperator.$REDACTED:
95
+ case DownSamplingOperator.SUM:
96
+ case DownSamplingOperator.MIN:
97
+ case DownSamplingOperator.MAX:
98
+ case DownSamplingOperator.AVG:
99
+ case DownSamplingOperator.COUNT:
100
+ case DownSamplingOperator.LAST:
101
+ return;
102
+ default:
103
+ throw new Error("Invalid : must be DownSamplingOperator.{ $UNKNOWN|$REDACTED|SUM|MIN|MAX|AVG|COUNT|LAST }");
104
+ }
105
+ };
106
+ Object.freeze(DownSamplingOperator);
107
+ var _default = exports.default = DownSamplingOperator;