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