@nutanix-scratch/objects-js-client 4.0.1 → 4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/README.md +31 -18
  2. package/dist/Ntnx-Objects-js-client-prod.js +1 -1
  3. package/dist/Ntnx-Objects-js-client.js +289 -283
  4. package/dist/es/ApiClient.d.ts +35 -7
  5. package/dist/es/ApiClient.js +862 -684
  6. package/dist/es/Paginable.d.ts +1 -1
  7. package/dist/es/Paginable.js +144 -183
  8. package/dist/es/apis/objectstores-endpoints.d.ts +5 -69
  9. package/dist/es/apis/objectstores-endpoints.js +406 -479
  10. package/dist/es/apis/stats-endpoints.d.ts +3 -25
  11. package/dist/es/apis/stats-endpoints.js +75 -107
  12. package/dist/es/index.js +120 -120
  13. package/dist/es/models/common/v1/config/FQDN.d.ts +2 -7
  14. package/dist/es/models/common/v1/config/FQDN.js +141 -180
  15. package/dist/es/models/common/v1/config/Flag.d.ts +2 -8
  16. package/dist/es/models/common/v1/config/Flag.js +170 -211
  17. package/dist/es/models/common/v1/config/IPAddress.d.ts +2 -20
  18. package/dist/es/models/common/v1/config/IPAddress.js +170 -217
  19. package/dist/es/models/common/v1/config/IPv4Address.d.ts +2 -8
  20. package/dist/es/models/common/v1/config/IPv4Address.js +174 -215
  21. package/dist/es/models/common/v1/config/IPv6Address.d.ts +2 -8
  22. package/dist/es/models/common/v1/config/IPv6Address.js +174 -215
  23. package/dist/es/models/common/v1/config/KVPair.d.ts +2 -8
  24. package/dist/es/models/common/v1/config/KVPair.js +225 -270
  25. package/dist/es/models/common/v1/config/MapOfStringWrapper.d.ts +2 -7
  26. package/dist/es/models/common/v1/config/MapOfStringWrapper.js +139 -178
  27. package/dist/es/models/common/v1/config/Message.d.ts +2 -10
  28. package/dist/es/models/common/v1/config/Message.js +213 -258
  29. package/dist/es/models/common/v1/config/MessageSeverity.js +7 -9
  30. package/dist/es/models/common/v1/config/Metadata.d.ts +2 -11
  31. package/dist/es/models/common/v1/config/Metadata.js +261 -308
  32. package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +5 -10
  33. package/dist/es/models/common/v1/config/TenantAwareModel.js +138 -178
  34. package/dist/es/models/common/v1/response/ApiLink.d.ts +2 -8
  35. package/dist/es/models/common/v1/response/ApiLink.js +165 -206
  36. package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +2 -40
  37. package/dist/es/models/common/v1/response/ApiResponseMetadata.js +281 -344
  38. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -15
  39. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +155 -203
  40. package/dist/es/models/common/v1/stats/DownSamplingOperator.js +7 -9
  41. package/dist/es/models/common/v1/stats/TimeIntValuePair.d.ts +2 -8
  42. package/dist/es/models/common/v1/stats/TimeIntValuePair.js +165 -206
  43. package/dist/es/models/objects/v4/config/Certificate.d.ts +1 -58
  44. package/dist/es/models/objects/v4/config/Certificate.js +319 -381
  45. package/dist/es/models/objects/v4/config/CertificateProjection.d.ts +1 -1
  46. package/dist/es/models/objects/v4/config/CertificateProjection.js +73 -102
  47. package/dist/es/models/objects/v4/config/CreateCertificateApiResponse.d.ts +2 -45
  48. package/dist/es/models/objects/v4/config/CreateCertificateApiResponse.js +185 -240
  49. package/dist/es/models/objects/v4/config/CreateObjectstoreApiResponse.d.ts +2 -43
  50. package/dist/es/models/objects/v4/config/CreateObjectstoreApiResponse.js +185 -240
  51. package/dist/es/models/objects/v4/config/DeleteObjectstoreApiResponse.d.ts +2 -43
  52. package/dist/es/models/objects/v4/config/DeleteObjectstoreApiResponse.js +185 -240
  53. package/dist/es/models/objects/v4/config/GetCaApiResponse.d.ts +2 -43
  54. package/dist/es/models/objects/v4/config/GetCaApiResponse.js +185 -240
  55. package/dist/es/models/objects/v4/config/GetCertificateApiResponse.d.ts +2 -43
  56. package/dist/es/models/objects/v4/config/GetCertificateApiResponse.js +185 -240
  57. package/dist/es/models/objects/v4/config/GetObjectstoreApiResponse.d.ts +2 -45
  58. package/dist/es/models/objects/v4/config/GetObjectstoreApiResponse.js +185 -240
  59. package/dist/es/models/objects/v4/config/ListCertificatesApiResponse.d.ts +2 -43
  60. package/dist/es/models/objects/v4/config/ListCertificatesApiResponse.js +211 -266
  61. package/dist/es/models/objects/v4/config/ListObjectstoresApiResponse.d.ts +2 -43
  62. package/dist/es/models/objects/v4/config/ListObjectstoresApiResponse.js +211 -266
  63. package/dist/es/models/objects/v4/config/ObjectStore.d.ts +1 -96
  64. package/dist/es/models/objects/v4/config/ObjectStore.js +628 -711
  65. package/dist/es/models/objects/v4/config/ObjectStoreProjection.d.ts +1 -152
  66. package/dist/es/models/objects/v4/config/ObjectStoreProjection.js +221 -238
  67. package/dist/es/models/objects/v4/config/State.js +7 -9
  68. package/dist/es/models/objects/v4/config/UpdateObjectstoreApiResponse.d.ts +2 -43
  69. package/dist/es/models/objects/v4/config/UpdateObjectstoreApiResponse.js +185 -240
  70. package/dist/es/models/objects/v4/error/AppMessage.d.ts +5 -15
  71. package/dist/es/models/objects/v4/error/AppMessage.js +264 -313
  72. package/dist/es/models/objects/v4/error/ErrorResponse.d.ts +2 -7
  73. package/dist/es/models/objects/v4/error/ErrorResponse.js +174 -217
  74. package/dist/es/models/objects/v4/error/SchemaValidationError.d.ts +2 -18
  75. package/dist/es/models/objects/v4/error/SchemaValidationError.js +248 -299
  76. package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +2 -9
  77. package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.js +190 -233
  78. package/dist/es/models/objects/v4/stats/GetObjectstoreStatsApiResponse.d.ts +2 -43
  79. package/dist/es/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js +185 -240
  80. package/dist/es/models/objects/v4/stats/ObjectstoreStats.d.ts +1 -169
  81. package/dist/es/models/objects/v4/stats/ObjectstoreStats.js +957 -1129
  82. package/dist/es/models/objects/v4/stats/TimeFloatValuePair.d.ts +2 -8
  83. package/dist/es/models/objects/v4/stats/TimeFloatValuePair.js +165 -206
  84. package/dist/es/models/prism/v4/config/TaskReference.d.ts +5 -10
  85. package/dist/es/models/prism/v4/config/TaskReference.js +143 -182
  86. package/dist/es/models/validation/ValidationError.js +26 -42
  87. package/dist/es/models/validation/ValidationScopes.js +3 -3
  88. package/dist/es/utils/ValidationUtils.js +39 -69
  89. package/dist/lib/ApiClient.d.ts +35 -7
  90. package/dist/lib/ApiClient.js +862 -684
  91. package/dist/lib/Paginable.d.ts +1 -1
  92. package/dist/lib/Paginable.js +144 -183
  93. package/dist/lib/apis/objectstores-endpoints.d.ts +5 -69
  94. package/dist/lib/apis/objectstores-endpoints.js +406 -479
  95. package/dist/lib/apis/stats-endpoints.d.ts +3 -25
  96. package/dist/lib/apis/stats-endpoints.js +75 -107
  97. package/dist/lib/index.js +120 -120
  98. package/dist/lib/models/common/v1/config/FQDN.d.ts +2 -7
  99. package/dist/lib/models/common/v1/config/FQDN.js +141 -180
  100. package/dist/lib/models/common/v1/config/Flag.d.ts +2 -8
  101. package/dist/lib/models/common/v1/config/Flag.js +170 -211
  102. package/dist/lib/models/common/v1/config/IPAddress.d.ts +2 -20
  103. package/dist/lib/models/common/v1/config/IPAddress.js +170 -217
  104. package/dist/lib/models/common/v1/config/IPv4Address.d.ts +2 -8
  105. package/dist/lib/models/common/v1/config/IPv4Address.js +174 -215
  106. package/dist/lib/models/common/v1/config/IPv6Address.d.ts +2 -8
  107. package/dist/lib/models/common/v1/config/IPv6Address.js +174 -215
  108. package/dist/lib/models/common/v1/config/KVPair.d.ts +2 -8
  109. package/dist/lib/models/common/v1/config/KVPair.js +225 -270
  110. package/dist/lib/models/common/v1/config/MapOfStringWrapper.d.ts +2 -7
  111. package/dist/lib/models/common/v1/config/MapOfStringWrapper.js +139 -178
  112. package/dist/lib/models/common/v1/config/Message.d.ts +2 -10
  113. package/dist/lib/models/common/v1/config/Message.js +213 -258
  114. package/dist/lib/models/common/v1/config/MessageSeverity.js +7 -9
  115. package/dist/lib/models/common/v1/config/Metadata.d.ts +2 -11
  116. package/dist/lib/models/common/v1/config/Metadata.js +261 -308
  117. package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +5 -10
  118. package/dist/lib/models/common/v1/config/TenantAwareModel.js +138 -178
  119. package/dist/lib/models/common/v1/response/ApiLink.d.ts +2 -8
  120. package/dist/lib/models/common/v1/response/ApiLink.js +165 -206
  121. package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +2 -40
  122. package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +281 -344
  123. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -15
  124. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +155 -203
  125. package/dist/lib/models/common/v1/stats/DownSamplingOperator.js +7 -9
  126. package/dist/lib/models/common/v1/stats/TimeIntValuePair.d.ts +2 -8
  127. package/dist/lib/models/common/v1/stats/TimeIntValuePair.js +165 -206
  128. package/dist/lib/models/objects/v4/config/Certificate.d.ts +1 -58
  129. package/dist/lib/models/objects/v4/config/Certificate.js +319 -381
  130. package/dist/lib/models/objects/v4/config/CertificateProjection.d.ts +1 -1
  131. package/dist/lib/models/objects/v4/config/CertificateProjection.js +73 -102
  132. package/dist/lib/models/objects/v4/config/CreateCertificateApiResponse.d.ts +2 -45
  133. package/dist/lib/models/objects/v4/config/CreateCertificateApiResponse.js +185 -240
  134. package/dist/lib/models/objects/v4/config/CreateObjectstoreApiResponse.d.ts +2 -43
  135. package/dist/lib/models/objects/v4/config/CreateObjectstoreApiResponse.js +185 -240
  136. package/dist/lib/models/objects/v4/config/DeleteObjectstoreApiResponse.d.ts +2 -43
  137. package/dist/lib/models/objects/v4/config/DeleteObjectstoreApiResponse.js +185 -240
  138. package/dist/lib/models/objects/v4/config/GetCaApiResponse.d.ts +2 -43
  139. package/dist/lib/models/objects/v4/config/GetCaApiResponse.js +185 -240
  140. package/dist/lib/models/objects/v4/config/GetCertificateApiResponse.d.ts +2 -43
  141. package/dist/lib/models/objects/v4/config/GetCertificateApiResponse.js +185 -240
  142. package/dist/lib/models/objects/v4/config/GetObjectstoreApiResponse.d.ts +2 -45
  143. package/dist/lib/models/objects/v4/config/GetObjectstoreApiResponse.js +185 -240
  144. package/dist/lib/models/objects/v4/config/ListCertificatesApiResponse.d.ts +2 -43
  145. package/dist/lib/models/objects/v4/config/ListCertificatesApiResponse.js +211 -266
  146. package/dist/lib/models/objects/v4/config/ListObjectstoresApiResponse.d.ts +2 -43
  147. package/dist/lib/models/objects/v4/config/ListObjectstoresApiResponse.js +211 -266
  148. package/dist/lib/models/objects/v4/config/ObjectStore.d.ts +1 -96
  149. package/dist/lib/models/objects/v4/config/ObjectStore.js +628 -711
  150. package/dist/lib/models/objects/v4/config/ObjectStoreProjection.d.ts +1 -152
  151. package/dist/lib/models/objects/v4/config/ObjectStoreProjection.js +221 -238
  152. package/dist/lib/models/objects/v4/config/State.js +7 -9
  153. package/dist/lib/models/objects/v4/config/UpdateObjectstoreApiResponse.d.ts +2 -43
  154. package/dist/lib/models/objects/v4/config/UpdateObjectstoreApiResponse.js +185 -240
  155. package/dist/lib/models/objects/v4/error/AppMessage.d.ts +5 -15
  156. package/dist/lib/models/objects/v4/error/AppMessage.js +264 -313
  157. package/dist/lib/models/objects/v4/error/ErrorResponse.d.ts +2 -7
  158. package/dist/lib/models/objects/v4/error/ErrorResponse.js +174 -217
  159. package/dist/lib/models/objects/v4/error/SchemaValidationError.d.ts +2 -18
  160. package/dist/lib/models/objects/v4/error/SchemaValidationError.js +248 -299
  161. package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +2 -9
  162. package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.js +190 -233
  163. package/dist/lib/models/objects/v4/stats/GetObjectstoreStatsApiResponse.d.ts +2 -43
  164. package/dist/lib/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js +185 -240
  165. package/dist/lib/models/objects/v4/stats/ObjectstoreStats.d.ts +1 -169
  166. package/dist/lib/models/objects/v4/stats/ObjectstoreStats.js +957 -1129
  167. package/dist/lib/models/objects/v4/stats/TimeFloatValuePair.d.ts +2 -8
  168. package/dist/lib/models/objects/v4/stats/TimeFloatValuePair.js +165 -206
  169. package/dist/lib/models/prism/v4/config/TaskReference.d.ts +5 -10
  170. package/dist/lib/models/prism/v4/config/TaskReference.js +143 -182
  171. package/dist/lib/models/validation/ValidationError.js +26 -42
  172. package/dist/lib/models/validation/ValidationScopes.js +3 -3
  173. package/dist/lib/utils/ValidationUtils.js +39 -69
  174. package/package.json +2 -2
