@nutanix-scratch/objects-js-client 4.0.1-alpha.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/LICENSE.txt +49 -0
- package/README.md +200 -0
- package/dist/Ntnx-Objects-js-client-prod.js +1 -0
- package/dist/Ntnx-Objects-js-client.js +729 -0
- package/dist/es/ApiClient.d.ts +159 -0
- package/dist/es/ApiClient.js +1211 -0
- package/dist/es/Paginable.d.ts +95 -0
- package/dist/es/Paginable.js +287 -0
- package/dist/es/apis/objectstores-endpoints.d.ts +231 -0
- package/dist/es/apis/objectstores-endpoints.js +522 -0
- package/dist/es/index.d.ts +64 -0
- package/dist/es/index.js +252 -0
- package/dist/es/models/common/v1/config/FQDN.d.ts +48 -0
- package/dist/es/models/common/v1/config/FQDN.js +242 -0
- package/dist/es/models/common/v1/config/Flag.d.ts +58 -0
- package/dist/es/models/common/v1/config/Flag.js +275 -0
- package/dist/es/models/common/v1/config/IPAddress.d.ts +61 -0
- package/dist/es/models/common/v1/config/IPAddress.js +291 -0
- package/dist/es/models/common/v1/config/IPv4Address.d.ts +62 -0
- package/dist/es/models/common/v1/config/IPv4Address.js +288 -0
- package/dist/es/models/common/v1/config/IPv6Address.d.ts +62 -0
- package/dist/es/models/common/v1/config/IPv6Address.js +288 -0
- package/dist/es/models/common/v1/config/KVPair.d.ts +62 -0
- package/dist/es/models/common/v1/config/KVPair.js +332 -0
- package/dist/es/models/common/v1/config/Message.d.ts +84 -0
- package/dist/es/models/common/v1/config/Message.js +354 -0
- package/dist/es/models/common/v1/config/MessageSeverity.d.ts +19 -0
- package/dist/es/models/common/v1/config/MessageSeverity.js +91 -0
- package/dist/es/models/common/v1/config/Metadata.d.ts +98 -0
- package/dist/es/models/common/v1/config/Metadata.js +411 -0
- package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +50 -0
- package/dist/es/models/common/v1/config/TenantAwareModel.js +243 -0
- package/dist/es/models/common/v1/response/ApiLink.d.ts +62 -0
- package/dist/es/models/common/v1/response/ApiLink.js +280 -0
- package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +98 -0
- package/dist/es/models/common/v1/response/ApiResponseMetadata.js +438 -0
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +42 -0
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +270 -0
- package/dist/es/models/objects/v4/error/AppMessage.d.ts +108 -0
- package/dist/es/models/objects/v4/error/AppMessage.js +432 -0
- package/dist/es/models/objects/v4/error/ErrorResponse.d.ts +48 -0
- package/dist/es/models/objects/v4/error/ErrorResponse.js +288 -0
- package/dist/es/models/objects/v4/error/SchemaValidationError.d.ts +98 -0
- package/dist/es/models/objects/v4/error/SchemaValidationError.js +407 -0
- package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +74 -0
- package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.js +318 -0
- package/dist/es/models/objects/v4/operations/Certificate.d.ts +78 -0
- package/dist/es/models/objects/v4/operations/Certificate.js +411 -0
- package/dist/es/models/objects/v4/operations/CertificateApiResponse.d.ts +59 -0
- package/dist/es/models/objects/v4/operations/CertificateApiResponse.js +311 -0
- package/dist/es/models/objects/v4/operations/CertificateListApiResponse.d.ts +59 -0
- package/dist/es/models/objects/v4/operations/CertificateListApiResponse.js +338 -0
- package/dist/es/models/objects/v4/operations/CertificateProjection.d.ts +9 -0
- package/dist/es/models/objects/v4/operations/CertificateProjection.js +131 -0
- package/dist/es/models/objects/v4/operations/Objectstore.d.ts +242 -0
- package/dist/es/models/objects/v4/operations/Objectstore.js +945 -0
- package/dist/es/models/objects/v4/operations/ObjectstoreApiResponse.d.ts +59 -0
- package/dist/es/models/objects/v4/operations/ObjectstoreApiResponse.js +311 -0
- package/dist/es/models/objects/v4/operations/ObjectstoreListApiResponse.d.ts +59 -0
- package/dist/es/models/objects/v4/operations/ObjectstoreListApiResponse.js +338 -0
- package/dist/es/models/objects/v4/operations/ObjectstoreProjection.d.ts +50 -0
- package/dist/es/models/objects/v4/operations/ObjectstoreProjection.js +298 -0
- package/dist/es/models/objects/v4/operations/StateEnum.d.ts +19 -0
- package/dist/es/models/objects/v4/operations/StateEnum.js +145 -0
- package/dist/es/models/objects/v4/operations/TaskReferenceApiResponse.d.ts +59 -0
- package/dist/es/models/objects/v4/operations/TaskReferenceApiResponse.js +311 -0
- package/dist/es/models/prism/v4/config/TaskReference.d.ts +50 -0
- package/dist/es/models/prism/v4/config/TaskReference.js +247 -0
- package/dist/es/models/validation/ValidationError.d.ts +13 -0
- package/dist/es/models/validation/ValidationError.js +60 -0
- package/dist/es/models/validation/ValidationScopes.d.ts +9 -0
- package/dist/es/models/validation/ValidationScopes.js +38 -0
- package/dist/es/utils/ValidationUtils.d.ts +13 -0
- package/dist/es/utils/ValidationUtils.js +85 -0
- package/dist/lib/ApiClient.d.ts +159 -0
- package/dist/lib/ApiClient.js +1211 -0
- package/dist/lib/Paginable.d.ts +95 -0
- package/dist/lib/Paginable.js +287 -0
- package/dist/lib/apis/objectstores-endpoints.d.ts +231 -0
- package/dist/lib/apis/objectstores-endpoints.js +522 -0
- package/dist/lib/index.d.ts +64 -0
- package/dist/lib/index.js +252 -0
- package/dist/lib/models/common/v1/config/FQDN.d.ts +48 -0
- package/dist/lib/models/common/v1/config/FQDN.js +242 -0
- package/dist/lib/models/common/v1/config/Flag.d.ts +58 -0
- package/dist/lib/models/common/v1/config/Flag.js +275 -0
- package/dist/lib/models/common/v1/config/IPAddress.d.ts +61 -0
- package/dist/lib/models/common/v1/config/IPAddress.js +291 -0
- package/dist/lib/models/common/v1/config/IPv4Address.d.ts +62 -0
- package/dist/lib/models/common/v1/config/IPv4Address.js +288 -0
- package/dist/lib/models/common/v1/config/IPv6Address.d.ts +62 -0
- package/dist/lib/models/common/v1/config/IPv6Address.js +288 -0
- package/dist/lib/models/common/v1/config/KVPair.d.ts +62 -0
- package/dist/lib/models/common/v1/config/KVPair.js +332 -0
- package/dist/lib/models/common/v1/config/Message.d.ts +84 -0
- package/dist/lib/models/common/v1/config/Message.js +354 -0
- package/dist/lib/models/common/v1/config/MessageSeverity.d.ts +19 -0
- package/dist/lib/models/common/v1/config/MessageSeverity.js +91 -0
- package/dist/lib/models/common/v1/config/Metadata.d.ts +98 -0
- package/dist/lib/models/common/v1/config/Metadata.js +411 -0
- package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +50 -0
- package/dist/lib/models/common/v1/config/TenantAwareModel.js +243 -0
- package/dist/lib/models/common/v1/response/ApiLink.d.ts +62 -0
- package/dist/lib/models/common/v1/response/ApiLink.js +280 -0
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +98 -0
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +438 -0
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +42 -0
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +270 -0
- package/dist/lib/models/objects/v4/error/AppMessage.d.ts +108 -0
- package/dist/lib/models/objects/v4/error/AppMessage.js +432 -0
- package/dist/lib/models/objects/v4/error/ErrorResponse.d.ts +48 -0
- package/dist/lib/models/objects/v4/error/ErrorResponse.js +288 -0
- package/dist/lib/models/objects/v4/error/SchemaValidationError.d.ts +98 -0
- package/dist/lib/models/objects/v4/error/SchemaValidationError.js +407 -0
- package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +74 -0
- package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.js +318 -0
- package/dist/lib/models/objects/v4/operations/Certificate.d.ts +78 -0
- package/dist/lib/models/objects/v4/operations/Certificate.js +411 -0
- package/dist/lib/models/objects/v4/operations/CertificateApiResponse.d.ts +59 -0
- package/dist/lib/models/objects/v4/operations/CertificateApiResponse.js +311 -0
- package/dist/lib/models/objects/v4/operations/CertificateListApiResponse.d.ts +59 -0
- package/dist/lib/models/objects/v4/operations/CertificateListApiResponse.js +338 -0
- package/dist/lib/models/objects/v4/operations/CertificateProjection.d.ts +9 -0
- package/dist/lib/models/objects/v4/operations/CertificateProjection.js +131 -0
- package/dist/lib/models/objects/v4/operations/Objectstore.d.ts +242 -0
- package/dist/lib/models/objects/v4/operations/Objectstore.js +945 -0
- package/dist/lib/models/objects/v4/operations/ObjectstoreApiResponse.d.ts +59 -0
- package/dist/lib/models/objects/v4/operations/ObjectstoreApiResponse.js +311 -0
- package/dist/lib/models/objects/v4/operations/ObjectstoreListApiResponse.d.ts +59 -0
- package/dist/lib/models/objects/v4/operations/ObjectstoreListApiResponse.js +338 -0
- package/dist/lib/models/objects/v4/operations/ObjectstoreProjection.d.ts +50 -0
- package/dist/lib/models/objects/v4/operations/ObjectstoreProjection.js +298 -0
- package/dist/lib/models/objects/v4/operations/StateEnum.d.ts +19 -0
- package/dist/lib/models/objects/v4/operations/StateEnum.js +145 -0
- package/dist/lib/models/objects/v4/operations/TaskReferenceApiResponse.d.ts +59 -0
- package/dist/lib/models/objects/v4/operations/TaskReferenceApiResponse.js +311 -0
- package/dist/lib/models/prism/v4/config/TaskReference.d.ts +50 -0
- package/dist/lib/models/prism/v4/config/TaskReference.js +247 -0
- package/dist/lib/models/validation/ValidationError.d.ts +13 -0
- package/dist/lib/models/validation/ValidationError.js +60 -0
- package/dist/lib/models/validation/ValidationScopes.d.ts +9 -0
- package/dist/lib/models/validation/ValidationScopes.js +38 -0
- package/dist/lib/utils/ValidationUtils.d.ts +13 -0
- package/dist/lib/utils/ValidationUtils.js +85 -0
- package/package.json +53 -0
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
|
|
8
|
+
var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
|
|
9
|
+
var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
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); }
|
|
12
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
15
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
16
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
+
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; }
|
|
19
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
22
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
23
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
24
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
25
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
26
|
+
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
|
27
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } } /*
|
|
28
|
+
* Nutanix Objects Storage Management APIs
|
|
29
|
+
*
|
|
30
|
+
* OpenAPI spec version: 4.0.1-alpha-2
|
|
31
|
+
*
|
|
32
|
+
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
33
|
+
*
|
|
34
|
+
* Open API Dev Platform Codegen version: 16.8.0.7344-RELEASE
|
|
35
|
+
*
|
|
36
|
+
* Do not edit the class manually.
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* The SchemaValidationErrorMessage model module.
|
|
41
|
+
* @module Ntnx/SchemaValidationErrorMessage
|
|
42
|
+
* @version 4.0.1-alpha-2
|
|
43
|
+
* @class SchemaValidationErrorMessage
|
|
44
|
+
*/
|
|
45
|
+
var _SchemaValidationErrorMessage_brand = /*#__PURE__*/new WeakSet();
|
|
46
|
+
var SchemaValidationErrorMessage = exports["default"] = /*#__PURE__*/function () {
|
|
47
|
+
/**
|
|
48
|
+
* Constructs a new <code>SchemaValidationErrorMessage</code>.
|
|
49
|
+
* This schema is generated from SchemaValidationErrorMessage.java
|
|
50
|
+
* @alias module:Ntnx/SchemaValidationErrorMessage
|
|
51
|
+
*/
|
|
52
|
+
function SchemaValidationErrorMessage() {
|
|
53
|
+
_classCallCheck(this, SchemaValidationErrorMessage);
|
|
54
|
+
/*
|
|
55
|
+
* toJson method for a map type which supports map with primitive keys and values of object types
|
|
56
|
+
* @param {Object} obj
|
|
57
|
+
* @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
|
|
58
|
+
* Otherwise, just returns the input object.
|
|
59
|
+
*/
|
|
60
|
+
_classPrivateMethodInitSpec(this, _SchemaValidationErrorMessage_brand);
|
|
61
|
+
this.$objectType = "objects.v4.error.SchemaValidationErrorMessage";
|
|
62
|
+
this.$reserved = {
|
|
63
|
+
'$fv': "v4.r0.a2"
|
|
64
|
+
};
|
|
65
|
+
this.$unknownFields = {};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Constructs a <code>SchemaValidationErrorMessage</code> from a plain JavaScript object, optionally creating a new instance.
|
|
70
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
71
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
72
|
+
* @param {module:Ntnx/SchemaValidationErrorMessage} obj Optional instance to populate.
|
|
73
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
74
|
+
* @return {module:Ntnx/SchemaValidationErrorMessage} The populated <code>SchemaValidationErrorMessage</code> instance.
|
|
75
|
+
*/
|
|
76
|
+
return _createClass(SchemaValidationErrorMessage, [{
|
|
77
|
+
key: "getLocation",
|
|
78
|
+
value:
|
|
79
|
+
/**
|
|
80
|
+
* Returns The part of the request that failed validation. Validation can fail for path, query parameters, and request body.
|
|
81
|
+
* @return {}
|
|
82
|
+
*/
|
|
83
|
+
function getLocation() {
|
|
84
|
+
return this.location;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Sets The part of the request that failed validation. Validation can fail for path, query parameters, and request body.
|
|
89
|
+
* @param {} location The part of the request that failed validation. Validation can fail for path, query parameters, and request body.
|
|
90
|
+
*/
|
|
91
|
+
}, {
|
|
92
|
+
key: "setLocation",
|
|
93
|
+
value: function setLocation(location) {
|
|
94
|
+
this.location = location;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Returns The detailed message for the validation error.
|
|
99
|
+
* @return {}
|
|
100
|
+
*/
|
|
101
|
+
}, {
|
|
102
|
+
key: "getMessage",
|
|
103
|
+
value: function getMessage() {
|
|
104
|
+
return this.message;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Sets The detailed message for the validation error.
|
|
109
|
+
* @param {} message The detailed message for the validation error.
|
|
110
|
+
*/
|
|
111
|
+
}, {
|
|
112
|
+
key: "setMessage",
|
|
113
|
+
value: function setMessage(message) {
|
|
114
|
+
this.message = message;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Returns The path of the attribute that failed validation in the schema.
|
|
119
|
+
* @return {}
|
|
120
|
+
*/
|
|
121
|
+
}, {
|
|
122
|
+
key: "getAttributePath",
|
|
123
|
+
value: function getAttributePath() {
|
|
124
|
+
return this.attributePath;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Sets The path of the attribute that failed validation in the schema.
|
|
129
|
+
* @param {} attributePath The path of the attribute that failed validation in the schema.
|
|
130
|
+
*/
|
|
131
|
+
}, {
|
|
132
|
+
key: "setAttributePath",
|
|
133
|
+
value: function setAttributePath(attributePath) {
|
|
134
|
+
this.attributePath = attributePath;
|
|
135
|
+
}
|
|
136
|
+
}, {
|
|
137
|
+
key: "get$Reserved",
|
|
138
|
+
value: function get$Reserved() {
|
|
139
|
+
return this.$reserved;
|
|
140
|
+
}
|
|
141
|
+
}, {
|
|
142
|
+
key: "get$ObjectType",
|
|
143
|
+
value: function get$ObjectType() {
|
|
144
|
+
return this.$objectType;
|
|
145
|
+
}
|
|
146
|
+
}, {
|
|
147
|
+
key: "get$UnknownFields",
|
|
148
|
+
value: function get$UnknownFields() {
|
|
149
|
+
return this.$unknownFields;
|
|
150
|
+
}
|
|
151
|
+
}, {
|
|
152
|
+
key: "toJson",
|
|
153
|
+
value: function toJson(forMutation) {
|
|
154
|
+
if (forMutation === false) {
|
|
155
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getLocation() !== 'undefined' && this.getLocation() !== null ? {
|
|
156
|
+
'location': this.getLocation()
|
|
157
|
+
} : {}), typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {
|
|
158
|
+
'message': this.getMessage()
|
|
159
|
+
} : {}), typeof this.getAttributePath() !== 'undefined' && this.getAttributePath() !== null ? {
|
|
160
|
+
'attributePath': this.getAttributePath()
|
|
161
|
+
} : {}), {}, {
|
|
162
|
+
'$reserved': this.get$Reserved(),
|
|
163
|
+
'$objectType': this.get$ObjectType(),
|
|
164
|
+
'$unknownFields': this.get$UnknownFields()
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getLocation() !== 'undefined' && this.getLocation() !== null ? {
|
|
168
|
+
'location': this.getLocation()
|
|
169
|
+
} : {}), typeof this.getMessage() !== 'undefined' && this.getMessage() !== null ? {
|
|
170
|
+
'message': this.getMessage()
|
|
171
|
+
} : {}), typeof this.getAttributePath() !== 'undefined' && this.getAttributePath() !== null ? {
|
|
172
|
+
'attributePath': this.getAttributePath()
|
|
173
|
+
} : {}), {}, {
|
|
174
|
+
'$reserved': this.get$Reserved(),
|
|
175
|
+
'$objectType': this.get$ObjectType(),
|
|
176
|
+
'$unknownFields': this.get$UnknownFields()
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}, {
|
|
180
|
+
key: "validate",
|
|
181
|
+
value: function validate(scope, properties) {
|
|
182
|
+
var _this = this;
|
|
183
|
+
var propList = [];
|
|
184
|
+
if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes["default"]) {
|
|
185
|
+
//cases validate() and validate(scope)
|
|
186
|
+
propList = [];
|
|
187
|
+
} else if (arguments.length === 1) {
|
|
188
|
+
//case validate(properties)
|
|
189
|
+
propList = arguments[0];
|
|
190
|
+
scope = null;
|
|
191
|
+
} else {
|
|
192
|
+
//case validate(scope, properties)
|
|
193
|
+
propList = arguments[1];
|
|
194
|
+
}
|
|
195
|
+
var res = [];
|
|
196
|
+
var err = null;
|
|
197
|
+
propList.forEach(function (property) {
|
|
198
|
+
err = _this.validateProperty(property, scope);
|
|
199
|
+
if (err) {
|
|
200
|
+
res.push(err);
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
return new Promise(function (resolve, reject) {
|
|
204
|
+
if (res.length !== 0) {
|
|
205
|
+
reject(err);
|
|
206
|
+
} else {
|
|
207
|
+
resolve();
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}, {
|
|
212
|
+
key: "validateProperty",
|
|
213
|
+
value: function validateProperty(scope, property) {
|
|
214
|
+
if (property === "location") {
|
|
215
|
+
if (typeof this.location === 'undefined' || this.location === null) {
|
|
216
|
+
return new _ValidationError["default"]("location", "undefined or null");
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
if (property === "message") {
|
|
220
|
+
if (typeof this.message === 'undefined' || this.message === null) {
|
|
221
|
+
return new _ValidationError["default"]("message", "undefined or null");
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
if (property === "attributePath") {
|
|
225
|
+
if (typeof this.attributePath === 'undefined' || this.attributePath === null) {
|
|
226
|
+
return new _ValidationError["default"]("attributePath", "undefined or null");
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if (property === "$reserved") {
|
|
230
|
+
if (typeof this.$reserved === 'undefined' || this.$reserved === null) {
|
|
231
|
+
return new _ValidationError["default"]("$reserved", "undefined or null");
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
if (property === "$objectType") {
|
|
235
|
+
if (typeof this.$objectType === 'undefined' || this.$objectType === null) {
|
|
236
|
+
return new _ValidationError["default"]("$objectType", "undefined or null");
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
if (property === "$unknownFields") {
|
|
240
|
+
if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {
|
|
241
|
+
return new _ValidationError["default"]("$unknownFields", "undefined or null");
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return new _ValidationError["default"](property, "no such property exists");
|
|
245
|
+
}
|
|
246
|
+
}], [{
|
|
247
|
+
key: "constructFromObject",
|
|
248
|
+
value: function constructFromObject(data, obj) {
|
|
249
|
+
var callFromChild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
250
|
+
var items, item, i, itemArr, discriminator;
|
|
251
|
+
if (data) {
|
|
252
|
+
obj = obj || new SchemaValidationErrorMessage();
|
|
253
|
+
if (data.hasOwnProperty('location') && data.location !== null && data.location !== undefined) {
|
|
254
|
+
obj.setLocation(data['location']);
|
|
255
|
+
}
|
|
256
|
+
if (data.hasOwnProperty('message') && data.message !== null && data.message !== undefined) {
|
|
257
|
+
obj.setMessage(data['message']);
|
|
258
|
+
}
|
|
259
|
+
if (data.hasOwnProperty('attributePath') && data.attributePath !== null && data.attributePath !== undefined) {
|
|
260
|
+
obj.setAttributePath(data['attributePath']);
|
|
261
|
+
}
|
|
262
|
+
if (data.hasOwnProperty('$reserved')) {
|
|
263
|
+
obj.$reserved = data['$reserved'];
|
|
264
|
+
}
|
|
265
|
+
if (data.hasOwnProperty('$objectType')) {
|
|
266
|
+
obj.$objectType = data['$objectType'];
|
|
267
|
+
}
|
|
268
|
+
if (data.hasOwnProperty('$unknownFields')) {
|
|
269
|
+
obj.$unknownFields = data['$unknownFields'];
|
|
270
|
+
}
|
|
271
|
+
if (!callFromChild) {
|
|
272
|
+
obj.$unknownFields = _objectSpread({}, data.$unknownFields);
|
|
273
|
+
for (var property in data) {
|
|
274
|
+
if (!Object.keys(obj).includes(property) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
|
|
275
|
+
obj.$unknownFields[property] = data[property];
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return obj;
|
|
281
|
+
}
|
|
282
|
+
}]);
|
|
283
|
+
}();
|
|
284
|
+
/**
|
|
285
|
+
* The part of the request that failed validation. Validation can fail for path, query parameters, and request body.
|
|
286
|
+
* @memberof SchemaValidationErrorMessage
|
|
287
|
+
*/
|
|
288
|
+
function _toJsonMapType(obj, forMutation) {
|
|
289
|
+
if (obj instanceof Map) {
|
|
290
|
+
return Object.fromEntries(Array.from(obj, function (_ref) {
|
|
291
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
292
|
+
k = _ref2[0],
|
|
293
|
+
v = _ref2[1];
|
|
294
|
+
return [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v];
|
|
295
|
+
}));
|
|
296
|
+
} else if (_typeof(obj) === 'object' && obj != null && obj.constructor === Object) {
|
|
297
|
+
return Object.fromEntries(Array.from(Object.entries(obj), function (entry) {
|
|
298
|
+
return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
|
|
299
|
+
}));
|
|
300
|
+
}
|
|
301
|
+
return obj;
|
|
302
|
+
}
|
|
303
|
+
SchemaValidationErrorMessage.prototype.location = undefined;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* The detailed message for the validation error.
|
|
307
|
+
* @memberof SchemaValidationErrorMessage
|
|
308
|
+
*/
|
|
309
|
+
SchemaValidationErrorMessage.prototype.message = undefined;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* The path of the attribute that failed validation in the schema.
|
|
313
|
+
* @memberof SchemaValidationErrorMessage
|
|
314
|
+
*/
|
|
315
|
+
SchemaValidationErrorMessage.prototype.attributePath = undefined;
|
|
316
|
+
SchemaValidationErrorMessage.prototype.$reserved = undefined;
|
|
317
|
+
SchemaValidationErrorMessage.prototype.$objectType = undefined;
|
|
318
|
+
SchemaValidationErrorMessage.prototype.$unknownFields = undefined;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Certificate model module.
|
|
3
|
+
* @module Ntnx/Certificate
|
|
4
|
+
* @version 4.0.1-alpha-2
|
|
5
|
+
* @class Certificate
|
|
6
|
+
*/
|
|
7
|
+
export default class Certificate extends ExternalizableAbstractModel {
|
|
8
|
+
/**
|
|
9
|
+
* @return {}
|
|
10
|
+
*/
|
|
11
|
+
getMetadata(): any;
|
|
12
|
+
/**
|
|
13
|
+
* @param {} metadata
|
|
14
|
+
*/
|
|
15
|
+
setMetadata(metadata: any): void;
|
|
16
|
+
metadata: any;
|
|
17
|
+
/**
|
|
18
|
+
* Returns The public certificate to upload.
|
|
19
|
+
* @return {}
|
|
20
|
+
*/
|
|
21
|
+
getPublicCert(): any;
|
|
22
|
+
/**
|
|
23
|
+
* Sets The public certificate to upload.
|
|
24
|
+
* @param {} publicCert The public certificate to upload.
|
|
25
|
+
*/
|
|
26
|
+
setPublicCert(publicCert: any): void;
|
|
27
|
+
publicCert: any;
|
|
28
|
+
/**
|
|
29
|
+
* Returns The private key to upload.
|
|
30
|
+
* @return {}
|
|
31
|
+
*/
|
|
32
|
+
getPrivateKey(): any;
|
|
33
|
+
/**
|
|
34
|
+
* Sets The private key to upload.
|
|
35
|
+
* @param {} privateKey The private key to upload.
|
|
36
|
+
*/
|
|
37
|
+
setPrivateKey(privateKey: any): void;
|
|
38
|
+
privateKey: any;
|
|
39
|
+
/**
|
|
40
|
+
* Returns CA file to upload.
|
|
41
|
+
* @return {}
|
|
42
|
+
*/
|
|
43
|
+
getCa(): any;
|
|
44
|
+
/**
|
|
45
|
+
* Sets CA file to upload.
|
|
46
|
+
* @param {} ca CA file to upload.
|
|
47
|
+
*/
|
|
48
|
+
setCa(ca: any): void;
|
|
49
|
+
ca: any;
|
|
50
|
+
/**
|
|
51
|
+
* Returns The list of alternate FQDNs for accessing the Object store. The FQDNs must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens or underscores but must begin and end with a letter. Each part can be up to 63 characters long. For e.g 'objects-0.pc_nutanix.com'.
|
|
52
|
+
* @return {}
|
|
53
|
+
*/
|
|
54
|
+
getAlternateFqdns(): any;
|
|
55
|
+
/**
|
|
56
|
+
* Sets The list of alternate FQDNs for accessing the Object store. The FQDNs must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens or underscores but must begin and end with a letter. Each part can be up to 63 characters long. For e.g 'objects-0.pc_nutanix.com'.
|
|
57
|
+
* @param {} alternateFqdns The list of alternate FQDNs for accessing the Object store. The FQDNs must consist of at least 2 parts separated by a '.'. Each part can contain upper and lower case letters, digits, hyphens or underscores but must begin and end with a letter. Each part can be up to 63 characters long. For e.g 'objects-0.pc_nutanix.com'.
|
|
58
|
+
*/
|
|
59
|
+
setAlternateFqdns(alternateFqdns: any): void;
|
|
60
|
+
alternateFqdns: any;
|
|
61
|
+
toJson(forMutation: any): {
|
|
62
|
+
$reserved: {
|
|
63
|
+
$fv: string;
|
|
64
|
+
};
|
|
65
|
+
$objectType: string;
|
|
66
|
+
$unknownFields: {};
|
|
67
|
+
tenantId?: any;
|
|
68
|
+
links?: any;
|
|
69
|
+
extId?: any;
|
|
70
|
+
alternateFqdns?: any;
|
|
71
|
+
ca?: any;
|
|
72
|
+
privateKey?: any;
|
|
73
|
+
publicCert?: any;
|
|
74
|
+
metadata?: any;
|
|
75
|
+
};
|
|
76
|
+
#private;
|
|
77
|
+
}
|
|
78
|
+
import ExternalizableAbstractModel from "../../../common/v1/response/ExternalizableAbstractModel";
|