@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,6 +1,5 @@
|
|
|
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
|
});
|
|
@@ -16,39 +15,37 @@ var _GetObjectstoreApiResponse = _interopRequireDefault(require("../models/objec
|
|
|
16
15
|
var _CreateCertificateApiResponse = _interopRequireDefault(require("../models/objects/v4/config/CreateCertificateApiResponse"));
|
|
17
16
|
var _GetCaApiResponse = _interopRequireDefault(require("../models/objects/v4/config/GetCaApiResponse"));
|
|
18
17
|
var _ListObjectstoresApiResponse = _interopRequireDefault(require("../models/objects/v4/config/ListObjectstoresApiResponse"));
|
|
19
|
-
var
|
|
20
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : {
|
|
21
|
-
|
|
22
|
-
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; }
|
|
23
|
-
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; }
|
|
24
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
25
|
-
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); } }
|
|
26
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
27
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
28
|
-
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); }
|
|
29
|
-
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
30
|
-
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
31
|
-
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
32
|
-
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
33
|
-
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } /*
|
|
18
|
+
var _path = _interopRequireDefault(require("path"));
|
|
19
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
|
+
/*
|
|
34
21
|
* Nutanix Objects Storage Management APIs
|
|
35
22
|
*
|
|
36
|
-
* OpenAPI spec version: 4.0.
|
|
23
|
+
* OpenAPI spec version: 4.0.2
|
|
37
24
|
*
|
|
38
25
|
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
39
26
|
*
|
|
40
|
-
* Open API Dev Platform Codegen version:
|
|
27
|
+
* Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE
|
|
41
28
|
*
|
|
42
29
|
* Do not edit the class manually.
|
|
43
30
|
*
|
|
44
31
|
*/
|
|
32
|
+
|
|
45
33
|
/**
|
|
46
34
|
* ObjectStores service.
|
|
47
|
-
* @version 4.0.
|
|
35
|
+
* @version 4.0.2
|
|
48
36
|
* @class ObjectStoresApi
|
|
49
37
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
38
|
+
class ObjectStoresApi {
|
|
39
|
+
#headersToSkip;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Make the default {@link ApiClient} class available for developers to be able to extend it and bring
|
|
43
|
+
* their own fetch methods into the SDK
|
|
44
|
+
*/
|
|
45
|
+
static get ApiClient() {
|
|
46
|
+
return _ApiClient.ApiClient;
|
|
47
|
+
}
|
|
48
|
+
|
|
52
49
|
/**
|
|
53
50
|
* Constructs a new ObjectStoresApi.
|
|
54
51
|
* @alias module:api/ObjectStoresApi
|
|
@@ -56,15 +53,13 @@ var ObjectStoresApi = exports.ObjectStoresApi = /*#__PURE__*/function () {
|
|
|
56
53
|
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
57
54
|
* default to {@link module:ApiClient#instance} if unspecified.
|
|
58
55
|
*/
|
|
59
|
-
|
|
60
|
-
_classCallCheck(this, ObjectStoresApi);
|
|
61
|
-
_classPrivateFieldInitSpec(this, _headersToSkip, void 0);
|
|
56
|
+
constructor(apiClient) {
|
|
62
57
|
this.apiClient = apiClient || _ApiClient.ApiClient.instance;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
58
|
+
this.#headersToSkip = new Set();
|
|
59
|
+
this.#headersToSkip.add('authorization');
|
|
60
|
+
this.#headersToSkip.add('cookie');
|
|
61
|
+
this.#headersToSkip.add('host');
|
|
62
|
+
this.#headersToSkip.add('user-agent');
|
|
68
63
|
}
|
|
69
64
|
|
|
70
65
|
/**
|
|
@@ -75,483 +70,415 @@ var ObjectStoresApi = exports.ObjectStoresApi = /*#__PURE__*/function () {
|
|
|
75
70
|
* @param {Object} args Additional Arguments
|
|
76
71
|
* @return {Promise<CreateCertificateApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link CreateCertificateApiResponse } and HTTP response
|
|
77
72
|
*/
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
73
|
+
createCertificate(objectStoreExtId, body, ...args) {
|
|
74
|
+
let argMap = args.length > 0 ? args[0] : {};
|
|
75
|
+
let postBody = null;
|
|
76
|
+
let fs;
|
|
77
|
+
try {
|
|
78
|
+
fs = require('fs');
|
|
79
|
+
} catch (err) {}
|
|
80
|
+
if (typeof body.pipe === 'function') {
|
|
81
|
+
postBody = body;
|
|
82
|
+
argMap["Content-Length"] = fs.statSync(body.path).size;
|
|
83
|
+
if (!argMap.hasOwnProperty("Content-Disposition")) {
|
|
84
|
+
argMap["Content-Disposition"] = 'attachment; filename="' + _path.default.parse(body.path).base + '"';
|
|
85
|
+
}
|
|
86
|
+
} else if (typeof body === 'string') {
|
|
87
|
+
// body is a path string
|
|
88
|
+
let path;
|
|
85
89
|
try {
|
|
86
|
-
|
|
87
|
-
} catch (err) {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
path = require('path');
|
|
91
|
+
} catch (err) {
|
|
92
|
+
throw new Error('Cannot find module \'path\'. Ensure you are using a Node.js environment. If not, use ReadableStream for body parameter.');
|
|
93
|
+
}
|
|
94
|
+
try {
|
|
95
|
+
postBody = fs.createReadStream(body);
|
|
96
|
+
argMap["Content-Length"] = fs.statSync(body).size;
|
|
91
97
|
if (!argMap.hasOwnProperty("Content-Disposition")) {
|
|
92
|
-
argMap["Content-Disposition"] = 'attachment; filename="' +
|
|
93
|
-
}
|
|
94
|
-
} else if (typeof body === 'string') {
|
|
95
|
-
// body is a path string
|
|
96
|
-
var _path;
|
|
97
|
-
try {
|
|
98
|
-
_path = require('path');
|
|
99
|
-
} catch (err) {
|
|
100
|
-
throw new Error('Cannot find module \'path\'. Ensure you are using a Node.js environment. If not, use ReadableStream for body parameter.');
|
|
98
|
+
argMap["Content-Disposition"] = 'attachment; filename="' + path.basename(body) + '"';
|
|
101
99
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
argMap["Content-Length"] = fs.statSync(body).size;
|
|
105
|
-
if (!argMap.hasOwnProperty("Content-Disposition")) {
|
|
106
|
-
argMap["Content-Disposition"] = 'attachment; filename="' + _path.basename(body) + '"';
|
|
107
|
-
}
|
|
108
|
-
} catch (err) {
|
|
109
|
-
throw new Error('Cannot read file: ' + body + '. Error: ' + err.message);
|
|
110
|
-
}
|
|
111
|
-
} else {
|
|
112
|
-
postBody = body;
|
|
113
|
-
}
|
|
114
|
-
// verify the required parameter 'objectStoreExtId' is set
|
|
115
|
-
if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {
|
|
116
|
-
throw new Error("Missing the required parameter 'objectStoreExtId' when calling createCertificate");
|
|
100
|
+
} catch (err) {
|
|
101
|
+
throw new Error('Cannot read file: ' + body + '. Error: ' + err.message);
|
|
117
102
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
throw new Error("Invalid body when calling createCertificate");
|
|
121
|
-
}
|
|
122
|
-
var pathParams = {
|
|
123
|
-
'objectStoreExtId': objectStoreExtId
|
|
124
|
-
};
|
|
125
|
-
var queryParams = {};
|
|
126
|
-
var headersToInclude = {};
|
|
127
|
-
Object.keys(argMap).forEach(function (header) {
|
|
128
|
-
if (!_classPrivateFieldGet(_headersToSkip, _this).has(header.toLowerCase())) {
|
|
129
|
-
headersToInclude[header] = argMap[header];
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
var headerParams = _objectSpread({}, headersToInclude);
|
|
133
|
-
var formParams = {};
|
|
134
|
-
_ApiClient.ApiClient.addEtagReferenceToHeader(body, headerParams);
|
|
135
|
-
var authNames = ['basicAuthScheme'];
|
|
136
|
-
var contentTypes = ['application/octet-stream'];
|
|
137
|
-
var accepts = ['application/json'];
|
|
138
|
-
var returnType = _CreateCertificateApiResponse["default"];
|
|
139
|
-
return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
103
|
+
} else {
|
|
104
|
+
postBody = body;
|
|
140
105
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
* Run the prechecks, create and start the deployment of an Object store on Prism Central.
|
|
145
|
-
* @param { Required<Pick<ObjectStore, 'name'>> & Partial<ObjectStore> } body specification
|
|
146
|
-
* @param {Object} args Additional Arguments
|
|
147
|
-
* @return {Promise<CreateObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link CreateObjectstoreApiResponse } and HTTP response
|
|
148
|
-
*/
|
|
149
|
-
}, {
|
|
150
|
-
key: "createObjectstore",
|
|
151
|
-
value: function createObjectstore(body) {
|
|
152
|
-
var _this2 = this;
|
|
153
|
-
var argMap = (arguments.length <= 1 ? 0 : arguments.length - 1) > 0 ? arguments.length <= 1 ? undefined : arguments[1] : {};
|
|
154
|
-
var postBody = null;
|
|
155
|
-
if (body instanceof _ObjectStore["default"] && typeof body.toJson === 'function') {
|
|
156
|
-
postBody = body.toJson();
|
|
157
|
-
} else {
|
|
158
|
-
postBody = body;
|
|
159
|
-
}
|
|
160
|
-
// verify the required parameter 'body' is set
|
|
161
|
-
if (typeof postBody === 'undefined' || postBody === null) {
|
|
162
|
-
throw new Error("Invalid body when calling createObjectstore");
|
|
163
|
-
}
|
|
164
|
-
var pathParams = {};
|
|
165
|
-
var queryParams = {};
|
|
166
|
-
var headersToInclude = {};
|
|
167
|
-
Object.keys(argMap).forEach(function (header) {
|
|
168
|
-
if (!_classPrivateFieldGet(_headersToSkip, _this2).has(header.toLowerCase())) {
|
|
169
|
-
headersToInclude[header] = argMap[header];
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
var headerParams = _objectSpread({}, headersToInclude);
|
|
173
|
-
var formParams = {};
|
|
174
|
-
_ApiClient.ApiClient.addEtagReferenceToHeader(body, headerParams);
|
|
175
|
-
var authNames = ['basicAuthScheme'];
|
|
176
|
-
var contentTypes = ['application/json'];
|
|
177
|
-
var accepts = ['application/json'];
|
|
178
|
-
var returnType = _CreateObjectstoreApiResponse["default"];
|
|
179
|
-
return this.apiClient.callApi('/api/objects/v4.0/config/object-stores', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
106
|
+
// verify the required parameter 'objectStoreExtId' is set
|
|
107
|
+
if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {
|
|
108
|
+
throw new Error("Missing the required parameter 'objectStoreExtId' when calling createCertificate");
|
|
180
109
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
* Send a request to delete an Object store for the provided UUID and clean up its data. An Object store can only be deleted when it is in the state UNDEPLOYED_OBJECT_STORE, OBJECT_STORE_AVAILABLE, OBJECT_STORE_DEPLOYMENT_FAILED or OBJECT_STORE_DELETION_FAILED and does not contain any buckets.
|
|
185
|
-
* @param { String } extId The UUID of the Object store.
|
|
186
|
-
* @param {Object} args Additional Arguments
|
|
187
|
-
* @return {Promise<DeleteObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link DeleteObjectstoreApiResponse } and HTTP response
|
|
188
|
-
*/
|
|
189
|
-
}, {
|
|
190
|
-
key: "deleteObjectstoreById",
|
|
191
|
-
value: function deleteObjectstoreById(extId) {
|
|
192
|
-
var _this3 = this;
|
|
193
|
-
var argMap = (arguments.length <= 1 ? 0 : arguments.length - 1) > 0 ? arguments.length <= 1 ? undefined : arguments[1] : {};
|
|
194
|
-
var postBody = null;
|
|
195
|
-
// verify the required parameter 'extId' is set
|
|
196
|
-
if (typeof extId === 'undefined' || extId === null) {
|
|
197
|
-
throw new Error("Missing the required parameter 'extId' when calling deleteObjectstoreById");
|
|
198
|
-
}
|
|
199
|
-
var pathParams = {
|
|
200
|
-
'extId': extId
|
|
201
|
-
};
|
|
202
|
-
var queryParams = {};
|
|
203
|
-
var headersToInclude = {};
|
|
204
|
-
Object.keys(argMap).forEach(function (header) {
|
|
205
|
-
if (!_classPrivateFieldGet(_headersToSkip, _this3).has(header.toLowerCase())) {
|
|
206
|
-
headersToInclude[header] = argMap[header];
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
var headerParams = _objectSpread({}, headersToInclude);
|
|
210
|
-
var formParams = {};
|
|
211
|
-
var authNames = ['basicAuthScheme'];
|
|
212
|
-
var contentTypes = [];
|
|
213
|
-
var accepts = ['application/json'];
|
|
214
|
-
var returnType = _DeleteObjectstoreApiResponse["default"];
|
|
215
|
-
return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{extId}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
110
|
+
// verify the required parameter 'body' is set
|
|
111
|
+
if (typeof postBody === 'undefined' || postBody === null) {
|
|
112
|
+
throw new Error("Invalid body when calling createCertificate");
|
|
216
113
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
*/
|
|
226
|
-
}, {
|
|
227
|
-
key: "getCaByCertificateId",
|
|
228
|
-
value: function getCaByCertificateId(objectStoreExtId, certificateExtId) {
|
|
229
|
-
var _this4 = this;
|
|
230
|
-
var argMap = (arguments.length <= 2 ? 0 : arguments.length - 2) > 0 ? arguments.length <= 2 ? undefined : arguments[2] : {};
|
|
231
|
-
var postBody = null;
|
|
232
|
-
// verify the required parameter 'objectStoreExtId' is set
|
|
233
|
-
if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {
|
|
234
|
-
throw new Error("Missing the required parameter 'objectStoreExtId' when calling getCaByCertificateId");
|
|
235
|
-
}
|
|
236
|
-
// verify the required parameter 'certificateExtId' is set
|
|
237
|
-
if (typeof certificateExtId === 'undefined' || certificateExtId === null) {
|
|
238
|
-
throw new Error("Missing the required parameter 'certificateExtId' when calling getCaByCertificateId");
|
|
114
|
+
const pathParams = {
|
|
115
|
+
'objectStoreExtId': objectStoreExtId
|
|
116
|
+
};
|
|
117
|
+
const queryParams = {};
|
|
118
|
+
let headersToInclude = {};
|
|
119
|
+
Object.keys(argMap).forEach(header => {
|
|
120
|
+
if (!this.#headersToSkip.has(header.toLowerCase())) {
|
|
121
|
+
headersToInclude[header] = argMap[header];
|
|
239
122
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
var formParams = {};
|
|
253
|
-
var authNames = ['basicAuthScheme'];
|
|
254
|
-
var contentTypes = [];
|
|
255
|
-
var accepts = ['application/octet-stream', 'application/json'];
|
|
256
|
-
var returnType = _GetCaApiResponse["default"];
|
|
257
|
-
return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates/{certificateExtId}/certificate-authority', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
258
|
-
}
|
|
123
|
+
});
|
|
124
|
+
const headerParams = {
|
|
125
|
+
...headersToInclude
|
|
126
|
+
};
|
|
127
|
+
const formParams = {};
|
|
128
|
+
_ApiClient.ApiClient.addEtagReferenceToHeader(body, headerParams);
|
|
129
|
+
const authNames = ['basicAuthScheme'];
|
|
130
|
+
const contentTypes = ['application/octet-stream'];
|
|
131
|
+
const accepts = ['application/json'];
|
|
132
|
+
const returnType = _CreateCertificateApiResponse.default;
|
|
133
|
+
return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
134
|
+
}
|
|
259
135
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
136
|
+
/**
|
|
137
|
+
* Create an Object store
|
|
138
|
+
* Run the prechecks, create and start the deployment of an Object store on Prism Central.
|
|
139
|
+
* @param { Required<Pick<ObjectStore, 'name'>> & Partial<ObjectStore> } body specification
|
|
140
|
+
* @param {Object} args Additional Arguments
|
|
141
|
+
* @return {Promise<CreateObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link CreateObjectstoreApiResponse } and HTTP response
|
|
142
|
+
*/
|
|
143
|
+
createObjectstore(body, ...args) {
|
|
144
|
+
let argMap = args.length > 0 ? args[0] : {};
|
|
145
|
+
let postBody = null;
|
|
146
|
+
if (body instanceof _ObjectStore.default && typeof body.toJson === 'function') {
|
|
147
|
+
postBody = body.toJson();
|
|
148
|
+
} else {
|
|
149
|
+
postBody = body;
|
|
150
|
+
}
|
|
151
|
+
// verify the required parameter 'body' is set
|
|
152
|
+
if (typeof postBody === 'undefined' || postBody === null) {
|
|
153
|
+
throw new Error("Invalid body when calling createObjectstore");
|
|
154
|
+
}
|
|
155
|
+
const pathParams = {};
|
|
156
|
+
const queryParams = {};
|
|
157
|
+
let headersToInclude = {};
|
|
158
|
+
Object.keys(argMap).forEach(header => {
|
|
159
|
+
if (!this.#headersToSkip.has(header.toLowerCase())) {
|
|
160
|
+
headersToInclude[header] = argMap[header];
|
|
281
161
|
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
162
|
+
});
|
|
163
|
+
const headerParams = {
|
|
164
|
+
...headersToInclude
|
|
165
|
+
};
|
|
166
|
+
const formParams = {};
|
|
167
|
+
_ApiClient.ApiClient.addEtagReferenceToHeader(body, headerParams);
|
|
168
|
+
const authNames = ['basicAuthScheme'];
|
|
169
|
+
const contentTypes = ['application/json'];
|
|
170
|
+
const accepts = ['application/json'];
|
|
171
|
+
const returnType = _CreateObjectstoreApiResponse.default;
|
|
172
|
+
return this.apiClient.callApi('/api/objects/v4.0/config/object-stores', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Delete an Object store
|
|
177
|
+
* Send a request to delete an Object store for the provided UUID and clean up its data. An Object store can only be deleted when it is in the state UNDEPLOYED_OBJECT_STORE, OBJECT_STORE_AVAILABLE, OBJECT_STORE_DEPLOYMENT_FAILED or OBJECT_STORE_DELETION_FAILED and does not contain any buckets.
|
|
178
|
+
* @param { String } extId The UUID of the Object store.
|
|
179
|
+
* @param {Object} args Additional Arguments
|
|
180
|
+
* @return {Promise<DeleteObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link DeleteObjectstoreApiResponse } and HTTP response
|
|
181
|
+
*/
|
|
182
|
+
deleteObjectstoreById(extId, ...args) {
|
|
183
|
+
let argMap = args.length > 0 ? args[0] : {};
|
|
184
|
+
const postBody = null;
|
|
185
|
+
// verify the required parameter 'extId' is set
|
|
186
|
+
if (typeof extId === 'undefined' || extId === null) {
|
|
187
|
+
throw new Error("Missing the required parameter 'extId' when calling deleteObjectstoreById");
|
|
300
188
|
}
|
|
189
|
+
const pathParams = {
|
|
190
|
+
'extId': extId
|
|
191
|
+
};
|
|
192
|
+
const queryParams = {};
|
|
193
|
+
let headersToInclude = {};
|
|
194
|
+
Object.keys(argMap).forEach(header => {
|
|
195
|
+
if (!this.#headersToSkip.has(header.toLowerCase())) {
|
|
196
|
+
headersToInclude[header] = argMap[header];
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
const headerParams = {
|
|
200
|
+
...headersToInclude
|
|
201
|
+
};
|
|
202
|
+
const formParams = {};
|
|
203
|
+
const authNames = ['basicAuthScheme'];
|
|
204
|
+
const contentTypes = [];
|
|
205
|
+
const accepts = ['application/json'];
|
|
206
|
+
const returnType = _DeleteObjectstoreApiResponse.default;
|
|
207
|
+
return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{extId}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
208
|
+
}
|
|
301
209
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
210
|
+
/**
|
|
211
|
+
* Download the certificate authority
|
|
212
|
+
* Download the certificate authority of an Object store certificate.
|
|
213
|
+
* @param { String } objectStoreExtId The UUID of the Object store.
|
|
214
|
+
* @param { String } certificateExtId The UUID of the certificate of an Object store.
|
|
215
|
+
* @param {Object} args Additional Arguments
|
|
216
|
+
* @return {Promise<GetCaApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetCaApiResponse } and HTTP response
|
|
217
|
+
*/
|
|
218
|
+
getCaByCertificateId(objectStoreExtId, certificateExtId, ...args) {
|
|
219
|
+
let argMap = args.length > 0 ? args[0] : {};
|
|
220
|
+
const postBody = null;
|
|
221
|
+
// verify the required parameter 'objectStoreExtId' is set
|
|
222
|
+
if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {
|
|
223
|
+
throw new Error("Missing the required parameter 'objectStoreExtId' when calling getCaByCertificateId");
|
|
224
|
+
}
|
|
225
|
+
// verify the required parameter 'certificateExtId' is set
|
|
226
|
+
if (typeof certificateExtId === 'undefined' || certificateExtId === null) {
|
|
227
|
+
throw new Error("Missing the required parameter 'certificateExtId' when calling getCaByCertificateId");
|
|
228
|
+
}
|
|
229
|
+
const pathParams = {
|
|
230
|
+
'objectStoreExtId': objectStoreExtId,
|
|
231
|
+
'certificateExtId': certificateExtId
|
|
232
|
+
};
|
|
233
|
+
const queryParams = {};
|
|
234
|
+
let headersToInclude = {};
|
|
235
|
+
Object.keys(argMap).forEach(header => {
|
|
236
|
+
if (!this.#headersToSkip.has(header.toLowerCase())) {
|
|
237
|
+
headersToInclude[header] = argMap[header];
|
|
318
238
|
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
239
|
+
});
|
|
240
|
+
const headerParams = {
|
|
241
|
+
...headersToInclude
|
|
242
|
+
};
|
|
243
|
+
const formParams = {};
|
|
244
|
+
const authNames = ['basicAuthScheme'];
|
|
245
|
+
const contentTypes = [];
|
|
246
|
+
const accepts = ['application/octet-stream', 'application/json'];
|
|
247
|
+
const returnType = _GetCaApiResponse.default;
|
|
248
|
+
return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates/{certificateExtId}/certificate-authority', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Get the details of an Object store certificate
|
|
253
|
+
* Get the details of the SSL certificate which can be used to connect to an Object store.
|
|
254
|
+
* @param { String } objectStoreExtId The UUID of the Object store.
|
|
255
|
+
* @param { String } extId The UUID of the certificate of an Object store.
|
|
256
|
+
* @param {Object} args Additional Arguments
|
|
257
|
+
* @return {Promise<GetCertificateApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetCertificateApiResponse } and HTTP response
|
|
258
|
+
*/
|
|
259
|
+
getCertificateById(objectStoreExtId, extId, ...args) {
|
|
260
|
+
let argMap = args.length > 0 ? args[0] : {};
|
|
261
|
+
const postBody = null;
|
|
262
|
+
// verify the required parameter 'objectStoreExtId' is set
|
|
263
|
+
if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {
|
|
264
|
+
throw new Error("Missing the required parameter 'objectStoreExtId' when calling getCertificateById");
|
|
265
|
+
}
|
|
266
|
+
// verify the required parameter 'extId' is set
|
|
267
|
+
if (typeof extId === 'undefined' || extId === null) {
|
|
268
|
+
throw new Error("Missing the required parameter 'extId' when calling getCertificateById");
|
|
336
269
|
}
|
|
270
|
+
const pathParams = {
|
|
271
|
+
'objectStoreExtId': objectStoreExtId,
|
|
272
|
+
'extId': extId
|
|
273
|
+
};
|
|
274
|
+
const queryParams = {};
|
|
275
|
+
let headersToInclude = {};
|
|
276
|
+
Object.keys(argMap).forEach(header => {
|
|
277
|
+
if (!this.#headersToSkip.has(header.toLowerCase())) {
|
|
278
|
+
headersToInclude[header] = argMap[header];
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
const headerParams = {
|
|
282
|
+
...headersToInclude
|
|
283
|
+
};
|
|
284
|
+
const formParams = {};
|
|
285
|
+
const authNames = ['basicAuthScheme'];
|
|
286
|
+
const contentTypes = [];
|
|
287
|
+
const accepts = ['application/json'];
|
|
288
|
+
const returnType = _GetCertificateApiResponse.default;
|
|
289
|
+
return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates/{extId}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
290
|
+
}
|
|
337
291
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
value: function listCertificatesByObjectstoreId(objectStoreExtId, opts) {
|
|
361
|
-
var _this7 = this;
|
|
362
|
-
var argMap = (arguments.length <= 2 ? 0 : arguments.length - 2) > 0 ? arguments.length <= 2 ? undefined : arguments[2] : {};
|
|
363
|
-
opts = opts || {};
|
|
364
|
-
var postBody = null;
|
|
365
|
-
// verify the required parameter 'objectStoreExtId' is set
|
|
366
|
-
if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {
|
|
367
|
-
throw new Error("Missing the required parameter 'objectStoreExtId' when calling listCertificatesByObjectstoreId");
|
|
292
|
+
/**
|
|
293
|
+
* Get an Object store
|
|
294
|
+
* 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. |
|
|
295
|
+
* @param { String } extId The UUID of the Object store.
|
|
296
|
+
* @param {Object} args Additional Arguments
|
|
297
|
+
* @return {Promise<GetObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetObjectstoreApiResponse } and HTTP response
|
|
298
|
+
*/
|
|
299
|
+
getObjectstoreById(extId, ...args) {
|
|
300
|
+
let argMap = args.length > 0 ? args[0] : {};
|
|
301
|
+
const postBody = null;
|
|
302
|
+
// verify the required parameter 'extId' is set
|
|
303
|
+
if (typeof extId === 'undefined' || extId === null) {
|
|
304
|
+
throw new Error("Missing the required parameter 'extId' when calling getObjectstoreById");
|
|
305
|
+
}
|
|
306
|
+
const pathParams = {
|
|
307
|
+
'extId': extId
|
|
308
|
+
};
|
|
309
|
+
const queryParams = {};
|
|
310
|
+
let headersToInclude = {};
|
|
311
|
+
Object.keys(argMap).forEach(header => {
|
|
312
|
+
if (!this.#headersToSkip.has(header.toLowerCase())) {
|
|
313
|
+
headersToInclude[header] = argMap[header];
|
|
368
314
|
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
315
|
+
});
|
|
316
|
+
const headerParams = {
|
|
317
|
+
...headersToInclude
|
|
318
|
+
};
|
|
319
|
+
const formParams = {};
|
|
320
|
+
const authNames = ['basicAuthScheme'];
|
|
321
|
+
const contentTypes = [];
|
|
322
|
+
const accepts = ['application/json'];
|
|
323
|
+
const returnType = _GetObjectstoreApiResponse.default;
|
|
324
|
+
return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{extId}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Get a list of the SSL certificates of an Object store
|
|
329
|
+
* Get a list of the SSL certificates which can be used to access an Object store.
|
|
330
|
+
* @param { String } objectStoreExtId The UUID of the Object store.
|
|
331
|
+
* @param {Object} opts Optional parameters defined for the operation
|
|
332
|
+
* @param { Number } opts.$page A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
|
|
333
|
+
* @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.
|
|
334
|
+
* @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>
|
|
335
|
+
* 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'.
|
|
336
|
+
* @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.
|
|
337
|
+
* @param {Object} args Additional Arguments
|
|
338
|
+
* @return {Promise<ListCertificatesApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link ListCertificatesApiResponse } and HTTP response
|
|
339
|
+
*/
|
|
340
|
+
listCertificatesByObjectstoreId(objectStoreExtId, opts, ...args) {
|
|
341
|
+
let argMap = args.length > 0 ? args[0] : {};
|
|
342
|
+
opts = opts || {};
|
|
343
|
+
const postBody = null;
|
|
344
|
+
// verify the required parameter 'objectStoreExtId' is set
|
|
345
|
+
if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {
|
|
346
|
+
throw new Error("Missing the required parameter 'objectStoreExtId' when calling listCertificatesByObjectstoreId");
|
|
347
|
+
}
|
|
348
|
+
const pathParams = {
|
|
349
|
+
'objectStoreExtId': objectStoreExtId
|
|
350
|
+
};
|
|
351
|
+
const queryParams = {
|
|
352
|
+
...(opts.hasOwnProperty('$page') ? {
|
|
373
353
|
'$page': opts['$page']
|
|
374
|
-
} : {}),
|
|
354
|
+
} : {}),
|
|
355
|
+
...(opts.hasOwnProperty('$limit') ? {
|
|
375
356
|
'$limit': opts['$limit']
|
|
376
|
-
} : {}),
|
|
357
|
+
} : {}),
|
|
358
|
+
...(opts.hasOwnProperty('$filter') ? {
|
|
377
359
|
'$filter': opts['$filter']
|
|
378
|
-
} : {}),
|
|
360
|
+
} : {}),
|
|
361
|
+
...(opts.hasOwnProperty('$select') ? {
|
|
379
362
|
'$select': opts['$select']
|
|
380
|
-
} : {})
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
363
|
+
} : {})
|
|
364
|
+
};
|
|
365
|
+
let headersToInclude = {};
|
|
366
|
+
Object.keys(argMap).forEach(header => {
|
|
367
|
+
if (!this.#headersToSkip.has(header.toLowerCase())) {
|
|
368
|
+
headersToInclude[header] = argMap[header];
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
const headerParams = {
|
|
372
|
+
...headersToInclude
|
|
373
|
+
};
|
|
374
|
+
const formParams = {};
|
|
375
|
+
const authNames = ['basicAuthScheme'];
|
|
376
|
+
const contentTypes = [];
|
|
377
|
+
const accepts = ['application/json'];
|
|
378
|
+
const returnType = _ListCertificatesApiResponse.default;
|
|
379
|
+
return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
380
|
+
}
|
|
395
381
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
* - region<br>
|
|
418
|
-
* - storageNetworkDnsIp/ipv4/value<br>
|
|
419
|
-
* - storageNetworkDnsIp/ipv6/value<br>
|
|
420
|
-
* - storageNetworkReference<br>
|
|
421
|
-
* - storageNetworkVip/ipv4/value<br>
|
|
422
|
-
* - storageNetworkVip/ipv6/value<br>
|
|
423
|
-
* - totalCapacityGiB
|
|
424
|
-
* @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>
|
|
425
|
-
* The orderby can be applied to the following fields:<br>
|
|
426
|
-
* - clusterExtId<br>
|
|
427
|
-
* - creationTime<br>
|
|
428
|
-
* - deploymentVersion<br>
|
|
429
|
-
* - description<br>
|
|
430
|
-
* - domain<br>
|
|
431
|
-
* - lastUpdateTime<br>
|
|
432
|
-
* - name<br>
|
|
433
|
-
* - numWorkerNodes<br>
|
|
434
|
-
* - publicNetworkReference<br>
|
|
435
|
-
* - region<br>
|
|
436
|
-
* - storageNetworkReference<br>
|
|
437
|
-
* - totalCapacityGiB
|
|
438
|
-
* @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.
|
|
439
|
-
- certificates
|
|
440
|
-
* @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.
|
|
441
|
-
- certificateExtIds
|
|
442
|
-
- clusterExtId
|
|
443
|
-
- creationTime
|
|
444
|
-
- deploymentVersion
|
|
445
|
-
- description
|
|
446
|
-
- domain
|
|
447
|
-
- lastUpdateTime
|
|
448
|
-
- name
|
|
449
|
-
- numWorkerNodes
|
|
450
|
-
- publicNetworkIps
|
|
451
|
-
- publicNetworkIps/ipv4/value
|
|
452
|
-
- publicNetworkReference
|
|
453
|
-
- region
|
|
454
|
-
- state
|
|
455
|
-
- storageNetworkDnsIp
|
|
456
|
-
- storageNetworkDnsIp/ipv4/value
|
|
457
|
-
- storageNetworkReference
|
|
458
|
-
- storageNetworkVip
|
|
459
|
-
- storageNetworkVip/ipv4/value
|
|
460
|
-
- totalCapacityGiB
|
|
461
|
-
* @param {Object} args Additional Arguments
|
|
462
|
-
* @return {Promise<ListObjectstoresApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link ListObjectstoresApiResponse } and HTTP response
|
|
463
|
-
*/
|
|
464
|
-
}, {
|
|
465
|
-
key: "listObjectstores",
|
|
466
|
-
value: function listObjectstores(opts) {
|
|
467
|
-
var _this8 = this;
|
|
468
|
-
var argMap = (arguments.length <= 1 ? 0 : arguments.length - 1) > 0 ? arguments.length <= 1 ? undefined : arguments[1] : {};
|
|
469
|
-
opts = opts || {};
|
|
470
|
-
var postBody = null;
|
|
471
|
-
var pathParams = {};
|
|
472
|
-
var queryParams = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, opts.hasOwnProperty('$page') ? {
|
|
382
|
+
/**
|
|
383
|
+
* Get a list of the Object stores
|
|
384
|
+
* Get a list of all the Object store details on the registered Prism Central.
|
|
385
|
+
* @param {Object} opts Optional parameters defined for the operation
|
|
386
|
+
* @param { Number } opts.$page A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
|
|
387
|
+
* @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.
|
|
388
|
+
* @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>
|
|
389
|
+
* 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'.
|
|
390
|
+
* @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.
|
|
391
|
+
* @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.
|
|
392
|
+
* @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.
|
|
393
|
+
* @param {Object} args Additional Arguments
|
|
394
|
+
* @return {Promise<ListObjectstoresApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link ListObjectstoresApiResponse } and HTTP response
|
|
395
|
+
*/
|
|
396
|
+
listObjectstores(opts, ...args) {
|
|
397
|
+
let argMap = args.length > 0 ? args[0] : {};
|
|
398
|
+
opts = opts || {};
|
|
399
|
+
const postBody = null;
|
|
400
|
+
const pathParams = {};
|
|
401
|
+
const queryParams = {
|
|
402
|
+
...(opts.hasOwnProperty('$page') ? {
|
|
473
403
|
'$page': opts['$page']
|
|
474
|
-
} : {}),
|
|
404
|
+
} : {}),
|
|
405
|
+
...(opts.hasOwnProperty('$limit') ? {
|
|
475
406
|
'$limit': opts['$limit']
|
|
476
|
-
} : {}),
|
|
407
|
+
} : {}),
|
|
408
|
+
...(opts.hasOwnProperty('$filter') ? {
|
|
477
409
|
'$filter': opts['$filter']
|
|
478
|
-
} : {}),
|
|
410
|
+
} : {}),
|
|
411
|
+
...(opts.hasOwnProperty('$orderby') ? {
|
|
479
412
|
'$orderby': opts['$orderby']
|
|
480
|
-
} : {}),
|
|
413
|
+
} : {}),
|
|
414
|
+
...(opts.hasOwnProperty('$expand') ? {
|
|
481
415
|
'$expand': opts['$expand']
|
|
482
|
-
} : {}),
|
|
416
|
+
} : {}),
|
|
417
|
+
...(opts.hasOwnProperty('$select') ? {
|
|
483
418
|
'$select': opts['$select']
|
|
484
|
-
} : {})
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
});
|
|
491
|
-
var headerParams = _objectSpread({}, headersToInclude);
|
|
492
|
-
var formParams = {};
|
|
493
|
-
var authNames = ['basicAuthScheme'];
|
|
494
|
-
var contentTypes = [];
|
|
495
|
-
var accepts = ['application/json'];
|
|
496
|
-
var returnType = _ListObjectstoresApiResponse["default"];
|
|
497
|
-
return this.apiClient.callApi('/api/objects/v4.0/config/object-stores', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
/**
|
|
501
|
-
* Update an Object store
|
|
502
|
-
* Update an Object store. The deployment of an Object store can be restarted from the state OBJECT_STORE_DEPLOYMENT_FAILED.
|
|
503
|
-
* @param { Required<Pick<ObjectStore, 'name'>> & Partial<ObjectStore> } body specification
|
|
504
|
-
* @param { String } extId The UUID of the Object store.
|
|
505
|
-
* @param {Object} args Additional Arguments
|
|
506
|
-
* @return {Promise<UpdateObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link UpdateObjectstoreApiResponse } and HTTP response
|
|
507
|
-
*/
|
|
508
|
-
}, {
|
|
509
|
-
key: "updateObjectstoreById",
|
|
510
|
-
value: function updateObjectstoreById(extId, body) {
|
|
511
|
-
var _this9 = this;
|
|
512
|
-
var argMap = (arguments.length <= 2 ? 0 : arguments.length - 2) > 0 ? arguments.length <= 2 ? undefined : arguments[2] : {};
|
|
513
|
-
var postBody = null;
|
|
514
|
-
if (body instanceof _ObjectStore["default"] && typeof body.toJson === 'function') {
|
|
515
|
-
postBody = body.toJson();
|
|
516
|
-
} else {
|
|
517
|
-
postBody = body;
|
|
518
|
-
}
|
|
519
|
-
// verify the required parameter 'extId' is set
|
|
520
|
-
if (typeof extId === 'undefined' || extId === null) {
|
|
521
|
-
throw new Error("Missing the required parameter 'extId' when calling updateObjectstoreById");
|
|
419
|
+
} : {})
|
|
420
|
+
};
|
|
421
|
+
let headersToInclude = {};
|
|
422
|
+
Object.keys(argMap).forEach(header => {
|
|
423
|
+
if (!this.#headersToSkip.has(header.toLowerCase())) {
|
|
424
|
+
headersToInclude[header] = argMap[header];
|
|
522
425
|
}
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
426
|
+
});
|
|
427
|
+
const headerParams = {
|
|
428
|
+
...headersToInclude
|
|
429
|
+
};
|
|
430
|
+
const formParams = {};
|
|
431
|
+
const authNames = ['basicAuthScheme'];
|
|
432
|
+
const contentTypes = [];
|
|
433
|
+
const accepts = ['application/json'];
|
|
434
|
+
const returnType = _ListObjectstoresApiResponse.default;
|
|
435
|
+
return this.apiClient.callApi('/api/objects/v4.0/config/object-stores', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Update an Object store
|
|
440
|
+
* Update an Object store. The deployment of an Object store can be restarted from the state OBJECT_STORE_DEPLOYMENT_FAILED.
|
|
441
|
+
* @param { Required<Pick<ObjectStore, 'name'>> & Partial<ObjectStore> } body specification
|
|
442
|
+
* @param { String } extId The UUID of the Object store.
|
|
443
|
+
* @param {Object} args Additional Arguments
|
|
444
|
+
* @return {Promise<UpdateObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link UpdateObjectstoreApiResponse } and HTTP response
|
|
445
|
+
*/
|
|
446
|
+
updateObjectstoreById(extId, body, ...args) {
|
|
447
|
+
let argMap = args.length > 0 ? args[0] : {};
|
|
448
|
+
let postBody = null;
|
|
449
|
+
if (body instanceof _ObjectStore.default && typeof body.toJson === 'function') {
|
|
450
|
+
postBody = body.toJson();
|
|
451
|
+
} else {
|
|
452
|
+
postBody = body;
|
|
453
|
+
}
|
|
454
|
+
// verify the required parameter 'extId' is set
|
|
455
|
+
if (typeof extId === 'undefined' || extId === null) {
|
|
456
|
+
throw new Error("Missing the required parameter 'extId' when calling updateObjectstoreById");
|
|
545
457
|
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* Make the default {@link ApiClient} class available for developers to be able to extend it and bring
|
|
551
|
-
* their own fetch methods into the SDK
|
|
552
|
-
*/
|
|
553
|
-
function get() {
|
|
554
|
-
return _ApiClient.ApiClient;
|
|
458
|
+
// verify the required parameter 'body' is set
|
|
459
|
+
if (typeof postBody === 'undefined' || postBody === null) {
|
|
460
|
+
throw new Error("Invalid body when calling updateObjectstoreById");
|
|
555
461
|
}
|
|
556
|
-
|
|
557
|
-
|
|
462
|
+
const pathParams = {
|
|
463
|
+
'extId': extId
|
|
464
|
+
};
|
|
465
|
+
const queryParams = {};
|
|
466
|
+
let headersToInclude = {};
|
|
467
|
+
Object.keys(argMap).forEach(header => {
|
|
468
|
+
if (!this.#headersToSkip.has(header.toLowerCase())) {
|
|
469
|
+
headersToInclude[header] = argMap[header];
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
const headerParams = {
|
|
473
|
+
...headersToInclude
|
|
474
|
+
};
|
|
475
|
+
const formParams = {};
|
|
476
|
+
_ApiClient.ApiClient.addEtagReferenceToHeader(body, headerParams);
|
|
477
|
+
const authNames = ['basicAuthScheme'];
|
|
478
|
+
const contentTypes = ['application/json'];
|
|
479
|
+
const accepts = ['application/json'];
|
|
480
|
+
const returnType = _UpdateObjectstoreApiResponse.default;
|
|
481
|
+
return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{extId}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
exports.ObjectStoresApi = ObjectStoresApi;
|