@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
|
@@ -1,71 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
8
7
|
var _FQDN = _interopRequireDefault(require("../../../common/v1/config/FQDN"));
|
|
9
8
|
var _IPAddress = _interopRequireDefault(require("../../../common/v1/config/IPAddress"));
|
|
10
9
|
var _Metadata = _interopRequireDefault(require("../../../common/v1/config/Metadata"));
|
|
11
10
|
var _TenantAwareModel = _interopRequireDefault(require("../../../common/v1/config/TenantAwareModel"));
|
|
12
11
|
var _ExternalizableAbstractModel = _interopRequireDefault(require("../../../common/v1/response/ExternalizableAbstractModel"));
|
|
13
|
-
var
|
|
12
|
+
var _Certificate = _interopRequireDefault(require("./Certificate"));
|
|
14
13
|
var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
|
|
15
14
|
var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
|
|
16
15
|
var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
|
|
17
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : {
|
|
18
|
-
|
|
19
|
-
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; }
|
|
20
|
-
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; }
|
|
21
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
22
|
-
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); } }
|
|
23
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
24
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
25
|
-
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); }
|
|
26
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
27
|
-
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); }
|
|
28
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
29
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
30
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
31
|
-
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); }
|
|
32
|
-
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 }; }
|
|
17
|
+
/*
|
|
33
18
|
* Nutanix Objects Storage Management APIs
|
|
34
19
|
*
|
|
35
|
-
* OpenAPI spec version: 4.0.
|
|
20
|
+
* OpenAPI spec version: 4.0.2
|
|
36
21
|
*
|
|
37
22
|
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
38
23
|
*
|
|
39
|
-
* Open API Dev Platform Codegen version:
|
|
24
|
+
* Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE
|
|
40
25
|
*
|
|
41
26
|
* Do not edit the class manually.
|
|
42
27
|
*
|
|
43
28
|
*/
|
|
29
|
+
|
|
44
30
|
/**
|
|
45
31
|
* The CertificateProjection model module.
|
|
46
32
|
* @module Ntnx/CertificateProjection
|
|
47
|
-
* @version 4.0.
|
|
33
|
+
* @version 4.0.2
|
|
48
34
|
* @class CertificateProjection
|
|
49
35
|
* @extends Certificate
|
|
50
36
|
*/
|
|
51
|
-
|
|
37
|
+
class CertificateProjection extends _Certificate.default {
|
|
52
38
|
/**
|
|
53
39
|
* Constructs a new <code>CertificateProjection</code>.
|
|
54
40
|
* @alias module:Ntnx/CertificateProjection
|
|
55
41
|
* @extends module:Ntnx/Certificate
|
|
56
42
|
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
_this = _callSuper(this, CertificateProjection);
|
|
61
|
-
_this.$objectType = "objects.v4.config.CertificateProjection";
|
|
43
|
+
constructor() {
|
|
44
|
+
super();
|
|
45
|
+
this.$objectType = "objects.v4.config.CertificateProjection";
|
|
62
46
|
/** @type {object<string, any>} */
|
|
63
|
-
|
|
47
|
+
this.$reserved = {
|
|
64
48
|
'$fv': "v4.r0"
|
|
65
49
|
};
|
|
66
50
|
/** @type {object<string, any>} */
|
|
67
|
-
|
|
68
|
-
return _this;
|
|
51
|
+
this.$unknownFields = {};
|
|
69
52
|
}
|
|
70
53
|
|
|
71
54
|
/**
|
|
@@ -76,80 +59,68 @@ var CertificateProjection = exports["default"] = /*#__PURE__*/function (_Certifi
|
|
|
76
59
|
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
77
60
|
* @return {module:Ntnx/CertificateProjection} The populated <code>CertificateProjection</code> instance.
|
|
78
61
|
*/
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
var res = [];
|
|
97
|
-
var err = null;
|
|
98
|
-
propList.forEach(function (property) {
|
|
99
|
-
err = _this2.validateProperty(property, scope);
|
|
100
|
-
if (err) {
|
|
101
|
-
res.push(err);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
return new Promise(function (resolve, reject) {
|
|
105
|
-
if (res.length !== 0) {
|
|
106
|
-
reject(err);
|
|
107
|
-
} else {
|
|
108
|
-
resolve();
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}, {
|
|
113
|
-
key: "validateProperty",
|
|
114
|
-
value: function validateProperty(scope, property) {
|
|
115
|
-
return new _ValidationError["default"](property, "no such property exists");
|
|
116
|
-
}
|
|
117
|
-
}], [{
|
|
118
|
-
key: "constructFromObject",
|
|
119
|
-
value: function constructFromObject(data) {
|
|
120
|
-
var obj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
121
|
-
var callFromChild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
122
|
-
var items, item, i, itemArr, discriminator;
|
|
123
|
-
if (data) {
|
|
124
|
-
obj = obj || new CertificateProjection();
|
|
125
|
-
_Certificate2["default"].constructFromObject(data, obj, true);
|
|
126
|
-
if (!callFromChild) {
|
|
127
|
-
obj.$unknownFields = _objectSpread({}, data.$unknownFields);
|
|
128
|
-
for (var property in data) {
|
|
129
|
-
// Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,
|
|
130
|
-
// as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).
|
|
131
|
-
// Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.
|
|
132
|
-
// If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.
|
|
133
|
-
if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
|
|
134
|
-
obj.$unknownFields[property] = data[property];
|
|
135
|
-
}
|
|
62
|
+
static constructFromObject(data, obj = null, callFromChild = false) {
|
|
63
|
+
let items, item, i, itemArr, discriminator;
|
|
64
|
+
if (data) {
|
|
65
|
+
obj = obj || new CertificateProjection();
|
|
66
|
+
_Certificate.default.constructFromObject(data, obj, true);
|
|
67
|
+
if (!callFromChild) {
|
|
68
|
+
obj.$unknownFields = {
|
|
69
|
+
...data.$unknownFields
|
|
70
|
+
};
|
|
71
|
+
for (const property in data) {
|
|
72
|
+
// Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,
|
|
73
|
+
// as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).
|
|
74
|
+
// Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.
|
|
75
|
+
// If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.
|
|
76
|
+
if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
|
|
77
|
+
obj.$unknownFields[property] = data[property];
|
|
136
78
|
}
|
|
137
79
|
}
|
|
138
80
|
}
|
|
139
|
-
return obj;
|
|
140
81
|
}
|
|
82
|
+
return obj;
|
|
83
|
+
}
|
|
141
84
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
85
|
+
/**
|
|
86
|
+
* Converts a given snake_case string to camelCase.
|
|
87
|
+
* @param {string} snakeStr - The input string in snake_case format.
|
|
88
|
+
* @returns {string} - The converted string in camelCase format.
|
|
89
|
+
*/
|
|
90
|
+
static snakeToCamel(snakeStr) {
|
|
91
|
+
return snakeStr.replace(/(_\w)/g, match => match[1].toUpperCase());
|
|
92
|
+
}
|
|
93
|
+
validate(scope, properties) {
|
|
94
|
+
let propList = [];
|
|
95
|
+
if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes.default) {
|
|
96
|
+
//cases validate() and validate(scope)
|
|
97
|
+
propList = [];
|
|
98
|
+
} else if (arguments.length === 1) {
|
|
99
|
+
//case validate(properties)
|
|
100
|
+
propList = arguments[0];
|
|
101
|
+
scope = null;
|
|
102
|
+
} else {
|
|
103
|
+
//case validate(scope, properties)
|
|
104
|
+
propList = arguments[1];
|
|
153
105
|
}
|
|
154
|
-
|
|
155
|
-
|
|
106
|
+
let res = [];
|
|
107
|
+
let err = null;
|
|
108
|
+
propList.forEach(property => {
|
|
109
|
+
err = this.validateProperty(property, scope);
|
|
110
|
+
if (err) {
|
|
111
|
+
res.push(err);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
return new Promise(function (resolve, reject) {
|
|
115
|
+
if (res.length !== 0) {
|
|
116
|
+
reject(err);
|
|
117
|
+
} else {
|
|
118
|
+
resolve();
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
validateProperty(scope, property) {
|
|
123
|
+
return new _ValidationError.default(property, "no such property exists");
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
exports.default = CertificateProjection;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The CreateCertificateApiResponse model module.
|
|
3
3
|
* @module Ntnx/CreateCertificateApiResponse
|
|
4
|
-
* @version 4.0.
|
|
4
|
+
* @version 4.0.2
|
|
5
5
|
* @class CreateCertificateApiResponse
|
|
6
6
|
*/
|
|
7
7
|
export default class CreateCertificateApiResponse extends Paginable {
|
|
@@ -46,50 +46,7 @@ export default class CreateCertificateApiResponse extends Paginable {
|
|
|
46
46
|
get$Reserved(): any;
|
|
47
47
|
get$ObjectType(): string;
|
|
48
48
|
get$UnknownFields(): any;
|
|
49
|
-
toJson(forMutation: any):
|
|
50
|
-
$reserved: any;
|
|
51
|
-
$objectType: string;
|
|
52
|
-
$unknownFields: any;
|
|
53
|
-
data?: any;
|
|
54
|
-
metadata?: {
|
|
55
|
-
$reserved: any;
|
|
56
|
-
$objectType: string;
|
|
57
|
-
$unknownFields: any;
|
|
58
|
-
extraInfo?: {
|
|
59
|
-
$reserved: any;
|
|
60
|
-
$objectType: string;
|
|
61
|
-
$unknownFields: any;
|
|
62
|
-
value?: any;
|
|
63
|
-
name?: string;
|
|
64
|
-
}[];
|
|
65
|
-
messages?: {
|
|
66
|
-
$reserved: any;
|
|
67
|
-
$objectType: string;
|
|
68
|
-
$unknownFields: any;
|
|
69
|
-
severity?: string;
|
|
70
|
-
locale?: string;
|
|
71
|
-
message?: string;
|
|
72
|
-
code?: string;
|
|
73
|
-
}[];
|
|
74
|
-
totalAvailableResults?: number;
|
|
75
|
-
links?: {
|
|
76
|
-
$reserved: any; /**
|
|
77
|
-
* @param {TaskReference | ErrorResponse} data
|
|
78
|
-
*/
|
|
79
|
-
$objectType: string;
|
|
80
|
-
$unknownFields: any;
|
|
81
|
-
rel?: string;
|
|
82
|
-
href?: string;
|
|
83
|
-
}[];
|
|
84
|
-
flags?: {
|
|
85
|
-
$reserved: any;
|
|
86
|
-
$objectType: string;
|
|
87
|
-
$unknownFields: any;
|
|
88
|
-
value?: boolean;
|
|
89
|
-
name?: string;
|
|
90
|
-
}[];
|
|
91
|
-
};
|
|
92
|
-
};
|
|
49
|
+
toJson(forMutation: any): any;
|
|
93
50
|
validate(scope: any, properties: any, ...args: any[]): Promise<any>;
|
|
94
51
|
validateProperty(scope: any, property: any): ValidationError;
|
|
95
52
|
#private;
|