@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
@@ -3,8 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = void 0;
6
+ exports.default = void 0;
7
7
  var _FQDN = _interopRequireDefault(require("../../../common/v1/config/FQDN"));
8
+ var _IPAddress = _interopRequireDefault(require("../../../common/v1/config/IPAddress"));
8
9
  var _Metadata = _interopRequireDefault(require("../../../common/v1/config/Metadata"));
9
10
  var _TenantAwareModel = _interopRequireDefault(require("../../../common/v1/config/TenantAwareModel"));
10
11
  var _ApiLink = _interopRequireDefault(require("../../../common/v1/response/ApiLink"));
@@ -12,38 +13,16 @@ var _ExternalizableAbstractModel = _interopRequireDefault(require("../../../comm
12
13
  var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
13
14
  var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
14
15
  var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
15
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
16
- 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); }
17
- function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
18
- 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."); }
19
- 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; } }
20
- 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; }
21
- 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; } }
22
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
23
- 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; }
24
- 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; }
25
- 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; }
26
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
27
- 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); } }
28
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
29
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
30
- 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); }
31
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
32
- 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); }
33
- function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
34
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
35
- function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
36
- 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); }
37
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
38
17
  function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
39
18
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } /*
40
19
  * Nutanix Objects Storage Management APIs
41
20
  *
42
- * OpenAPI spec version: 4.0.1-beta-1
21
+ * OpenAPI spec version: 4.0.2
43
22
  *
44
23
  * NOTE: This class is auto generated by the Open API Dev Platform.
45
24
  *
46
- * Open API Dev Platform Codegen version: 16.9.0.8546-RELEASE
25
+ * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE
47
26
  *
48
27
  * Do not edit the class manually.
49
28
  *
@@ -51,36 +30,33 @@ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("C
51
30
  /**
52
31
  * The Certificate model module.
53
32
  * @module Ntnx/Certificate
54
- * @version 4.0.1-beta-1
33
+ * @version 4.0.2
55
34
  * @class Certificate
56
35
  * @extends ExternalizableAbstractModel
57
36
  */
58
37
  var _Certificate_brand = /*#__PURE__*/new WeakSet();