@@ -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 _path2 = _interopRequireDefault(require("path"));
20
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
21
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
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.1
23
+ * OpenAPI spec version: 4.0.3
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: 16.9.1.8738-RELEASE
27
+ * Open API Dev Platform Codegen version: 17.5.1.10573-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.1
35
+ * @version 4.0.3
48
36
  * @class ObjectStoresApi
49
37
  */
50
- var _headersToSkip = /*#__PURE__*/new WeakMap();
51
- var ObjectStoresApi = exports.ObjectStoresApi = /*#__PURE__*/function () {
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
- function ObjectStoresApi(apiClient) {
60
- _classCallCheck(this, ObjectStoresApi);
61
- _classPrivateFieldInitSpec(this, _headersToSkip, void 0);
56
+ constructor(apiClient) {
62
57
  this.apiClient = apiClient || _ApiClient.ApiClient.instance;
63
- _classPrivateFieldSet(_headersToSkip, this, new Set());
64
- _classPrivateFieldGet(_headersToSkip, this).add('authorization');
65
- _classPrivateFieldGet(_headersToSkip, this).add('cookie');
66
- _classPrivateFieldGet(_headersToSkip, this).add('host');
67
- _classPrivateFieldGet(_headersToSkip, this).add('user-agent');
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
- return _createClass(ObjectStoresApi, [{
79
- key: "createCertificate",
80
- value: function createCertificate(objectStoreExtId, body) {
81
- var _this = this;
82
- var argMap = (arguments.length <= 2 ? 0 : arguments.length - 2) > 0 ? arguments.length <= 2 ? undefined : arguments[2] : {};
83
- var postBody = null;
84
- var fs;
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
- fs = require('fs');
87
- } catch (err) {}
88
- if (typeof body.pipe === 'function') {
89
- postBody = body;
90
- argMap["Content-Length"] = fs.statSync(body.path).size;
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="' + _path2["default"].parse(body.path).base + '"';
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
- try {
103
- postBody = fs.createReadStream(body);
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
- // verify the required parameter 'body' is set
119
- if (typeof postBody === 'undefined' || postBody === null) {
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
- * Create an Object store
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
- * Delete an Object store
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
- * Download the certificate authority
220
- * Download the certificate authority of an Object store certificate.
221
- * @param { String } objectStoreExtId The UUID of the Object store.
222
- * @param { String } certificateExtId The UUID of the certificate of an Object store.
223
- * @param {Object} args Additional Arguments
224
- * @return {Promise<GetCaApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetCaApiResponse } and HTTP response
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
- var pathParams = {
241
- 'objectStoreExtId': objectStoreExtId,
242
- 'certificateExtId': certificateExtId
243
- };
244
- var queryParams = {};
245
- var headersToInclude = {};
246
- Object.keys(argMap).forEach(function (header) {
247
- if (!_classPrivateFieldGet(_headersToSkip, _this4).has(header.toLowerCase())) {
248
- headersToInclude[header] = argMap[header];
249
- }
250
- });
251
- var headerParams = _objectSpread({}, headersToInclude);
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 = ['apiKeyAuthScheme', '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
- * Get the details of an Object store certificate
262
- * Get the details of the SSL certificate which can be used to connect to an Object store.
263
- * @param { String } objectStoreExtId The UUID of the Object store.
264
- * @param { String } extId The UUID of the certificate of an Object store.
265
- * @param {Object} args Additional Arguments
266
- * @return {Promise<GetCertificateApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetCertificateApiResponse } and HTTP response
267
- */
268
- }, {
269
- key: "getCertificateById",
270
- value: function getCertificateById(objectStoreExtId, extId) {
271
- var _this5 = this;
272
- var argMap = (arguments.length <= 2 ? 0 : arguments.length - 2) > 0 ? arguments.length <= 2 ? undefined : arguments[2] : {};
273
- var postBody = null;
274
- // verify the required parameter 'objectStoreExtId' is set
275
- if (typeof objectStoreExtId === 'undefined' || objectStoreExtId === null) {
276
- throw new Error("Missing the required parameter 'objectStoreExtId' when calling getCertificateById");
277
- }
278
- // verify the required parameter 'extId' is set
279
- if (typeof extId === 'undefined' || extId === null) {
280
- throw new Error("Missing the required parameter 'extId' when calling getCertificateById");
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
- var pathParams = {
283
- 'objectStoreExtId': objectStoreExtId,
284
- 'extId': extId
285
- };
286
- var queryParams = {};
287
- var headersToInclude = {};
288
- Object.keys(argMap).forEach(function (header) {
289
- if (!_classPrivateFieldGet(_headersToSkip, _this5).has(header.toLowerCase())) {
290
- headersToInclude[header] = argMap[header];
291
- }
292
- });
293
- var headerParams = _objectSpread({}, headersToInclude);
294
- var formParams = {};
295
- var authNames = ['basicAuthScheme'];
296
- var contentTypes = [];
297
- var accepts = ['application/json'];
298
- var returnType = _GetCertificateApiResponse["default"];
299
- return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates/{extId}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
162
+ });
163
+ const headerParams = {
164
+ ...headersToInclude
165
+ };
166
+ const formParams = {};
167
+ _ApiClient.ApiClient.addEtagReferenceToHeader(body, headerParams);
168
+ const authNames = ['apiKeyAuthScheme', '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 = ['apiKeyAuthScheme', '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
- * Get an Object store
304
- * Get an Object store for the provided UUID. &#x60;state&#x60; string (State of the Object store) Enum for the state of the Object store. | Enum | Description | | ----------- | ----------- | | &#x60;\&quot;DEPLOYING_OBJECT_STORE\&quot;&#x60; | 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. | | &#x60;\&quot;OBJECT_STORE_OPERATION_FAILED\&quot;&#x60; | 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. | | &#x60;\&quot;OBJECT_STORE_CERT_CREATION_FAILED\&quot;&#x60; | 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. | | &#x60;\&quot;OBJECT_STORE_OPERATION_PENDING\&quot;&#x60; | 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. | | &#x60;\&quot;UNDEPLOYED_OBJECT_STORE\&quot;&#x60; | The Object store is in this state if it has not been deployed. | | &#x60;\&quot;CREATING_OBJECT_STORE_CERT\&quot;&#x60; | 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. | | &#x60;\&quot;OBJECT_STORE_AVAILABLE\&quot;&#x60; | 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. | | &#x60;\&quot;OBJECT_STORE_DELETION_FAILED\&quot;&#x60; | 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. | | &#x60;\&quot;OBJECT_STORE_DEPLOYMENT_FAILED\&quot;&#x60; | 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. | | &#x60;\&quot;DELETING_OBJECT_STORE\&quot;&#x60; | 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. |
305
- * @param { String } extId The UUID of the Object store.
306
- * @param {Object} args Additional Arguments
307
- * @return {Promise<GetObjectstoreApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetObjectstoreApiResponse } and HTTP response
308
- */
309
- }, {
310
- key: "getObjectstoreById",
311
- value: function getObjectstoreById(extId) {
312
- var _this6 = this;
313
- var argMap = (arguments.length <= 1 ? 0 : arguments.length - 1) > 0 ? arguments.length <= 1 ? undefined : arguments[1] : {};
314
- var postBody = null;
315
- // verify the required parameter 'extId' is set
316
- if (typeof extId === 'undefined' || extId === null) {
317
- throw new Error("Missing the required parameter 'extId' when calling getObjectstoreById");
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
- var pathParams = {
320
- 'extId': extId
321
- };
322
- var queryParams = {};
323
- var headersToInclude = {};
324
- Object.keys(argMap).forEach(function (header) {
325
- if (!_classPrivateFieldGet(_headersToSkip, _this6).has(header.toLowerCase())) {
326
- headersToInclude[header] = argMap[header];
327
- }
328
- });
329
- var headerParams = _objectSpread({}, headersToInclude);
330
- var formParams = {};
331
- var authNames = ['basicAuthScheme'];
332
- var contentTypes = [];
333
- var accepts = ['application/json'];
334
- var returnType = _GetObjectstoreApiResponse["default"];
335
- return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{extId}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
239
+ });
240
+ const headerParams = {
241
+ ...headersToInclude
242
+ };
243
+ const formParams = {};
244
+ const authNames = ['apiKeyAuthScheme', '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 = ['apiKeyAuthScheme', '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
- * Get a list of the SSL certificates of an Object store
340
- * Get a list of the SSL certificates which can be used to access an Object store.
341
- * @param { String } objectStoreExtId The UUID of the Object store.
342
- * @param {Object} opts Optional parameters defined for the operation
343
- * @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.
344
- * @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.
345
- * @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>
346
- * 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'.<br>
347
- * The filter can be applied to the following fields:<br>
348
- * - alternateFqdns/value<br>
349
- * - alternateIps/ipv4/value
350
- * @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.
351
- - alternateFqdns
352
- - alternateFqdns/value
353
- - alternateIps
354
- - alternateIps/ipv4/value
355
- * @param {Object} args Additional Arguments
356
- * @return {Promise<ListCertificatesApiResponse>} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link ListCertificatesApiResponse } and HTTP response
357
- */
358
- }, {
359
- key: "listCertificatesByObjectstoreId",
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. &#x60;state&#x60; string (State of the Object store) Enum for the state of the Object store. | Enum | Description | | ----------- | ----------- | | &#x60;\&quot;DEPLOYING_OBJECT_STORE\&quot;&#x60; | 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. | | &#x60;\&quot;OBJECT_STORE_OPERATION_FAILED\&quot;&#x60; | 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. | | &#x60;\&quot;OBJECT_STORE_CERT_CREATION_FAILED\&quot;&#x60; | 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. | | &#x60;\&quot;OBJECT_STORE_OPERATION_PENDING\&quot;&#x60; | 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. | | &#x60;\&quot;UNDEPLOYED_OBJECT_STORE\&quot;&#x60; | The Object store is in this state if it has not been deployed. | | &#x60;\&quot;CREATING_OBJECT_STORE_CERT\&quot;&#x60; | 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. | | &#x60;\&quot;OBJECT_STORE_AVAILABLE\&quot;&#x60; | 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. | | &#x60;\&quot;OBJECT_STORE_DELETION_FAILED\&quot;&#x60; | 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. | | &#x60;\&quot;OBJECT_STORE_DEPLOYMENT_FAILED\&quot;&#x60; | 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. | | &#x60;\&quot;DELETING_OBJECT_STORE\&quot;&#x60; | 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
- var pathParams = {
370
- 'objectStoreExtId': objectStoreExtId
371
- };
372
- var queryParams = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, opts.hasOwnProperty('$page') ? {
315
+ });
316
+ const headerParams = {
317
+ ...headersToInclude
318
+ };
319
+ const formParams = {};
320
+ const authNames = ['apiKeyAuthScheme', '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
- } : {}), opts.hasOwnProperty('$limit') ? {
354
+ } : {}),
355
+ ...(opts.hasOwnProperty('$limit') ? {
375
356
  '$limit': opts['$limit']
376
- } : {}), opts.hasOwnProperty('$filter') ? {
357
+ } : {}),
358
+ ...(opts.hasOwnProperty('$filter') ? {
377
359
  '$filter': opts['$filter']
378
- } : {}), opts.hasOwnProperty('$select') ? {
360
+ } : {}),
361
+ ...(opts.hasOwnProperty('$select') ? {
379
362
  '$select': opts['$select']
380
- } : {});
381
- var headersToInclude = {};
382
- Object.keys(argMap).forEach(function (header) {
383
- if (!_classPrivateFieldGet(_headersToSkip, _this7).has(header.toLowerCase())) {
384
- headersToInclude[header] = argMap[header];
385
- }
386
- });
387
- var headerParams = _objectSpread({}, headersToInclude);
388
- var formParams = {};
389
- var authNames = ['basicAuthScheme'];
390
- var contentTypes = [];
391
- var accepts = ['application/json'];
392
- var returnType = _ListCertificatesApiResponse["default"];
393
- return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{objectStoreExtId}/certificates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
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 = ['apiKeyAuthScheme', '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
- * Get a list of the Object stores
398
- * Get a list of all the Object store details on the registered Prism Central.
399
- * @param {Object} opts Optional parameters defined for the operation
400
- * @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.
401
- * @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.
402
- * @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>
403
- * 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'.<br>
404
- * The filter can be applied to the following fields:<br>
405
- * - certificateExtIds<br>
406
- * - clusterExtId<br>
407
- * - creationTime<br>
408
- * - deploymentVersion<br>
409
- * - description<br>
410
- * - domain<br>
411
- * - lastUpdateTime<br>
412
- * - name<br>
413
- * - numWorkerNodes<br>
414
- * - publicNetworkIps/ipv4/value<br>
415
- * - publicNetworkIps/ipv6/value<br>
416
- * - publicNetworkReference<br>
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
- } : {}), opts.hasOwnProperty('$limit') ? {
404
+ } : {}),
405
+ ...(opts.hasOwnProperty('$limit') ? {
475
406
  '$limit': opts['$limit']
476
- } : {}), opts.hasOwnProperty('$filter') ? {
407
+ } : {}),
408
+ ...(opts.hasOwnProperty('$filter') ? {
477
409
  '$filter': opts['$filter']
478
- } : {}), opts.hasOwnProperty('$orderby') ? {
410
+ } : {}),
411
+ ...(opts.hasOwnProperty('$orderby') ? {
479
412
  '$orderby': opts['$orderby']
480
- } : {}), opts.hasOwnProperty('$expand') ? {
413
+ } : {}),
414
+ ...(opts.hasOwnProperty('$expand') ? {
481
415
  '$expand': opts['$expand']
482
- } : {}), opts.hasOwnProperty('$select') ? {
416
+ } : {}),
417
+ ...(opts.hasOwnProperty('$select') ? {
483
418
  '$select': opts['$select']
484
- } : {});
485
- var headersToInclude = {};
486
- Object.keys(argMap).forEach(function (header) {
487
- if (!_classPrivateFieldGet(_headersToSkip, _this8).has(header.toLowerCase())) {
488
- headersToInclude[header] = argMap[header];
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
- // verify the required parameter 'body' is set
524
- if (typeof postBody === 'undefined' || postBody === null) {
525
- throw new Error("Invalid body when calling updateObjectstoreById");
526
- }
527
- var pathParams = {
528
- 'extId': extId
529
- };
530
- var queryParams = {};
531
- var headersToInclude = {};
532
- Object.keys(argMap).forEach(function (header) {
533
- if (!_classPrivateFieldGet(_headersToSkip, _this9).has(header.toLowerCase())) {
534
- headersToInclude[header] = argMap[header];
535
- }
536
- });
537
- var headerParams = _objectSpread({}, headersToInclude);
538
- var formParams = {};
539
- _ApiClient.ApiClient.addEtagReferenceToHeader(body, headerParams);
540
- var authNames = ['basicAuthScheme'];
541
- var contentTypes = ['application/json'];
542
- var accepts = ['application/json'];
543
- var returnType = _UpdateObjectstoreApiResponse["default"];
544
- return this.apiClient.callApi('/api/objects/v4.0/config/object-stores/{extId}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType);
426
+ });
427
+ const headerParams = {
428
+ ...headersToInclude
429
+ };
430
+ const formParams = {};
431
+ const authNames = ['apiKeyAuthScheme', '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
- key: "ApiClient",
548
- get:
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 = ['apiKeyAuthScheme', '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;