@nutanix-scratch/objects-js-client 4.0.1-beta.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -20
- package/dist/Ntnx-Objects-js-client-prod.js +1 -1
- package/dist/Ntnx-Objects-js-client.js +331 -259
- 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 +9 -70
- package/dist/es/apis/objectstores-endpoints.js +407 -477
- package/dist/es/apis/stats-endpoints.d.ts +46 -0
- package/dist/es/apis/stats-endpoints.js +122 -0
- package/dist/es/index.d.ts +13 -1
- package/dist/es/index.js +152 -104
- 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.d.ts +19 -0
- package/dist/es/models/common/v1/stats/DownSamplingOperator.js +107 -0
- package/dist/es/models/common/v1/stats/TimeIntValuePair.d.ts +58 -0
- package/dist/es/models/common/v1/stats/TimeIntValuePair.js +272 -0
- package/dist/es/models/objects/v4/config/Certificate.d.ts +24 -34
- package/dist/es/models/objects/v4/config/Certificate.js +342 -310
- package/dist/es/models/objects/v4/config/CertificateProjection.d.ts +1 -1
- package/dist/es/models/objects/v4/config/CertificateProjection.js +75 -103
- package/dist/es/models/objects/v4/config/CreateCertificateApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/CreateCertificateApiResponse.js +187 -242
- package/dist/es/models/objects/v4/config/CreateObjectstoreApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/CreateObjectstoreApiResponse.js +187 -242
- package/dist/es/models/objects/v4/config/DeleteObjectstoreApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/DeleteObjectstoreApiResponse.js +187 -242
- package/dist/es/models/objects/v4/config/GetCaApiResponse.d.ts +2 -45
- package/dist/es/models/objects/v4/config/GetCaApiResponse.js +187 -242
- package/dist/es/models/objects/v4/config/GetCertificateApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/GetCertificateApiResponse.js +187 -242
- package/dist/es/models/objects/v4/config/GetObjectstoreApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/GetObjectstoreApiResponse.js +187 -242
- package/dist/es/models/objects/v4/config/ListCertificatesApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/ListCertificatesApiResponse.js +213 -268
- package/dist/es/models/objects/v4/config/ListObjectstoresApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/ListObjectstoresApiResponse.js +213 -268
- package/dist/es/models/objects/v4/config/ObjectStore.d.ts +1 -96
- package/dist/es/models/objects/v4/config/ObjectStore.js +629 -712
- package/dist/es/models/objects/v4/config/ObjectStoreProjection.d.ts +1 -129
- package/dist/es/models/objects/v4/config/ObjectStoreProjection.js +222 -239
- 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 +187 -242
- package/dist/es/models/objects/v4/error/AppMessage.d.ts +5 -15
- package/dist/es/models/objects/v4/error/AppMessage.js +265 -314
- package/dist/es/models/objects/v4/error/ErrorResponse.d.ts +2 -7
- package/dist/es/models/objects/v4/error/ErrorResponse.js +177 -219
- package/dist/es/models/objects/v4/error/SchemaValidationError.d.ts +2 -18
- package/dist/es/models/objects/v4/error/SchemaValidationError.js +249 -300
- package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +2 -9
- package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.js +191 -234
- package/dist/es/models/objects/v4/stats/GetObjectstoreStatsApiResponse.d.ts +58 -0
- package/dist/es/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js +288 -0
- package/dist/es/models/objects/v4/stats/ObjectstoreStats.d.ts +255 -0
- package/dist/es/models/objects/v4/stats/ObjectstoreStats.js +1253 -0
- package/dist/es/models/objects/v4/stats/TimeFloatValuePair.d.ts +58 -0
- package/dist/es/models/objects/v4/stats/TimeFloatValuePair.js +272 -0
- package/dist/es/models/prism/v4/config/TaskReference.d.ts +2 -7
- package/dist/es/models/prism/v4/config/TaskReference.js +142 -181
- 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 +9 -70
- package/dist/lib/apis/objectstores-endpoints.js +407 -477
- package/dist/lib/apis/stats-endpoints.d.ts +46 -0
- package/dist/lib/apis/stats-endpoints.js +122 -0
- package/dist/lib/index.d.ts +13 -1
- package/dist/lib/index.js +152 -104
- 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.d.ts +19 -0
- package/dist/lib/models/common/v1/stats/DownSamplingOperator.js +107 -0
- package/dist/lib/models/common/v1/stats/TimeIntValuePair.d.ts +58 -0
- package/dist/lib/models/common/v1/stats/TimeIntValuePair.js +272 -0
- package/dist/lib/models/objects/v4/config/Certificate.d.ts +24 -34
- package/dist/lib/models/objects/v4/config/Certificate.js +342 -310
- package/dist/lib/models/objects/v4/config/CertificateProjection.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/CertificateProjection.js +75 -103
- package/dist/lib/models/objects/v4/config/CreateCertificateApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/CreateCertificateApiResponse.js +187 -242
- package/dist/lib/models/objects/v4/config/CreateObjectstoreApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/CreateObjectstoreApiResponse.js +187 -242
- package/dist/lib/models/objects/v4/config/DeleteObjectstoreApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/DeleteObjectstoreApiResponse.js +187 -242
- package/dist/lib/models/objects/v4/config/GetCaApiResponse.d.ts +2 -45
- package/dist/lib/models/objects/v4/config/GetCaApiResponse.js +187 -242
- package/dist/lib/models/objects/v4/config/GetCertificateApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/GetCertificateApiResponse.js +187 -242
- package/dist/lib/models/objects/v4/config/GetObjectstoreApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/GetObjectstoreApiResponse.js +187 -242
- package/dist/lib/models/objects/v4/config/ListCertificatesApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/ListCertificatesApiResponse.js +213 -268
- package/dist/lib/models/objects/v4/config/ListObjectstoresApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/ListObjectstoresApiResponse.js +213 -268
- package/dist/lib/models/objects/v4/config/ObjectStore.d.ts +1 -96
- package/dist/lib/models/objects/v4/config/ObjectStore.js +629 -712
- package/dist/lib/models/objects/v4/config/ObjectStoreProjection.d.ts +1 -129
- package/dist/lib/models/objects/v4/config/ObjectStoreProjection.js +222 -239
- 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 +187 -242
- package/dist/lib/models/objects/v4/error/AppMessage.d.ts +5 -15
- package/dist/lib/models/objects/v4/error/AppMessage.js +265 -314
- package/dist/lib/models/objects/v4/error/ErrorResponse.d.ts +2 -7
- package/dist/lib/models/objects/v4/error/ErrorResponse.js +177 -219
- package/dist/lib/models/objects/v4/error/SchemaValidationError.d.ts +2 -18
- package/dist/lib/models/objects/v4/error/SchemaValidationError.js +249 -300
- package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +2 -9
- package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.js +191 -234
- package/dist/lib/models/objects/v4/stats/GetObjectstoreStatsApiResponse.d.ts +58 -0
- package/dist/lib/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js +288 -0
- package/dist/lib/models/objects/v4/stats/ObjectstoreStats.d.ts +255 -0
- package/dist/lib/models/objects/v4/stats/ObjectstoreStats.js +1253 -0
- package/dist/lib/models/objects/v4/stats/TimeFloatValuePair.d.ts +58 -0
- package/dist/lib/models/objects/v4/stats/TimeFloatValuePair.js +272 -0
- package/dist/lib/models/prism/v4/config/TaskReference.d.ts +2 -7
- package/dist/lib/models/prism/v4/config/TaskReference.js +142 -181
- 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
package/dist/es/Paginable.d.ts
CHANGED
package/dist/es/Paginable.js
CHANGED
|
@@ -3,42 +3,33 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
var _ApiClient = require("./ApiClient");
|
|
8
|
-
|
|
9
|
-
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
10
|
-
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; } }
|
|
11
|
-
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; }
|
|
12
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
-
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); } }
|
|
14
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
-
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); } /*
|
|
8
|
+
/*
|
|
17
9
|
* Nutanix Objects Storage Management APIs
|
|
18
10
|
*
|
|
19
|
-
* OpenAPI spec version: 4.0.
|
|
11
|
+
* OpenAPI spec version: 4.0.2
|
|
20
12
|
*
|
|
21
13
|
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
22
14
|
*
|
|
23
|
-
* Open API Dev Platform Codegen version:
|
|
15
|
+
* Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE
|
|
24
16
|
*
|
|
25
17
|
* Do not edit the class manually.
|
|
26
18
|
*
|
|
27
19
|
*/
|
|
20
|
+
|
|
28
21
|
/**
|
|
29
22
|
* A model that represents a paginable response from a list endpoint.
|
|
30
23
|
* @module Paginable
|
|
31
|
-
* @version 4.0.
|
|
24
|
+
* @version 4.0.2
|
|
32
25
|
*/
|
|
33
|
-
|
|
26
|
+
class Paginable {
|
|
34
27
|
/**
|
|
35
28
|
* Constructs a new <code>Paginable</code>.
|
|
36
29
|
* @alias module:Paginable
|
|
37
30
|
* @class
|
|
38
31
|
*/
|
|
39
|
-
|
|
40
|
-
_classCallCheck(this, Paginable);
|
|
41
|
-
}
|
|
32
|
+
constructor() {}
|
|
42
33
|
|
|
43
34
|
/**
|
|
44
35
|
* Constructs a <code>Paginable</code> from a plain Javascript object, optionally creating a new instance.
|
|
@@ -47,194 +38,164 @@ var Paginable = exports["default"] = /*#__PURE__*/function () {
|
|
|
47
38
|
* @param {module:Paginable} obj Optional instance to populate.
|
|
48
39
|
* @return {module:Paginable} The populated <code>Paginable</code> instance.
|
|
49
40
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
41
|
+
static constructFromObject(metadata, obj) {
|
|
42
|
+
if (metadata) {
|
|
43
|
+
obj = obj || new Paginable();
|
|
44
|
+
if (metadata.hasOwnProperty('links') && metadata['links'] !== null && metadata['links'] !== undefined) {
|
|
45
|
+
for (const link of metadata['links']) {
|
|
46
|
+
if (link.hasOwnProperty('rel') && link.hasOwnProperty('href')) {
|
|
47
|
+
switch (link['rel']) {
|
|
48
|
+
case 'first':
|
|
49
|
+
obj.linkFirst = link['href'];
|
|
50
|
+
break;
|
|
51
|
+
case 'prev':
|
|
52
|
+
obj.linkPrev = link['href'];
|
|
53
|
+
break;
|
|
54
|
+
case 'next':
|
|
55
|
+
obj.linkNext = link['href'];
|
|
56
|
+
break;
|
|
57
|
+
case 'last':
|
|
58
|
+
obj.linkLast = link['href'];
|
|
59
|
+
break;
|
|
60
|
+
default:
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
61
65
|
}
|
|
62
|
-
if (
|
|
63
|
-
|
|
66
|
+
if (metadata.hasOwnProperty('totalAvailableResults')) {
|
|
67
|
+
obj.resultsTotal = metadata['totalAvailableResults'];
|
|
64
68
|
}
|
|
65
|
-
return this._getLink(this.linkFirst);
|
|
66
69
|
}
|
|
70
|
+
return obj;
|
|
71
|
+
}
|
|
67
72
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
if (this.isFirstPage()) {
|
|
77
|
-
return Promise.reject('Cannot navigate to previous page : already on first page');
|
|
78
|
-
}
|
|
79
|
-
if (this.linkPrev === null) {
|
|
80
|
-
return Promise.reject('No link to previous page provided in previous API response');
|
|
81
|
-
}
|
|
82
|
-
return this._getLink(this.linkPrev);
|
|
73
|
+
/**
|
|
74
|
+
* Get the first page of the set, if any
|
|
75
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, resolves with another Paginable
|
|
76
|
+
* or rejects with error message if any issue (link not available, ...)
|
|
77
|
+
*/
|
|
78
|
+
getFirstPage() {
|
|
79
|
+
if (this.isFirstPage()) {
|
|
80
|
+
return Promise.reject('Cannot navigate to first page : already on first page');
|
|
83
81
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
* Get the next page of the set, if any
|
|
87
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, resolves with another Paginable
|
|
88
|
-
* or rejects with error message if any issue (link not available, ...)
|
|
89
|
-
*/
|
|
90
|
-
}, {
|
|
91
|
-
key: "getNextPage",
|
|
92
|
-
value: function getNextPage() {
|
|
93
|
-
if (this.isLastPage()) {
|
|
94
|
-
return Promise.reject('Cannot navigate to next page : already on last page');
|
|
95
|
-
}
|
|
96
|
-
if (this.linkNext === null) {
|
|
97
|
-
return Promise.reject('No link to next page provided in previous API response');
|
|
98
|
-
}
|
|
99
|
-
return this._getLink(this.linkNext);
|
|
82
|
+
if (this.linkFirst === null) {
|
|
83
|
+
return Promise.reject('No link to first page provided in previous API response');
|
|
100
84
|
}
|
|
85
|
+
return this._getLink(this.linkFirst);
|
|
86
|
+
}
|
|
101
87
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (this.isLastPage()) {
|
|
111
|
-
return Promise.reject('Cannot navigate to last page : already on last page');
|
|
112
|
-
}
|
|
113
|
-
if (this.linkLast === null) {
|
|
114
|
-
return Promise.reject('No link to last page provided in previous API response');
|
|
115
|
-
}
|
|
116
|
-
return this._getLink(this.linkLast);
|
|
88
|
+
/**
|
|
89
|
+
* Get the previous page of the set, if any
|
|
90
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, resolves with another Paginable
|
|
91
|
+
* or rejects with error message if any issue (link not available, ...)
|
|
92
|
+
*/
|
|
93
|
+
getPrevPage() {
|
|
94
|
+
if (this.isFirstPage()) {
|
|
95
|
+
return Promise.reject('Cannot navigate to previous page : already on first page');
|
|
117
96
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
* Get the current page number
|
|
121
|
-
* @return {Number} the current page number, starts at 0
|
|
122
|
-
*/
|
|
123
|
-
}, {
|
|
124
|
-
key: "currentPage",
|
|
125
|
-
value: function currentPage() {
|
|
126
|
-
if (this.page === null) {
|
|
127
|
-
return 0;
|
|
128
|
-
}
|
|
129
|
-
return this.page;
|
|
97
|
+
if (this.linkPrev === null) {
|
|
98
|
+
return Promise.reject('No link to previous page provided in previous API response');
|
|
130
99
|
}
|
|
100
|
+
return this._getLink(this.linkPrev);
|
|
101
|
+
}
|
|
131
102
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
return 1;
|
|
141
|
-
}
|
|
142
|
-
return Math.ceil(this.resultsTotal / this.resultsPerPage);
|
|
103
|
+
/**
|
|
104
|
+
* Get the next page of the set, if any
|
|
105
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, resolves with another Paginable
|
|
106
|
+
* or rejects with error message if any issue (link not available, ...)
|
|
107
|
+
*/
|
|
108
|
+
getNextPage() {
|
|
109
|
+
if (this.isLastPage()) {
|
|
110
|
+
return Promise.reject('Cannot navigate to next page : already on last page');
|
|
143
111
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
* Check if current page is first page
|
|
147
|
-
* @return {Boolean} True if current page is 0, false otherwise
|
|
148
|
-
*/
|
|
149
|
-
}, {
|
|
150
|
-
key: "isFirstPage",
|
|
151
|
-
value: function isFirstPage() {
|
|
152
|
-
return this.currentPage() === 0;
|
|
112
|
+
if (this.linkNext === null) {
|
|
113
|
+
return Promise.reject('No link to next page provided in previous API response');
|
|
153
114
|
}
|
|
115
|
+
return this._getLink(this.linkNext);
|
|
116
|
+
}
|
|
154
117
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
return
|
|
118
|
+
/**
|
|
119
|
+
* Get the last page of the set, if any
|
|
120
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, resolves with another Paginable
|
|
121
|
+
* or rejects with error message if any issue (link not available, ...)
|
|
122
|
+
*/
|
|
123
|
+
getLastPage() {
|
|
124
|
+
if (this.isLastPage()) {
|
|
125
|
+
return Promise.reject('Cannot navigate to last page : already on last page');
|
|
163
126
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
value: function populatePaginationMetadata(apiClient, page, resultsPerPage) {
|
|
167
|
-
this.apiClient = apiClient;
|
|
168
|
-
this.page = page;
|
|
169
|
-
this.resultsPerPage = resultsPerPage;
|
|
127
|
+
if (this.linkLast === null) {
|
|
128
|
+
return Promise.reject('No link to last page provided in previous API response');
|
|
170
129
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
var headerParams = {};
|
|
182
|
-
var formParams = {};
|
|
183
|
-
var authNames = [];
|
|
184
|
-
var contentTypes = [];
|
|
185
|
-
var accepts = ['application/json'];
|
|
186
|
-
var returnType = this.constructor;
|
|
187
|
-
return this.apiClient.callApi(path, 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
130
|
+
return this._getLink(this.linkLast);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Get the current page number
|
|
135
|
+
* @return {Number} the current page number, starts at 0
|
|
136
|
+
*/
|
|
137
|
+
currentPage() {
|
|
138
|
+
if (this.page === null) {
|
|
139
|
+
return 0;
|
|
188
140
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
var link = _step.value;
|
|
200
|
-
if (link.hasOwnProperty('rel') && link.hasOwnProperty('href')) {
|
|
201
|
-
switch (link['rel']) {
|
|
202
|
-
case 'first':
|
|
203
|
-
obj.linkFirst = link['href'];
|
|
204
|
-
break;
|
|
205
|
-
case 'prev':
|
|
206
|
-
obj.linkPrev = link['href'];
|
|
207
|
-
break;
|
|
208
|
-
case 'next':
|
|
209
|
-
obj.linkNext = link['href'];
|
|
210
|
-
break;
|
|
211
|
-
case 'last':
|
|
212
|
-
obj.linkLast = link['href'];
|
|
213
|
-
break;
|
|
214
|
-
default:
|
|
215
|
-
break;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
} catch (err) {
|
|
220
|
-
_iterator.e(err);
|
|
221
|
-
} finally {
|
|
222
|
-
_iterator.f();
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
if (metadata.hasOwnProperty('totalAvailableResults')) {
|
|
226
|
-
obj.resultsTotal = metadata['totalAvailableResults'];
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
return obj;
|
|
141
|
+
return this.page;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Get the total number of pages
|
|
146
|
+
* @return {Number} the total number of pages available
|
|
147
|
+
*/
|
|
148
|
+
countPages() {
|
|
149
|
+
if (this.resultsPerPage === null || this.resultsTotal === null || this.resultsPerPage === 0) {
|
|
150
|
+
return 1;
|
|
230
151
|
}
|
|
231
|
-
|
|
232
|
-
}
|
|
152
|
+
return Math.ceil(this.resultsTotal / this.resultsPerPage);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Check if current page is first page
|
|
157
|
+
* @return {Boolean} True if current page is 0, false otherwise
|
|
158
|
+
*/
|
|
159
|
+
isFirstPage() {
|
|
160
|
+
return this.currentPage() === 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Check if current page is last page
|
|
165
|
+
* @return {Boolean} True if current page is countPages()-1, false otherwise
|
|
166
|
+
*/
|
|
167
|
+
isLastPage() {
|
|
168
|
+
return this.currentPage() === this.countPages() - 1;
|
|
169
|
+
}
|
|
170
|
+
populatePaginationMetadata(apiClient, page, resultsPerPage) {
|
|
171
|
+
this.apiClient = apiClient;
|
|
172
|
+
this.page = page;
|
|
173
|
+
this.resultsPerPage = resultsPerPage;
|
|
174
|
+
}
|
|
175
|
+
_getLink(path) {
|
|
176
|
+
// If no ApiClient defined, instantiate default one
|
|
177
|
+
if (this.apiClient === null) {
|
|
178
|
+
this.apiClient = _ApiClient.ApiClient.instance;
|
|
179
|
+
}
|
|
180
|
+
const postBody = {};
|
|
181
|
+
const pathParams = {};
|
|
182
|
+
const queryParams = {};
|
|
183
|
+
const headerParams = {};
|
|
184
|
+
const formParams = {};
|
|
185
|
+
const authNames = [];
|
|
186
|
+
const contentTypes = [];
|
|
187
|
+
const accepts = ['application/json'];
|
|
188
|
+
const returnType = this.constructor;
|
|
189
|
+
return this.apiClient.callApi(path, 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
233
193
|
/**
|
|
234
194
|
* The link to first page, if any
|
|
235
195
|
* @type {String}
|
|
236
196
|
* @memberOf Paginable
|
|
237
197
|
*/
|
|
198
|
+
exports.default = Paginable;
|
|
238
199
|
Paginable.prototype.linkFirst = null;
|
|
239
200
|
|
|
240
201
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ObjectStores service.
|
|
3
|
-
* @version 4.0.
|
|
3
|
+
* @version 4.0.2
|
|
4
4
|
* @class ObjectStoresApi
|
|
5
5
|
*/
|
|
6
6
|
export class ObjectStoresApi {
|
|
@@ -20,7 +20,7 @@ export class ObjectStoresApi {
|
|
|
20
20
|
apiClient: any;
|
|
21
21
|
/**
|
|
22
22
|
* Create a SSL certificate for an Object store
|
|
23
|
-
* This operation creates a new default certificate and keys. It also creates the alternate FQDNs for the Object store. The certificate of an Object store can be created when it is in a OBJECT_STORE_AVAILABLE or OBJECT_STORE_CERT_CREATION_FAILED state. If the publicCert, privateKey, and ca values are provided in the request body, these values are used to create the new certificate. If these values are not provided, the existing certificate will be used as the new certificate. Optionally, a list of additional alternate FQDNs can be provided.
|
|
23
|
+
* This operation creates a new default certificate and keys. It also creates the alternate FQDNs and alternate IPs for the Object store. The certificate of an Object store can be created when it is in a OBJECT_STORE_AVAILABLE or OBJECT_STORE_CERT_CREATION_FAILED state. If the publicCert, privateKey, and ca values are provided in the request body, these values are used to create the new certificate. If these values are not provided, a new certificate will be generated if 'shouldGenerate' is set to true and if it is set to false, the existing certificate will be used as the new certificate. Optionally, a list of additional alternate FQDNs and alternate IPs can be provided. These alternateFqdns and alternateIps must be included in the CA certificate if it has been provided.
|
|
24
24
|
* @param { Partial<String | ReadableStream> } body Accepts file path as a string or a file stream
|
|
25
25
|
* @param { String } objectStoreExtId The UUID of the Object store.
|
|
26
26
|
* @param {Object} args Additional Arguments
|
|
@@ -47,11 +47,11 @@ export class ObjectStoresApi {
|
|
|
47
47
|
* Download the certificate authority
|
|
48
48
|
* Download the certificate authority of an Object store certificate.
|
|
49
49
|
* @param { String } objectStoreExtId The UUID of the Object store.
|
|
50
|
-
* @param { String }
|
|
50
|
+
* @param { String } certificateExtId The UUID of the certificate of an Object store.
|
|
51
51
|
* @param {Object} args Additional Arguments
|
|
52
52
|
* @return {Promise<GetCaApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetCaApiResponse } and HTTP response
|
|
53
53
|
*/
|
|
54
|
-
getCaByCertificateId(objectStoreExtId: string,
|
|
54
|
+
getCaByCertificateId(objectStoreExtId: string, certificateExtId: string, ...args: any): Promise<GetCaApiResponse>;
|
|
55
55
|
/**
|
|
56
56
|
* Get the details of an Object store certificate
|
|
57
57
|
* Get the details of the SSL certificate which can be used to connect to an Object store.
|
|
@@ -63,7 +63,7 @@ export class ObjectStoresApi {
|
|
|
63
63
|
getCertificateById(objectStoreExtId: string, extId: string, ...args: any): Promise<GetCertificateApiResponse>;
|
|
64
64
|
/**
|
|
65
65
|
* Get an Object store
|
|
66
|
-
* Get an Object store for the provided UUID.
|
|
66
|
+
* Get an Object store for the provided UUID. `state` string (State of the Object store) Enum for the state of the Object store. | Enum | Description | | ----------- | ----------- | | `\"DEPLOYING_OBJECT_STORE\"` | The Object store will be in this state during an ongoing deployment of the Object store. The Object store will be unavailable through S3 APIs in this state. The Object store will move to the OBJECT_STORE_AVAILABLE state if the deployment succeeds, and to the OBJECT_STORE_DEPLOYMENT_FAILED state if the deployment fails. | | `\"OBJECT_STORE_OPERATION_FAILED\"` | The Object store is in this state when there is an error while performing an operation on the Object store. The Object store may not be available through S3 APIs in this state. | | `\"OBJECT_STORE_CERT_CREATION_FAILED\"` | An Object store enters this state if there is an error while creating the Object store certificate. Creating a new certificate can be retried from this state. The Object store may not be available through S3 APIs in this state. | | `\"OBJECT_STORE_OPERATION_PENDING\"` | The Object store is in this state during an ongoing operation on the Object store. The Object store may not be available through S3 APIs in this state. The Object store will enter the OBJECT_STORE_OPERATION_FAILED state if the operation fails, or the OBJECT_STORE_AVAILABLE state if the operation is successful. | | `\"UNDEPLOYED_OBJECT_STORE\"` | The Object store is in this state if it has not been deployed. | | `\"CREATING_OBJECT_STORE_CERT\"` | The Object store is in this state during a certificate creation for the Object store. The Object store will be unavailable through S3 APIs in this state. It will move to the OBJECT_STORE_AVAILABLE state if the certificate was created successfully, or to the OBJECT_STORE_CERT_CREATION_FAILED state if an error occurs while creating the certificate. | | `\"OBJECT_STORE_AVAILABLE\"` | An Object store is in this state if its deployment was successful, and there are no ongoing operations on the Object store. The Object store will be available through S3 APIs in this state. In this state, the Object store can be deleted or a new certificate can be created for this Object store. | | `\"OBJECT_STORE_DELETION_FAILED\"` | An Object store enters this state if there is an error deleting the Object store. The Object store will not be available through S3 APIs in this state. Deleting the Object store can be retried from this state. | | `\"OBJECT_STORE_DEPLOYMENT_FAILED\"` | An Object store enters this state when its deployment fails. The Object store deployment can be retried or the Object store can be deleted from this state. | | `\"DELETING_OBJECT_STORE\"` | A deployed Object store is in this state when the Object store is being deleted. The Object store will be unavailable through S3 APIs in this state. It can be either deleted or move to the OBJECT_STORE_DELETION_FAILED state if the deletion fails. |
|
|
67
67
|
* @param { String } extId The UUID of the Object store.
|
|
68
68
|
* @param {Object} args Additional Arguments
|
|
69
69
|
* @return {Promise<GetObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetObjectstoreApiResponse } and HTTP response
|
|
@@ -79,13 +79,8 @@ export class ObjectStoresApi {
|
|
|
79
79
|
* @param { Number } opts.$limit A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
|
|
80
80
|
|
|
81
81
|
* @param { String } opts.$filter A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions.<br>
|
|
82
|
-
* For example, filter '$filter=name eq 'karbon-ntnx-1.0' would filter the result on cluster name 'karbon-ntnx1.0', filter '$filter=startswith(name, 'C')' would filter on cluster name starting with 'C'
|
|
83
|
-
* The filter can be applied to the following fields:<br>
|
|
84
|
-
* - alternateFqdns/value
|
|
82
|
+
* For example, filter '$filter=name eq 'karbon-ntnx-1.0' would filter the result on cluster name 'karbon-ntnx1.0', filter '$filter=startswith(name, 'C')' would filter on cluster name starting with 'C'.
|
|
85
83
|
* @param { String } opts.$select A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned.
|
|
86
|
-
- alternateFqdns
|
|
87
|
-
- alternateFqdns/value
|
|
88
|
-
|
|
89
84
|
* @param {Object} args Additional Arguments
|
|
90
85
|
* @return {Promise<ListCertificatesApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link ListCertificatesApiResponse } and HTTP response
|
|
91
86
|
*/
|
|
@@ -104,66 +99,10 @@ export class ObjectStoresApi {
|
|
|
104
99
|
* @param { Number } opts.$limit A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
|
|
105
100
|
|
|
106
101
|
* @param { String } opts.$filter A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions.<br>
|
|
107
|
-
* For example, filter '$filter=name eq 'karbon-ntnx-1.0' would filter the result on cluster name 'karbon-ntnx1.0', filter '$filter=startswith(name, 'C')' would filter on cluster name starting with 'C'
|
|
108
|
-
*
|
|
109
|
-
* -
|
|
110
|
-
* - clusterExtId<br>
|
|
111
|
-
* - creationTime<br>
|
|
112
|
-
* - deploymentVersion<br>
|
|
113
|
-
* - description<br>
|
|
114
|
-
* - domain<br>
|
|
115
|
-
* - lastUpdateTime<br>
|
|
116
|
-
* - name<br>
|
|
117
|
-
* - numWorkerNodes<br>
|
|
118
|
-
* - publicNetworkIps/ipv4/value<br>
|
|
119
|
-
* - publicNetworkIps/ipv6/value<br>
|
|
120
|
-
* - publicNetworkReference<br>
|
|
121
|
-
* - region<br>
|
|
122
|
-
* - storageNetworkDnsIp/ipv4/value<br>
|
|
123
|
-
* - storageNetworkDnsIp/ipv6/value<br>
|
|
124
|
-
* - storageNetworkReference<br>
|
|
125
|
-
* - storageNetworkVip/ipv4/value<br>
|
|
126
|
-
* - storageNetworkVip/ipv6/value<br>
|
|
127
|
-
* - totalCapacityGiB
|
|
128
|
-
* @param { String } opts.$orderby A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, '$orderby=templateName desc' would get all templates sorted by templateName in descending order.<br>
|
|
129
|
-
* The orderby can be applied to the following fields:<br>
|
|
130
|
-
* - clusterExtId<br>
|
|
131
|
-
* - creationTime<br>
|
|
132
|
-
* - deploymentVersion<br>
|
|
133
|
-
* - description<br>
|
|
134
|
-
* - domain<br>
|
|
135
|
-
* - lastUpdateTime<br>
|
|
136
|
-
* - name<br>
|
|
137
|
-
* - numWorkerNodes<br>
|
|
138
|
-
* - publicNetworkReference<br>
|
|
139
|
-
* - region<br>
|
|
140
|
-
* - storageNetworkReference<br>
|
|
141
|
-
* - totalCapacityGiB
|
|
142
|
-
* @param { String } opts.$expand A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby. The following expansion keys are supported.
|
|
143
|
-
- certificates
|
|
144
|
-
|
|
102
|
+
* For example, filter '$filter=name eq 'karbon-ntnx-1.0' would filter the result on cluster name 'karbon-ntnx1.0', filter '$filter=startswith(name, 'C')' would filter on cluster name starting with 'C'.
|
|
103
|
+
* @param { String } opts.$orderby A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, '$orderby=templateName desc' would get all templates sorted by templateName in descending order.
|
|
104
|
+
* @param { String } opts.$expand A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby.
|
|
145
105
|
* @param { String } opts.$select A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned.
|
|
146
|
-
- certificateExtIds
|
|
147
|
-
- clusterExtId
|
|
148
|
-
- creationTime
|
|
149
|
-
- deploymentVersion
|
|
150
|
-
- description
|
|
151
|
-
- domain
|
|
152
|
-
- lastUpdateTime
|
|
153
|
-
- name
|
|
154
|
-
- numWorkerNodes
|
|
155
|
-
- publicNetworkIps
|
|
156
|
-
- publicNetworkIps/ipv4/value
|
|
157
|
-
- publicNetworkReference
|
|
158
|
-
- region
|
|
159
|
-
- state
|
|
160
|
-
- storageNetworkDnsIp
|
|
161
|
-
- storageNetworkDnsIp/ipv4/value
|
|
162
|
-
- storageNetworkReference
|
|
163
|
-
- storageNetworkVip
|
|
164
|
-
- storageNetworkVip/ipv4/value
|
|
165
|
-
- totalCapacityGiB
|
|
166
|
-
|
|
167
106
|
* @param {Object} args Additional Arguments
|
|
168
107
|
* @return {Promise<ListObjectstoresApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link ListObjectstoresApiResponse } and HTTP response
|
|
169
108
|
*/
|