59
- var Certificate = exports["default"] = /*#__PURE__*/function (_ExternalizableAbstra) {
38
+ class Certificate extends _ExternalizableAbstractModel.default {
60
39
  /**
61
40
  * Constructs a new <code>Certificate</code>.
62
41
  * @alias module:Ntnx/Certificate
63
42
  * @extends module:Ntnx/ExternalizableAbstractModel
64
43
  */
65
- function Certificate() {
66
- var _this;
67
- _classCallCheck(this, Certificate);
68
- _this = _callSuper(this, Certificate);
44
+ constructor() {
45
+ super();
69
46
  /*
70
47
  * toJson method for a map type which supports map with primitive keys and values of object types
71
48
  * @param {Object} obj
72
49
  * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
73
50
  * Otherwise, just returns the input object.
74
51
  */
75
- _classPrivateMethodInitSpec(_this, _Certificate_brand);
76
- _this.$objectType = "objects.v4.config.Certificate";
52
+ _classPrivateMethodInitSpec(this, _Certificate_brand);
53
+ this.$objectType = "objects.v4.config.Certificate";
77
54
  /** @type {object<string, any>} */
78
- _this.$reserved = {
79
- '$fv': "v4.r0.b1"
55
+ this.$reserved = {
56
+ '$fv': "v4.r0"
80
57
  };
81
58
  /** @type {object<string, any>} */
82
- _this.$unknownFields = {};
83
- return _this;
59
+ this.$unknownFields = {};
84
60
  }
85
61
 
86
62
  /**
@@ -91,312 +67,355 @@ var Certificate = exports["default"] = /*#__PURE__*/function (_ExternalizableAbs
91
67
  * @param callFromChild {Boolean} Flag to recognise calling instance
92
68
  * @return {module:Ntnx/Certificate} The populated <code>Certificate</code> instance.
93
69
  */
94
- _inherits(Certificate, _ExternalizableAbstra);
95
- return _createClass(Certificate, [{
96
- key: "getMetadata",
97
- value:
98
- /**
99
- * @return {Metadata}
100
- */
101
- function getMetadata() {
102
- return this.metadata;
70
+ static constructFromObject(data, obj = null, callFromChild = false) {
71
+ let items, item, i, itemArr, discriminator;
72
+ if (data) {
73
+ obj = obj || new Certificate();
74
+ _ExternalizableAbstractModel.default.constructFromObject(data, obj, true);
75
+ if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {
76
+ obj.setMetadata(_Metadata.default.constructFromObject(data['metadata']));
77
+ }
78
+ if (data.hasOwnProperty('publicCert') && data.publicCert !== null && data.publicCert !== undefined) {
79
+ obj.setPublicCert(data['publicCert']);
80
+ }
81
+ if (data.hasOwnProperty('privateKey') && data.privateKey !== null && data.privateKey !== undefined) {
82
+ obj.setPrivateKey(data['privateKey']);
83
+ }
84
+ if (data.hasOwnProperty('ca') && data.ca !== null && data.ca !== undefined) {
85
+ obj.setCa(data['ca']);
86
+ }
87
+ if (data.hasOwnProperty('alternateFqdns') && data.alternateFqdns !== null && data.alternateFqdns !== undefined) {
88
+ itemArr = [];
89
+ items = data.alternateFqdns;
90
+ for (i = 0; i < items.length; i++) {
91
+ item = _FQDN.default.constructFromObject(items[i], undefined);
92
+ itemArr.push(item);
93
+ }
94
+ obj.setAlternateFqdns(itemArr);
95
+ }
96
+ if (data.hasOwnProperty('shouldGenerate') && data.shouldGenerate !== null && data.shouldGenerate !== undefined) {
97
+ obj.setShouldGenerate(data['shouldGenerate']);
98
+ }
99
+ if (data.hasOwnProperty('alternateIps') && data.alternateIps !== null && data.alternateIps !== undefined) {
100
+ itemArr = [];
101
+ items = data.alternateIps;
102
+ for (i = 0; i < items.length; i++) {
103
+ item = _IPAddress.default.constructFromObject(items[i], undefined);
104
+ itemArr.push(item);
105
+ }
106
+ obj.setAlternateIps(itemArr);
107
+ }
108
+ if (!callFromChild) {
109
+ obj.$unknownFields = {
110
+ ...data.$unknownFields
111
+ };
112
+ for (const property in data) {
113
+ // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,
114
+ // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).
115
+ // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.
116
+ // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.
117
+ if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
118
+ obj.$unknownFields[property] = data[property];
119
+ }
120
+ }
121
+ }
103
122
  }
123
+ return obj;
124
+ }
104
125
 
105
- /**
106
- * @param {Metadata} metadata
107
- */
108
- }, {
109
- key: "setMetadata",
110
- value: function setMetadata(metadata) {
111
- this.metadata = metadata;
112
- }
126
+ /**
127
+ * Converts a given snake_case string to camelCase.
128
+ * @param {string} snakeStr - The input string in snake_case format.
129
+ * @returns {string} - The converted string in camelCase format.
130
+ */
131
+ static snakeToCamel(snakeStr) {
132
+ return snakeStr.replace(/(_\w)/g, match => match[1].toUpperCase());
133
+ }
113
134
 
114
- /**
115
- * Returns The public certificate to upload.
116
- * @return {string}
117
- */
118
- }, {
119
- key: "getPublicCert",
120
- value: function getPublicCert() {
121
- return this.publicCert;
122
- }
135
+ /**
136
+ * @return {Metadata}
137
+ */
138
+ getMetadata() {
139
+ return this.metadata;
140
+ }
123
141
 
124
- /**
125
- * Sets The public certificate to upload.
126
- * @param {string} publicCert The public certificate to upload.
127
- */
128
- }, {
129
- key: "setPublicCert",
130
- value: function setPublicCert(publicCert) {
131
- this.publicCert = publicCert;
132
- }
142
+ /**
143
+ * @param {Metadata} metadata
144
+ */
145
+ setMetadata(metadata) {
146
+ this.metadata = metadata;
147
+ }
133
148
 
134
- /**
135
- * Returns The private key to upload.
136
- * @return {string}
137
- */
138
- }, {
139
- key: "getPrivateKey",
140
- value: function getPrivateKey() {
141
- return this.privateKey;
142
- }
149
+ /**
150
+ * Returns The public certificate to upload.
151
+ * @return {string}
152
+ */
153
+ getPublicCert() {
154
+ return this.publicCert;
155
+ }
143
156
 
144
- /**
145
- * Sets The private key to upload.
146
- * @param {string} privateKey The private key to upload.
147
- */
148
- }, {
149
- key: "setPrivateKey",
150
- value: function setPrivateKey(privateKey) {
151
- this.privateKey = privateKey;
152
- }
157
+ /**
158
+ * Sets The public certificate to upload.
159
+ * @param {string} publicCert The public certificate to upload.
160
+ */
161
+ setPublicCert(publicCert) {
162
+ this.publicCert = publicCert;
163
+ }
153
164
 
154
- /**
155
- * Returns The CA certificate or chain to upload.
156
- * @return {string}
157
- */
158
- }, {
159
- key: "getCa",
160
- value: function getCa() {
161
- return this.ca;
162
- }
165
+ /**
166
+ * Returns The private key to upload.
167
+ * @return {string}
168
+ */
169
+ getPrivateKey() {
170
+ return this.privateKey;
171
+ }
163
172
 
164
- /**
165
- * Sets The CA certificate or chain to upload.
166
- * @param {string} ca The CA certificate or chain to upload.
167
- */
168
- }, {
169
- key: "setCa",
170
- value: function setCa(ca) {
171
- this.ca = ca;
172
- }
173
+ /**
174
+ * Sets The private key to upload.
175
+ * @param {string} privateKey The private key to upload.
176
+ */
177
+ setPrivateKey(privateKey) {
178
+ this.privateKey = privateKey;
179
+ }
173
180
 
174
- /**
175
- * 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'.
176
- * @return {FQDN[]}
177
- */
178
- }, {
179
- key: "getAlternateFqdns",
180
- value: function getAlternateFqdns() {
181
- return this.alternateFqdns;
182
- }
181
+ /**
182
+ * Returns The CA certificate or chain to upload.
183
+ * @return {string}
184
+ */
185
+ getCa() {
186
+ return this.ca;
187
+ }
183
188
 
184
- /**
185
- * 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'.
186
- * @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'.
187
- */
188
- }, {
189
- key: "setAlternateFqdns",
190
- value: function setAlternateFqdns(alternateFqdns) {
191
- this.alternateFqdns = alternateFqdns;
192
- }
193
- }, {
194
- key: "toJson",
195
- value: function toJson(forMutation) {
196
- if (forMutation === false) {
197
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {
189
+ /**
190
+ * Sets The CA certificate or chain to upload.
191
+ * @param {string} ca The CA certificate or chain to upload.
192
+ */
193
+ setCa(ca) {
194
+ this.ca = ca;
195
+ }
196
+
197
+ /**
198
+ * 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'.
199
+ * @return {FQDN[]}
200
+ */
201
+ getAlternateFqdns() {
202
+ return this.alternateFqdns;
203
+ }
204
+
205
+ /**
206
+ * 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'.
207
+ * @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'.
208
+ */
209
+ setAlternateFqdns(alternateFqdns) {
210
+ this.alternateFqdns = alternateFqdns;
211
+ }
212
+
213
+ /**
214
+ * Returns If true, the certificate is generated with the provided alternate FQDNs and IPs.
215
+ * @return {boolean}
216
+ */
217
+ getShouldGenerate() {
218
+ return this.shouldGenerate;
219
+ }
220
+
221
+ /**
222
+ * Sets If true, the certificate is generated with the provided alternate FQDNs and IPs.
223
+ * @param {boolean} shouldGenerate If true, the certificate is generated with the provided alternate FQDNs and IPs.
224
+ */
225
+ setShouldGenerate(shouldGenerate) {
226
+ this.shouldGenerate = shouldGenerate;
227
+ }
228
+
229
+ /**
230
+ * 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).
231
+ * @return {IPAddress[]}
232
+ */
233
+ getAlternateIps() {
234
+ return this.alternateIps;
235
+ }
236
+
237
+ /**
238
+ * 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).
239
+ * @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).
240
+ */
241
+ setAlternateIps(alternateIps) {
242
+ this.alternateIps = alternateIps;
243
+ }
244
+ toJson(forMutation) {
245
+ if (forMutation === false) {
246
+ return {
247
+ ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {
198
248
  'metadata': this.getMetadata().toJson(false)
199
- } : {}), typeof this.getPublicCert() !== 'undefined' && this.getPublicCert() !== null ? {
249
+ } : {}),
250
+ ...(typeof this.getPublicCert() !== 'undefined' && this.getPublicCert() !== null ? {
200
251
  'publicCert': this.getPublicCert()
201
- } : {}), typeof this.getPrivateKey() !== 'undefined' && this.getPrivateKey() !== null ? {
252
+ } : {}),
253
+ ...(typeof this.getPrivateKey() !== 'undefined' && this.getPrivateKey() !== null ? {
202
254
  'privateKey': this.getPrivateKey()
203
- } : {}), typeof this.getCa() !== 'undefined' && this.getCa() !== null ? {
255
+ } : {}),
256
+ ...(typeof this.getCa() !== 'undefined' && this.getCa() !== null ? {
204
257
  'ca': this.getCa()
205
- } : {}), typeof this.getAlternateFqdns() !== 'undefined' && this.getAlternateFqdns() !== null ? {
206
- 'alternateFqdns': this.getAlternateFqdns().map(function (item) {
207
- return item.toJson(false);
208
- })
209
- } : {}), typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {
258
+ } : {}),
259
+ ...(typeof this.getAlternateFqdns() !== 'undefined' && this.getAlternateFqdns() !== null ? {
260
+ 'alternateFqdns': this.getAlternateFqdns().map(item => item.toJson(false))
261
+ } : {}),
262
+ ...(typeof this.getShouldGenerate() !== 'undefined' && this.getShouldGenerate() !== null ? {
263
+ 'shouldGenerate': this.getShouldGenerate()
264
+ } : {}),
265
+ ...(typeof this.getAlternateIps() !== 'undefined' && this.getAlternateIps() !== null ? {
266
+ 'alternateIps': this.getAlternateIps().map(item => item.toJson(false))
267
+ } : {}),
268
+ ...(typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {
210
269
  'extId': this.getExtId()
211
- } : {}), typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {
212
- 'links': this.getLinks().map(function (item) {
213
- return item.toJson(false);
214
- })
215
- } : {}), typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {
270
+ } : {}),
271
+ ...(typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {
272
+ 'links': this.getLinks().map(item => item.toJson(false))
273
+ } : {}),
274
+ ...(typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {
216
275
  'tenantId': this.getTenantId()
217
- } : {}), {}, {
218
- '$reserved': this.get$Reserved(),
219
- '$objectType': this.get$ObjectType(),
220
- '$unknownFields': this.get$UnknownFields()
221
- });
222
- }
223
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {
276
+ } : {}),
277
+ '$reserved': this.get$Reserved(),
278
+ '$objectType': this.get$ObjectType(),
279
+ ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),
280
+ '$unknownFields': {}
281
+ };
282
+ }
283
+ return {
284
+ ...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {
224
285
  'metadata': this.getMetadata().toJson(false)
225
- } : {}), typeof this.getPublicCert() !== 'undefined' && this.getPublicCert() !== null ? {
286
+ } : {}),
287
+ ...(typeof this.getPublicCert() !== 'undefined' && this.getPublicCert() !== null ? {
226
288
  'publicCert': this.getPublicCert()
227
- } : {}), typeof this.getPrivateKey() !== 'undefined' && this.getPrivateKey() !== null ? {
289
+ } : {}),
290
+ ...(typeof this.getPrivateKey() !== 'undefined' && this.getPrivateKey() !== null ? {
228
291
  'privateKey': this.getPrivateKey()
229
- } : {}), typeof this.getCa() !== 'undefined' && this.getCa() !== null ? {
292
+ } : {}),
293
+ ...(typeof this.getCa() !== 'undefined' && this.getCa() !== null ? {
230
294
  'ca': this.getCa()
231
- } : {}), typeof this.getAlternateFqdns() !== 'undefined' && this.getAlternateFqdns() !== null ? {
232
- 'alternateFqdns': this.getAlternateFqdns().map(function (item) {
233
- return item.toJson(false);
234
- })
235
- } : {}), {}, {
236
- '$reserved': this.get$Reserved(),
237
- '$objectType': this.get$ObjectType(),
238
- '$unknownFields': this.get$UnknownFields()
239
- });
295
+ } : {}),
296
+ ...(typeof this.getAlternateFqdns() !== 'undefined' && this.getAlternateFqdns() !== null ? {
297
+ 'alternateFqdns': this.getAlternateFqdns().map(item => item.toJson(false))
298
+ } : {}),
299
+ ...(typeof this.getShouldGenerate() !== 'undefined' && this.getShouldGenerate() !== null ? {
300
+ 'shouldGenerate': this.getShouldGenerate()
301
+ } : {}),
302
+ ...(typeof this.getAlternateIps() !== 'undefined' && this.getAlternateIps() !== null ? {
303
+ 'alternateIps': this.getAlternateIps().map(item => item.toJson(false))
304
+ } : {}),
305
+ '$reserved': this.get$Reserved(),
306
+ '$objectType': this.get$ObjectType(),
307
+ ...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),
308
+ '$unknownFields': {}
309
+ };
310
+ }
311
+ validate(scope, properties) {
312
+ let propList = [];
313
+ if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes.default) {
314
+ //cases validate() and validate(scope)
315
+ propList = [];
316
+ } else if (arguments.length === 1) {
317
+ //case validate(properties)
318
+ propList = arguments[0];
319
+ scope = null;
320
+ } else {
321
+ //case validate(scope, properties)
322
+ propList = arguments[1];
240
323
  }
