@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.
- package/README.md +31 -18
- package/dist/Ntnx-Objects-js-client-prod.js +1 -1
- package/dist/Ntnx-Objects-js-client.js +283 -277
- package/dist/es/ApiClient.d.ts +35 -7
- package/dist/es/ApiClient.js +862 -684
- package/dist/es/Paginable.d.ts +1 -1
- package/dist/es/Paginable.js +144 -183
- package/dist/es/apis/objectstores-endpoints.d.ts +5 -69
- package/dist/es/apis/objectstores-endpoints.js +406 -479
- package/dist/es/apis/stats-endpoints.d.ts +1 -24
- package/dist/es/apis/stats-endpoints.js +73 -105
- package/dist/es/index.js +120 -120
- package/dist/es/models/common/v1/config/FQDN.d.ts +2 -7
- package/dist/es/models/common/v1/config/FQDN.js +141 -180
- package/dist/es/models/common/v1/config/Flag.d.ts +2 -8
- package/dist/es/models/common/v1/config/Flag.js +170 -211
- package/dist/es/models/common/v1/config/IPAddress.d.ts +2 -20
- package/dist/es/models/common/v1/config/IPAddress.js +170 -217
- package/dist/es/models/common/v1/config/IPv4Address.d.ts +2 -8
- package/dist/es/models/common/v1/config/IPv4Address.js +174 -215
- package/dist/es/models/common/v1/config/IPv6Address.d.ts +2 -8
- package/dist/es/models/common/v1/config/IPv6Address.js +174 -215
- package/dist/es/models/common/v1/config/KVPair.d.ts +2 -8
- package/dist/es/models/common/v1/config/KVPair.js +225 -270
- package/dist/es/models/common/v1/config/MapOfStringWrapper.d.ts +2 -7
- package/dist/es/models/common/v1/config/MapOfStringWrapper.js +139 -178
- package/dist/es/models/common/v1/config/Message.d.ts +2 -10
- package/dist/es/models/common/v1/config/Message.js +213 -258
- package/dist/es/models/common/v1/config/MessageSeverity.js +7 -9
- package/dist/es/models/common/v1/config/Metadata.d.ts +2 -11
- package/dist/es/models/common/v1/config/Metadata.js +261 -308
- package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +5 -10
- package/dist/es/models/common/v1/config/TenantAwareModel.js +138 -178
- package/dist/es/models/common/v1/response/ApiLink.d.ts +2 -8
- package/dist/es/models/common/v1/response/ApiLink.js +165 -206
- package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +2 -40
- package/dist/es/models/common/v1/response/ApiResponseMetadata.js +281 -344
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -15
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +155 -203
- package/dist/es/models/common/v1/stats/DownSamplingOperator.js +7 -9
- package/dist/es/models/common/v1/stats/TimeIntValuePair.d.ts +2 -8
- package/dist/es/models/common/v1/stats/TimeIntValuePair.js +165 -206
- package/dist/es/models/objects/v4/config/Certificate.d.ts +1 -58
- package/dist/es/models/objects/v4/config/Certificate.js +319 -381
- package/dist/es/models/objects/v4/config/CertificateProjection.d.ts +1 -1
- package/dist/es/models/objects/v4/config/CertificateProjection.js +73 -102
- package/dist/es/models/objects/v4/config/CreateCertificateApiResponse.d.ts +2 -45
- package/dist/es/models/objects/v4/config/CreateCertificateApiResponse.js +185 -240
- package/dist/es/models/objects/v4/config/CreateObjectstoreApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/CreateObjectstoreApiResponse.js +185 -240
- package/dist/es/models/objects/v4/config/DeleteObjectstoreApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/DeleteObjectstoreApiResponse.js +185 -240
- package/dist/es/models/objects/v4/config/GetCaApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/GetCaApiResponse.js +185 -240
- package/dist/es/models/objects/v4/config/GetCertificateApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/GetCertificateApiResponse.js +185 -240
- package/dist/es/models/objects/v4/config/GetObjectstoreApiResponse.d.ts +2 -45
- package/dist/es/models/objects/v4/config/GetObjectstoreApiResponse.js +185 -240
- package/dist/es/models/objects/v4/config/ListCertificatesApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/ListCertificatesApiResponse.js +211 -266
- package/dist/es/models/objects/v4/config/ListObjectstoresApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/ListObjectstoresApiResponse.js +211 -266
- package/dist/es/models/objects/v4/config/ObjectStore.d.ts +1 -96
- package/dist/es/models/objects/v4/config/ObjectStore.js +628 -711
- package/dist/es/models/objects/v4/config/ObjectStoreProjection.d.ts +1 -152
- package/dist/es/models/objects/v4/config/ObjectStoreProjection.js +221 -238
- package/dist/es/models/objects/v4/config/State.js +7 -9
- package/dist/es/models/objects/v4/config/UpdateObjectstoreApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/UpdateObjectstoreApiResponse.js +185 -240
- package/dist/es/models/objects/v4/error/AppMessage.d.ts +5 -15
- package/dist/es/models/objects/v4/error/AppMessage.js +264 -313
- package/dist/es/models/objects/v4/error/ErrorResponse.d.ts +2 -7
- package/dist/es/models/objects/v4/error/ErrorResponse.js +174 -217
- package/dist/es/models/objects/v4/error/SchemaValidationError.d.ts +2 -18
- package/dist/es/models/objects/v4/error/SchemaValidationError.js +248 -299
- package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +2 -9
- package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.js +190 -233
- package/dist/es/models/objects/v4/stats/GetObjectstoreStatsApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js +185 -240
- package/dist/es/models/objects/v4/stats/ObjectstoreStats.d.ts +1 -169
- package/dist/es/models/objects/v4/stats/ObjectstoreStats.js +957 -1129
- package/dist/es/models/objects/v4/stats/TimeFloatValuePair.d.ts +2 -8
- package/dist/es/models/objects/v4/stats/TimeFloatValuePair.js +165 -206
- package/dist/es/models/prism/v4/config/TaskReference.d.ts +5 -10
- package/dist/es/models/prism/v4/config/TaskReference.js +143 -182
- package/dist/es/models/validation/ValidationError.js +26 -42
- package/dist/es/models/validation/ValidationScopes.js +3 -3
- package/dist/es/utils/ValidationUtils.js +39 -69
- package/dist/lib/ApiClient.d.ts +35 -7
- package/dist/lib/ApiClient.js +862 -684
- package/dist/lib/Paginable.d.ts +1 -1
- package/dist/lib/Paginable.js +144 -183
- package/dist/lib/apis/objectstores-endpoints.d.ts +5 -69
- package/dist/lib/apis/objectstores-endpoints.js +406 -479
- package/dist/lib/apis/stats-endpoints.d.ts +1 -24
- package/dist/lib/apis/stats-endpoints.js +73 -105
- package/dist/lib/index.js +120 -120
- package/dist/lib/models/common/v1/config/FQDN.d.ts +2 -7
- package/dist/lib/models/common/v1/config/FQDN.js +141 -180
- package/dist/lib/models/common/v1/config/Flag.d.ts +2 -8
- package/dist/lib/models/common/v1/config/Flag.js +170 -211
- package/dist/lib/models/common/v1/config/IPAddress.d.ts +2 -20
- package/dist/lib/models/common/v1/config/IPAddress.js +170 -217
- package/dist/lib/models/common/v1/config/IPv4Address.d.ts +2 -8
- package/dist/lib/models/common/v1/config/IPv4Address.js +174 -215
- package/dist/lib/models/common/v1/config/IPv6Address.d.ts +2 -8
- package/dist/lib/models/common/v1/config/IPv6Address.js +174 -215
- package/dist/lib/models/common/v1/config/KVPair.d.ts +2 -8
- package/dist/lib/models/common/v1/config/KVPair.js +225 -270
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.d.ts +2 -7
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.js +139 -178
- package/dist/lib/models/common/v1/config/Message.d.ts +2 -10
- package/dist/lib/models/common/v1/config/Message.js +213 -258
- package/dist/lib/models/common/v1/config/MessageSeverity.js +7 -9
- package/dist/lib/models/common/v1/config/Metadata.d.ts +2 -11
- package/dist/lib/models/common/v1/config/Metadata.js +261 -308
- package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +5 -10
- package/dist/lib/models/common/v1/config/TenantAwareModel.js +138 -178
- package/dist/lib/models/common/v1/response/ApiLink.d.ts +2 -8
- package/dist/lib/models/common/v1/response/ApiLink.js +165 -206
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +2 -40
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +281 -344
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -15
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +155 -203
- package/dist/lib/models/common/v1/stats/DownSamplingOperator.js +7 -9
- package/dist/lib/models/common/v1/stats/TimeIntValuePair.d.ts +2 -8
- package/dist/lib/models/common/v1/stats/TimeIntValuePair.js +165 -206
- package/dist/lib/models/objects/v4/config/Certificate.d.ts +1 -58
- package/dist/lib/models/objects/v4/config/Certificate.js +319 -381
- package/dist/lib/models/objects/v4/config/CertificateProjection.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/CertificateProjection.js +73 -102
- package/dist/lib/models/objects/v4/config/CreateCertificateApiResponse.d.ts +2 -45
- package/dist/lib/models/objects/v4/config/CreateCertificateApiResponse.js +185 -240
- package/dist/lib/models/objects/v4/config/CreateObjectstoreApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/CreateObjectstoreApiResponse.js +185 -240
- package/dist/lib/models/objects/v4/config/DeleteObjectstoreApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/DeleteObjectstoreApiResponse.js +185 -240
- package/dist/lib/models/objects/v4/config/GetCaApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/GetCaApiResponse.js +185 -240
- package/dist/lib/models/objects/v4/config/GetCertificateApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/GetCertificateApiResponse.js +185 -240
- package/dist/lib/models/objects/v4/config/GetObjectstoreApiResponse.d.ts +2 -45
- package/dist/lib/models/objects/v4/config/GetObjectstoreApiResponse.js +185 -240
- package/dist/lib/models/objects/v4/config/ListCertificatesApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/ListCertificatesApiResponse.js +211 -266
- package/dist/lib/models/objects/v4/config/ListObjectstoresApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/ListObjectstoresApiResponse.js +211 -266
- package/dist/lib/models/objects/v4/config/ObjectStore.d.ts +1 -96
- package/dist/lib/models/objects/v4/config/ObjectStore.js +628 -711
- package/dist/lib/models/objects/v4/config/ObjectStoreProjection.d.ts +1 -152
- package/dist/lib/models/objects/v4/config/ObjectStoreProjection.js +221 -238
- package/dist/lib/models/objects/v4/config/State.js +7 -9
- package/dist/lib/models/objects/v4/config/UpdateObjectstoreApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/UpdateObjectstoreApiResponse.js +185 -240
- package/dist/lib/models/objects/v4/error/AppMessage.d.ts +5 -15
- package/dist/lib/models/objects/v4/error/AppMessage.js +264 -313
- package/dist/lib/models/objects/v4/error/ErrorResponse.d.ts +2 -7
- package/dist/lib/models/objects/v4/error/ErrorResponse.js +174 -217
- package/dist/lib/models/objects/v4/error/SchemaValidationError.d.ts +2 -18
- package/dist/lib/models/objects/v4/error/SchemaValidationError.js +248 -299
- package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +2 -9
- package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.js +190 -233
- package/dist/lib/models/objects/v4/stats/GetObjectstoreStatsApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js +185 -240
- package/dist/lib/models/objects/v4/stats/ObjectstoreStats.d.ts +1 -169
- package/dist/lib/models/objects/v4/stats/ObjectstoreStats.js +957 -1129
- package/dist/lib/models/objects/v4/stats/TimeFloatValuePair.d.ts +2 -8
- package/dist/lib/models/objects/v4/stats/TimeFloatValuePair.js +165 -206
- package/dist/lib/models/prism/v4/config/TaskReference.d.ts +5 -10
- package/dist/lib/models/prism/v4/config/TaskReference.js +143 -182
- package/dist/lib/models/validation/ValidationError.js +26 -42
- package/dist/lib/models/validation/ValidationScopes.js +3 -3
- package/dist/lib/utils/ValidationUtils.js +39 -69
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
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 : {
|
|
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.
|
|
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:
|
|
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.
|
|
33
|
+
* @version 4.0.2
|
|
56
34
|
* @class Certificate
|
|
57
35
|
* @extends ExternalizableAbstractModel
|
|
58
36
|
*/
|
|
59
37
|
var _Certificate_brand = /*#__PURE__*/new WeakSet();
|
|
60
|
-
|
|
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
|
-
|
|
67
|
-
|
|
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(
|
|
77
|
-
|
|
52
|
+
_classPrivateMethodInitSpec(this, _Certificate_brand);
|
|
53
|
+
this.$objectType = "objects.v4.config.Certificate";
|
|
78
54
|
/** @type {object<string, any>} */
|
|
79
|
-
|
|
55
|
+
this.$reserved = {
|
|
80
56
|
'$fv': "v4.r0"
|
|
81
57
|
};
|
|
82
58
|
/** @type {object<string, any>} */
|
|
83
|
-
|
|
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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
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
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
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
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
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
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
-
} : {}),
|
|
249
|
+
} : {}),
|
|
250
|
+
...(typeof this.getPublicCert() !== 'undefined' && this.getPublicCert() !== null ? {
|
|
241
251
|
'publicCert': this.getPublicCert()
|
|
242
|
-
} : {}),
|
|
252
|
+
} : {}),
|
|
253
|
+
...(typeof this.getPrivateKey() !== 'undefined' && this.getPrivateKey() !== null ? {
|
|
243
254
|
'privateKey': this.getPrivateKey()
|
|
244
|
-
} : {}),
|
|
255
|
+
} : {}),
|
|
256
|
+
...(typeof this.getCa() !== 'undefined' && this.getCa() !== null ? {
|
|
245
257
|
'ca': this.getCa()
|
|
246
|
-
} : {}),
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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
|
-
} : {}),
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
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
|
-
} : {}),
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
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
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
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
|
-
} : {}),
|
|
286
|
+
} : {}),
|
|
287
|
+
...(typeof this.getPublicCert() !== 'undefined' && this.getPublicCert() !== null ? {
|
|
273
288
|
'publicCert': this.getPublicCert()
|
|
274
|
-
} : {}),
|
|
289
|
+
} : {}),
|
|
290
|
+
...(typeof this.getPrivateKey() !== 'undefined' && this.getPrivateKey() !== null ? {
|
|
275
291
|
'privateKey': this.getPrivateKey()
|
|
276
|
-
} : {}),
|
|
292
|
+
} : {}),
|
|
293
|
+
...(typeof this.getCa() !== 'undefined' && this.getCa() !== null ? {
|
|
277
294
|
'ca': this.getCa()
|
|
278
|
-
} : {}),
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
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
|
-
} : {}),
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
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
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
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
|
-
|
|
308
|
-
|
|
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
|
-
|
|
328
|
-
|
|
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 (
|
|
335
|
-
|
|
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 (
|
|
346
|
-
|
|
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
|
-
|
|
357
|
-
|
|
358
|
-
|
|
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 (
|
|
368
|
-
|
|
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 (
|
|
379
|
-
|
|
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
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
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
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
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
|
-
|
|
456
|
-
|
|
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
|
-
|
|
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,
|
|
474
|
-
|
|
475
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
489
|
+
_TenantAwareModel.default.prototype.tenantId = undefined;
|
|
552
490
|
// Implement OneOfobjects.v4.config.GetCertificateApiResponsedata interface:
|