241
- }, {
242
- key: "validate",
243
- value: function validate(scope, properties) {
244
- var _this2 = this;
245
- var propList = [];
246
- if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes["default"]) {
247
- //cases validate() and validate(scope)
248
- propList = [];
249
- } else if (arguments.length === 1) {
250
- //case validate(properties)
251
- propList = arguments[0];
252
- scope = null;
324
+ let res = [];
325
+ let err = null;
326
+ propList.forEach(property => {
327
+ err = this.validateProperty(property, scope);
328
+ if (err) {
329
+ res.push(err);
330
+ }
331
+ });
332
+ return new Promise(function (resolve, reject) {
333
+ if (res.length !== 0) {
334
+ reject(err);
253
335
  } else {
254
- //case validate(scope, properties)
255
- propList = arguments[1];
336
+ resolve();
337
+ }
338
+ });
339
+ }
340
+ validateProperty(scope, property) {
341
+ if (property === "metadata") {
342
+ if (typeof this.metadata === 'undefined' || this.metadata === null) {
343
+ return new _ValidationError.default("metadata", "undefined or null");
256
344
  }
257
- var res = [];
258
- var err = null;
259
- propList.forEach(function (property) {
260
- err = _this2.validateProperty(property, scope);
261
- if (err) {
262
- res.push(err);
263
- }
264
- });
265
- return new Promise(function (resolve, reject) {
266
- if (res.length !== 0) {
267
- reject(err);
268
- } else {
269
- resolve();
270
- }
271
- });
272
345
  }
273
- }, {
274
- key: "validateProperty",
275
- value: function validateProperty(scope, property) {
276
- if (property === "metadata") {
277
- if (typeof this.metadata === 'undefined' || this.metadata === null) {
278
- return new _ValidationError["default"]("metadata", "undefined or null");
279
- }
346
+ if (property === "publicCert") {
347
+ if (typeof this.publicCert === 'undefined' || this.publicCert === null) {
348
+ return new _ValidationError.default("publicCert", "undefined or null");
280
349
  }
281
- if (property === "publicCert") {
282
- if (typeof this.publicCert === 'undefined' || this.publicCert === null) {
283
- return new _ValidationError["default"]("publicCert", "undefined or null");
284
- }
285
- if (!_ValidationUtils["default"].validateMaxLength(this.publicCert, 2000000)) {
286
- return new _ValidationError["default"]("publicCert", "does not satisfy required maxLength constraint: 2000000");
287
- }
288
- if (!_ValidationUtils["default"].validateMinLength(this.publicCert, 1)) {
289
- return new _ValidationError["default"]("publicCert", "does not satisfy required minLength constraint: 1");
290
- }
350
+ if (!_ValidationUtils.default.validateMaxLength(this.publicCert, 2000000)) {
351
+ return new _ValidationError.default("publicCert", "does not satisfy required maxLength constraint: 2000000");
291
352
  }
292
- if (property === "privateKey") {
293
- if (typeof this.privateKey === 'undefined' || this.privateKey === null) {
294
- return new _ValidationError["default"]("privateKey", "undefined or null");
295
- }
296
- if (!_ValidationUtils["default"].validateMaxLength(this.privateKey, 2000000)) {
297
- return new _ValidationError["default"]("privateKey", "does not satisfy required maxLength constraint: 2000000");
298
- }
299
- if (!_ValidationUtils["default"].validateMinLength(this.privateKey, 1)) {
300
- return new _ValidationError["default"]("privateKey", "does not satisfy required minLength constraint: 1");
301
- }
353
+ if (!_ValidationUtils.default.validateMinLength(this.publicCert, 1)) {
354
+ return new _ValidationError.default("publicCert", "does not satisfy required minLength constraint: 1");
302
355
  }
303
- if (property === "ca") {
304
- if (typeof this.ca === 'undefined' || this.ca === null) {
305
- return new _ValidationError["default"]("ca", "undefined or null");
306
- }
307
- if (!_ValidationUtils["default"].validateMaxLength(this.ca, 2000000)) {
308
- return new _ValidationError["default"]("ca", "does not satisfy required maxLength constraint: 2000000");
309
- }
310
- if (!_ValidationUtils["default"].validateMinLength(this.ca, 1)) {
311
- return new _ValidationError["default"]("ca", "does not satisfy required minLength constraint: 1");
312
- }
356
+ }
357
+ if (property === "privateKey") {
358
+ if (typeof this.privateKey === 'undefined' || this.privateKey === null) {
359
+ return new _ValidationError.default("privateKey", "undefined or null");
313
360
  }
314
- if (property === "alternateFqdns") {
315
- if (typeof this.alternateFqdns === 'undefined' || this.alternateFqdns === null) {
316
- return new _ValidationError["default"]("alternateFqdns", "undefined or null");
317
- }
318
- if (!_ValidationUtils["default"].validateMaxItems(this.alternateFqdns, 999)) {
319
- return new _ValidationError["default"]("alternateFqdns", "does not satisfy required maxItems constraint: 999");
320
- }
321
- if (!_ValidationUtils["default"].validateMinItems(this.alternateFqdns, 1)) {
322
- return new _ValidationError["default"]("alternateFqdns", "does not satisfy required minItems constraint: 1");
323
- }
361
+ if (!_ValidationUtils.default.validateMaxLength(this.privateKey, 2000000)) {
362
+ return new _ValidationError.default("privateKey", "does not satisfy required maxLength constraint: 2000000");
363
+ }
364
+ if (!_ValidationUtils.default.validateMinLength(this.privateKey, 1)) {
365
+ return new _ValidationError.default("privateKey", "does not satisfy required minLength constraint: 1");
324
366
  }
325
- return new _ValidationError["default"](property, "no such property exists");
326
367
  }
327
- }], [{
328
- key: "constructFromObject",
329
- value: function constructFromObject(data) {
330
- var obj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
331
- var callFromChild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
332
- var items, item, i, itemArr, discriminator;
333
- if (data) {
334
- obj = obj || new Certificate();
335
- _ExternalizableAbstractModel["default"].constructFromObject(data, obj, true);
336
- if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {
337
- obj.setMetadata(_Metadata["default"].constructFromObject(data['metadata']));
338
- }
339
- if (data.hasOwnProperty('publicCert') && data.publicCert !== null && data.publicCert !== undefined) {
340
- obj.setPublicCert(data['publicCert']);
341
- }
342
- if (data.hasOwnProperty('privateKey') && data.privateKey !== null && data.privateKey !== undefined) {
343
- obj.setPrivateKey(data['privateKey']);
344
- }
345
- if (data.hasOwnProperty('ca') && data.ca !== null && data.ca !== undefined) {
346
- obj.setCa(data['ca']);
347
- }
348
- if (data.hasOwnProperty('alternateFqdns') && data.alternateFqdns !== null && data.alternateFqdns !== undefined) {
349
- itemArr = [];
350
- items = data.alternateFqdns;
351
- for (i = 0; i < items.length; i++) {
352
- item = _FQDN["default"].constructFromObject(items[i], undefined);
353
- itemArr.push(item);
354
- }
355
- obj.setAlternateFqdns(itemArr);
356
- }
357
- if (!callFromChild) {
358
- obj.$unknownFields = _objectSpread({}, data.$unknownFields);
359
- for (var property in data) {
360
- // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,
361
- // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).
362
- // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.
363
- // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.
364
- if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
365
- obj.$unknownFields[property] = data[property];
366
- }
367
- }
368
- }
368
+ if (property === "ca") {
369
+ if (typeof this.ca === 'undefined' || this.ca === null) {
370
+ return new _ValidationError.default("ca", "undefined or null");
371
+ }
372
+ if (!_ValidationUtils.default.validateMaxLength(this.ca, 2000000)) {
373
+ return new _ValidationError.default("ca", "does not satisfy required maxLength constraint: 2000000");
374
+ }
375
+ if (!_ValidationUtils.default.validateMinLength(this.ca, 1)) {
376
+ return new _ValidationError.default("ca", "does not satisfy required minLength constraint: 1");
369
377
  }
370
- return obj;
371
378
  }
372
-
373
- /**
374
- * Converts a given snake_case string to camelCase.
375
- * @param {string} snakeStr - The input string in snake_case format.
376
- * @returns {string} - The converted string in camelCase format.
377
- */
378
- }, {
379
- key: "snakeToCamel",
380
- value: function snakeToCamel(snakeStr) {
381
- return snakeStr.replace(/(_\w)/g, function (match) {
382
- return match[1].toUpperCase();
383
- });
379
+ if (property === "alternateFqdns") {
380
+ if (typeof this.alternateFqdns === 'undefined' || this.alternateFqdns === null) {
381
+ return new _ValidationError.default("alternateFqdns", "undefined or null");
382
+ }
383
+ if (!_ValidationUtils.default.validateMaxItems(this.alternateFqdns, 999)) {
384
+ return new _ValidationError.default("alternateFqdns", "does not satisfy required maxItems constraint: 999");
385
+ }
386
+ if (!_ValidationUtils.default.validateMinItems(this.alternateFqdns, 1)) {
387
+ return new _ValidationError.default("alternateFqdns", "does not satisfy required minItems constraint: 1");
388
+ }
389
+ }
390
+ if (property === "shouldGenerate") {
391
+ if (typeof this.shouldGenerate === 'undefined' || this.shouldGenerate === null) {
392
+ return new _ValidationError.default("shouldGenerate", "undefined or null");
393
+ }
384
394
  }
385
- }]);
386
- }(_ExternalizableAbstractModel["default"]);
395
+ if (property === "alternateIps") {
396
+ if (typeof this.alternateIps === 'undefined' || this.alternateIps === null) {
397
+ return new _ValidationError.default("alternateIps", "undefined or null");
398
+ }
399
+ if (!_ValidationUtils.default.validateMaxItems(this.alternateIps, 1000)) {
400
+ return new _ValidationError.default("alternateIps", "does not satisfy required maxItems constraint: 1000");
401
+ }
402
+ if (!_ValidationUtils.default.validateMinItems(this.alternateIps, 1)) {
403
+ return new _ValidationError.default("alternateIps", "does not satisfy required minItems constraint: 1");
404
+ }
405
+ }
406
+ return new _ValidationError.default(property, "no such property exists");
407
+ }
408
+ }
409
+
387
410
  /**
388
411
  * @memberof Certificate
389
412
  */
413
+ exports.default = Certificate;
390
414
  function _toJsonMapType(obj, forMutation) {
391
415
  if (obj instanceof Map) {
392
- return Object.fromEntries(Array.from(obj, function (_ref) {
393
- var _ref2 = _slicedToArray(_ref, 2),
394
- k = _ref2[0],
395
- v = _ref2[1];
396
- return [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v];
397
- }));
398
- } else if (_typeof(obj) === 'object' && obj != null && obj.constructor === Object) {
399
- return Object.fromEntries(Array.from(Object.entries(obj), function (entry) {
416
+ return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v]));
417
+ } else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {
418
+ return Object.fromEntries(Array.from(Object.entries(obj), entry => {
400
419
  return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
401
420
  }));
402
421
  }
@@ -440,19 +459,32 @@ Certificate.prototype.ca = undefined;
440
459
  */
441
460
  Certificate.prototype.alternateFqdns = undefined;
442
461
 
462
+ /**
463
+ * If true, the certificate is generated with the provided alternate FQDNs and IPs.
464
+ * @memberof Certificate
465
+ * @default false
466
+ */
467
+ Certificate.prototype.shouldGenerate = false;
468
+
469
+ /**
470
+ * 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).
471
+ * @memberof Certificate
472
+ */
473
+ Certificate.prototype.alternateIps = undefined;
474
+
443
475
  /**
444
476
  * A globally unique identifier of an instance that is suitable for external consumption.
445
477
  * @memberof Certificate
446
478
  */
447
- _ExternalizableAbstractModel["default"].prototype.extId = undefined;
479
+ _ExternalizableAbstractModel.default.prototype.extId = undefined;
448
480
  /**
449
481
  * 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.
450
482
  * @memberof Certificate
451
483
  */
452
- _ExternalizableAbstractModel["default"].prototype.links = undefined;
484
+ _ExternalizableAbstractModel.default.prototype.links = undefined;
453
485
  /**
454
- * 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).
486
+ * 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).
455
487
  * @memberof Certificate
456
488
  */
457
- _TenantAwareModel["default"].prototype.tenantId = undefined;
489
+ _TenantAwareModel.default.prototype.tenantId = undefined;
458
490
  // Implement OneOfobjects.v4.config.GetCertificateApiResponsedata interface: