@nutanix-scratch/multidomain-js-client 4.2.1
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 +202 -0
- package/README.md +224 -0
- package/dist/Ntnx-Multidomain-js-client-prod.js +1 -0
- package/dist/Ntnx-Multidomain-js-client.js +713 -0
- package/dist/es/ApiClient.d.ts +194 -0
- package/dist/es/ApiClient.js +1449 -0
- package/dist/es/Paginable.d.ts +95 -0
- package/dist/es/Paginable.js +248 -0
- package/dist/es/apis/externalrepositories-endpoints.d.ts +84 -0
- package/dist/es/apis/externalrepositories-endpoints.js +267 -0
- package/dist/es/index.d.ts +60 -0
- package/dist/es/index.js +236 -0
- package/dist/es/models/common/v1/config/FQDN.d.ts +47 -0
- package/dist/es/models/common/v1/config/FQDN.js +238 -0
- package/dist/es/models/common/v1/config/Flag.d.ts +58 -0
- package/dist/es/models/common/v1/config/Flag.js +278 -0
- package/dist/es/models/common/v1/config/IPAddressOrFQDN.d.ts +70 -0
- package/dist/es/models/common/v1/config/IPAddressOrFQDN.js +313 -0
- package/dist/es/models/common/v1/config/IPv4Address.d.ts +70 -0
- package/dist/es/models/common/v1/config/IPv4Address.js +288 -0
- package/dist/es/models/common/v1/config/IPv6Address.d.ts +70 -0
- package/dist/es/models/common/v1/config/IPv6Address.js +288 -0
- package/dist/es/models/common/v1/config/KVPair.d.ts +65 -0
- package/dist/es/models/common/v1/config/KVPair.js +333 -0
- package/dist/es/models/common/v1/config/MapOfStringWrapper.d.ts +53 -0
- package/dist/es/models/common/v1/config/MapOfStringWrapper.js +236 -0
- package/dist/es/models/common/v1/config/Message.d.ts +79 -0
- package/dist/es/models/common/v1/config/Message.js +341 -0
- package/dist/es/models/common/v1/config/MessageSeverity.d.ts +19 -0
- package/dist/es/models/common/v1/config/MessageSeverity.js +89 -0
- package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +47 -0
- package/dist/es/models/common/v1/config/TenantAwareModel.js +235 -0
- package/dist/es/models/common/v1/response/ApiLink.d.ts +58 -0
- package/dist/es/models/common/v1/response/ApiLink.js +271 -0
- package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +95 -0
- package/dist/es/models/common/v1/response/ApiResponseMetadata.js +419 -0
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +34 -0
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +262 -0
- package/dist/es/models/multidomain/v4/config/CreateExternalRepositoryApiResponse.d.ts +58 -0
- package/dist/es/models/multidomain/v4/config/CreateExternalRepositoryApiResponse.js +288 -0
- package/dist/es/models/multidomain/v4/config/DeleteExternalRepositoryApiResponse.d.ts +58 -0
- package/dist/es/models/multidomain/v4/config/DeleteExternalRepositoryApiResponse.js +288 -0
- package/dist/es/models/multidomain/v4/config/ExternalRepository.d.ts +59 -0
- package/dist/es/models/multidomain/v4/config/ExternalRepository.js +328 -0
- package/dist/es/models/multidomain/v4/config/GetExternalRepositoryApiResponse.d.ts +58 -0
- package/dist/es/models/multidomain/v4/config/GetExternalRepositoryApiResponse.js +288 -0
- package/dist/es/models/multidomain/v4/config/ListExternalRepositoriesApiResponse.d.ts +58 -0
- package/dist/es/models/multidomain/v4/config/ListExternalRepositoriesApiResponse.js +310 -0
- package/dist/es/models/multidomain/v4/config/NFSServerAddress.d.ts +71 -0
- package/dist/es/models/multidomain/v4/config/NFSServerAddress.js +279 -0
- package/dist/es/models/multidomain/v4/config/NfsRepository.d.ts +73 -0
- package/dist/es/models/multidomain/v4/config/NfsRepository.js +299 -0
- package/dist/es/models/multidomain/v4/config/UpdateExternalRepositoryApiResponse.d.ts +58 -0
- package/dist/es/models/multidomain/v4/config/UpdateExternalRepositoryApiResponse.js +288 -0
- package/dist/es/models/multidomain/v4/error/AppMessage.d.ts +107 -0
- package/dist/es/models/multidomain/v4/error/AppMessage.js +415 -0
- package/dist/es/models/multidomain/v4/error/ErrorResponse.d.ts +47 -0
- package/dist/es/models/multidomain/v4/error/ErrorResponse.js +277 -0
- package/dist/es/models/multidomain/v4/error/SchemaValidationError.d.ts +92 -0
- package/dist/es/models/multidomain/v4/error/SchemaValidationError.js +389 -0
- package/dist/es/models/multidomain/v4/error/SchemaValidationErrorMessage.d.ts +69 -0
- package/dist/es/models/multidomain/v4/error/SchemaValidationErrorMessage.js +307 -0
- package/dist/es/models/prism/v4/config/TaskReference.d.ts +47 -0
- package/dist/es/models/prism/v4/config/TaskReference.js +242 -0
- package/dist/es/models/validation/ValidationError.d.ts +13 -0
- package/dist/es/models/validation/ValidationError.js +44 -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 +55 -0
- package/dist/lib/ApiClient.d.ts +194 -0
- package/dist/lib/ApiClient.js +1449 -0
- package/dist/lib/Paginable.d.ts +95 -0
- package/dist/lib/Paginable.js +248 -0
- package/dist/lib/apis/externalrepositories-endpoints.d.ts +84 -0
- package/dist/lib/apis/externalrepositories-endpoints.js +267 -0
- package/dist/lib/index.d.ts +60 -0
- package/dist/lib/index.js +236 -0
- package/dist/lib/models/common/v1/config/FQDN.d.ts +47 -0
- package/dist/lib/models/common/v1/config/FQDN.js +238 -0
- package/dist/lib/models/common/v1/config/Flag.d.ts +58 -0
- package/dist/lib/models/common/v1/config/Flag.js +278 -0
- package/dist/lib/models/common/v1/config/IPAddressOrFQDN.d.ts +70 -0
- package/dist/lib/models/common/v1/config/IPAddressOrFQDN.js +313 -0
- package/dist/lib/models/common/v1/config/IPv4Address.d.ts +70 -0
- package/dist/lib/models/common/v1/config/IPv4Address.js +288 -0
- package/dist/lib/models/common/v1/config/IPv6Address.d.ts +70 -0
- package/dist/lib/models/common/v1/config/IPv6Address.js +288 -0
- package/dist/lib/models/common/v1/config/KVPair.d.ts +65 -0
- package/dist/lib/models/common/v1/config/KVPair.js +333 -0
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.d.ts +53 -0
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.js +236 -0
- package/dist/lib/models/common/v1/config/Message.d.ts +79 -0
- package/dist/lib/models/common/v1/config/Message.js +341 -0
- package/dist/lib/models/common/v1/config/MessageSeverity.d.ts +19 -0
- package/dist/lib/models/common/v1/config/MessageSeverity.js +89 -0
- package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +47 -0
- package/dist/lib/models/common/v1/config/TenantAwareModel.js +235 -0
- package/dist/lib/models/common/v1/response/ApiLink.d.ts +58 -0
- package/dist/lib/models/common/v1/response/ApiLink.js +271 -0
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +95 -0
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +419 -0
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +34 -0
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +262 -0
- package/dist/lib/models/multidomain/v4/config/CreateExternalRepositoryApiResponse.d.ts +58 -0
- package/dist/lib/models/multidomain/v4/config/CreateExternalRepositoryApiResponse.js +288 -0
- package/dist/lib/models/multidomain/v4/config/DeleteExternalRepositoryApiResponse.d.ts +58 -0
- package/dist/lib/models/multidomain/v4/config/DeleteExternalRepositoryApiResponse.js +288 -0
- package/dist/lib/models/multidomain/v4/config/ExternalRepository.d.ts +59 -0
- package/dist/lib/models/multidomain/v4/config/ExternalRepository.js +328 -0
- package/dist/lib/models/multidomain/v4/config/GetExternalRepositoryApiResponse.d.ts +58 -0
- package/dist/lib/models/multidomain/v4/config/GetExternalRepositoryApiResponse.js +288 -0
- package/dist/lib/models/multidomain/v4/config/ListExternalRepositoriesApiResponse.d.ts +58 -0
- package/dist/lib/models/multidomain/v4/config/ListExternalRepositoriesApiResponse.js +310 -0
- package/dist/lib/models/multidomain/v4/config/NFSServerAddress.d.ts +71 -0
- package/dist/lib/models/multidomain/v4/config/NFSServerAddress.js +279 -0
- package/dist/lib/models/multidomain/v4/config/NfsRepository.d.ts +73 -0
- package/dist/lib/models/multidomain/v4/config/NfsRepository.js +299 -0
- package/dist/lib/models/multidomain/v4/config/UpdateExternalRepositoryApiResponse.d.ts +58 -0
- package/dist/lib/models/multidomain/v4/config/UpdateExternalRepositoryApiResponse.js +288 -0
- package/dist/lib/models/multidomain/v4/error/AppMessage.d.ts +107 -0
- package/dist/lib/models/multidomain/v4/error/AppMessage.js +415 -0
- package/dist/lib/models/multidomain/v4/error/ErrorResponse.d.ts +47 -0
- package/dist/lib/models/multidomain/v4/error/ErrorResponse.js +277 -0
- package/dist/lib/models/multidomain/v4/error/SchemaValidationError.d.ts +92 -0
- package/dist/lib/models/multidomain/v4/error/SchemaValidationError.js +389 -0
- package/dist/lib/models/multidomain/v4/error/SchemaValidationErrorMessage.d.ts +69 -0
- package/dist/lib/models/multidomain/v4/error/SchemaValidationErrorMessage.js +307 -0
- package/dist/lib/models/prism/v4/config/TaskReference.d.ts +47 -0
- package/dist/lib/models/prism/v4/config/TaskReference.js +242 -0
- package/dist/lib/models/validation/ValidationError.d.ts +13 -0
- package/dist/lib/models/validation/ValidationError.js +44 -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 +55 -0
- package/package.json +53 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _ApiResponseMetadata = _interopRequireDefault(require("../../../common/v1/response/ApiResponseMetadata"));
|
|
8
|
+
var _ExternalRepository = _interopRequireDefault(require("./ExternalRepository"));
|
|
9
|
+
var _ErrorResponse = _interopRequireDefault(require("../error/ErrorResponse"));
|
|
10
|
+
var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
|
|
11
|
+
var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
|
|
12
|
+
var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
|
|
13
|
+
var _Paginable = _interopRequireDefault(require("../../../../Paginable"));
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
|
16
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
17
|
+
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
|
+
* Nutanix Multidomain Versioned APIs
|
|
19
|
+
*
|
|
20
|
+
* OpenAPI spec version: 4.2.1
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
23
|
+
*
|
|
24
|
+
* Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE
|
|
25
|
+
*
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The ListExternalRepositoriesApiResponse model module.
|
|
31
|
+
* @module Ntnx/ListExternalRepositoriesApiResponse
|
|
32
|
+
* @version 4.2.1
|
|
33
|
+
* @class ListExternalRepositoriesApiResponse
|
|
34
|
+
*/
|
|
35
|
+
var _ListExternalRepositoriesApiResponse_brand = /*#__PURE__*/new WeakSet();
|
|
36
|
+
class ListExternalRepositoriesApiResponse extends _Paginable.default {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>ListExternalRepositoriesApiResponse</code>.
|
|
39
|
+
* REST response for all response codes in API path /multidomain/v4.2/config/external-repositories Get operation
|
|
40
|
+
* @alias module:Ntnx/ListExternalRepositoriesApiResponse
|
|
41
|
+
*/
|
|
42
|
+
constructor() {
|
|
43
|
+
super();
|
|
44
|
+
/*
|
|
45
|
+
* toJson method for a map type which supports map with primitive keys and values of object types
|
|
46
|
+
* @param {Object} obj
|
|
47
|
+
* @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
|
|
48
|
+
* Otherwise, just returns the input object.
|
|
49
|
+
*/
|
|
50
|
+
_classPrivateMethodInitSpec(this, _ListExternalRepositoriesApiResponse_brand);
|
|
51
|
+
this.$objectType = "multidomain.v4.config.ListExternalRepositoriesApiResponse";
|
|
52
|
+
/** @type {object<string, any>} */
|
|
53
|
+
this.$reserved = {
|
|
54
|
+
'$fv': "v4.r2"
|
|
55
|
+
};
|
|
56
|
+
/** @type {object<string, any>} */
|
|
57
|
+
this.$unknownFields = {};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Constructs a <code>ListExternalRepositoriesApiResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
62
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
63
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
64
|
+
* @param {module:Ntnx/ListExternalRepositoriesApiResponse} obj Optional instance to populate.
|
|
65
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
66
|
+
* @return {module:Ntnx/ListExternalRepositoriesApiResponse} The populated <code>ListExternalRepositoriesApiResponse</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
static constructFromObject(data, obj = null, callFromChild = false) {
|
|
69
|
+
let items, item, i, itemArr, discriminator;
|
|
70
|
+
if (data) {
|
|
71
|
+
obj = obj || new ListExternalRepositoriesApiResponse();
|
|
72
|
+
if (data.hasOwnProperty('metadata')) {
|
|
73
|
+
_Paginable.default.constructFromObject(data['metadata'], obj);
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {
|
|
76
|
+
obj.setMetadata(_ApiResponseMetadata.default.constructFromObject(data['metadata']));
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {
|
|
79
|
+
if (Array.isArray(data['data'])) {
|
|
80
|
+
if (data['data'].length === 0) {
|
|
81
|
+
obj.setData([]);
|
|
82
|
+
} else {
|
|
83
|
+
itemArr = [];
|
|
84
|
+
items = data['data'];
|
|
85
|
+
if (items[0].hasOwnProperty('$objectType')) {
|
|
86
|
+
discriminator = items[0]['$objectType'];
|
|
87
|
+
} else {
|
|
88
|
+
discriminator = typeof items[0];
|
|
89
|
+
}
|
|
90
|
+
for (i = 0; i < items.length; i++) {
|
|
91
|
+
switch (discriminator) {
|
|
92
|
+
case 'multidomain.v4.config.ExternalRepository':
|
|
93
|
+
item = _ExternalRepository.default.constructFromObject(items[i], undefined);
|
|
94
|
+
itemArr.push(item);
|
|
95
|
+
break;
|
|
96
|
+
default:
|
|
97
|
+
throw "Unknown list of type " + discriminator + " in data";
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
obj.setData(itemArr);
|
|
101
|
+
}
|
|
102
|
+
} else {
|
|
103
|
+
if (data['data'].hasOwnProperty('$objectType')) {
|
|
104
|
+
discriminator = data['data']['$objectType'];
|
|
105
|
+
} else {
|
|
106
|
+
discriminator = typeof data['data'];
|
|
107
|
+
}
|
|
108
|
+
switch (discriminator) {
|
|
109
|
+
case 'multidomain.v4.error.ErrorResponse':
|
|
110
|
+
obj.setData(_ErrorResponse.default.constructFromObject(data['data'], undefined));
|
|
111
|
+
break;
|
|
112
|
+
default:
|
|
113
|
+
throw "Unknown datatype " + discriminator + " in data";
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (data.hasOwnProperty('$reserved')) {
|
|
118
|
+
obj.$reserved = data['$reserved'];
|
|
119
|
+
}
|
|
120
|
+
if (data.hasOwnProperty('$objectType')) {
|
|
121
|
+
obj.$objectType = data['$objectType'];
|
|
122
|
+
}
|
|
123
|
+
if (data.hasOwnProperty('$unknownFields')) {
|
|
124
|
+
obj.$unknownFields = data['$unknownFields'];
|
|
125
|
+
}
|
|
126
|
+
if (!callFromChild) {
|
|
127
|
+
obj.$unknownFields = {
|
|
128
|
+
...data.$unknownFields
|
|
129
|
+
};
|
|
130
|
+
for (const property in data) {
|
|
131
|
+
// Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,
|
|
132
|
+
// as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).
|
|
133
|
+
// Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.
|
|
134
|
+
// If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.
|
|
135
|
+
if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
|
|
136
|
+
obj.$unknownFields[property] = data[property];
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return obj;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Converts a given snake_case string to camelCase.
|
|
146
|
+
* @param {string} snakeStr - The input string in snake_case format.
|
|
147
|
+
* @returns {string} - The converted string in camelCase format.
|
|
148
|
+
*/
|
|
149
|
+
static snakeToCamel(snakeStr) {
|
|
150
|
+
return snakeStr.replace(/(_\w)/g, match => match[1].toUpperCase());
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @return {ApiResponseMetadata}
|
|
155
|
+
*/
|
|
156
|
+
getMetadata() {
|
|
157
|
+
return this.metadata;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @param {ApiResponseMetadata} metadata
|
|
162
|
+
*/
|
|
163
|
+
setMetadata(metadata) {
|
|
164
|
+
this.metadata = metadata;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @return {ExternalRepository[] | ErrorResponse}
|
|
169
|
+
*/
|
|
170
|
+
getData() {
|
|
171
|
+
return this.data;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @param {ExternalRepository[] | ErrorResponse} data
|
|
176
|
+
*/
|
|
177
|
+
setData(data) {
|
|
178
|
+
this.data = data;
|
|
179
|
+
}
|
|
180
|
+
get$Reserved() {
|
|
181
|
+
return this.$reserved;
|
|
182
|
+
}
|
|
183
|
+
get$ObjectType() {
|
|
184
|
+
return this.$objectType;
|
|
185
|
+
}
|
|
186
|
+
get$UnknownFields() {
|
|
187
|
+
return this.$unknownFields;
|
|
188
|
+
}
|
|
189
|
+
toJson(forMutation) {
|
|
190
|
+
if (forMutation === false) {
|
|
191
|
+
return {
|
|
192
|
+
...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {
|
|
193
|
+
'metadata': this.getMetadata().toJson(false)
|
|
194
|
+
} : {}),
|
|
195
|
+
...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {
|
|
196
|
+
'data': typeof this.getData().toJson !== "undefined" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== "undefined" ? item.toJson(false) : item) : _assertClassBrand(_ListExternalRepositoriesApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)
|
|
197
|
+
} : {}),
|
|
198
|
+
'$reserved': this.get$Reserved(),
|
|
199
|
+
'$objectType': this.get$ObjectType(),
|
|
200
|
+
...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),
|
|
201
|
+
'$unknownFields': {}
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
return {
|
|
205
|
+
...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {
|
|
206
|
+
'metadata': this.getMetadata().toJson(false)
|
|
207
|
+
} : {}),
|
|
208
|
+
...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {
|
|
209
|
+
'data': typeof this.getData().toJson !== "undefined" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== "undefined" ? item.toJson() : item) : _assertClassBrand(_ListExternalRepositoriesApiResponse_brand, this, _toJsonMapType).call(this, this.getData())
|
|
210
|
+
} : {}),
|
|
211
|
+
'$reserved': this.get$Reserved(),
|
|
212
|
+
'$objectType': this.get$ObjectType(),
|
|
213
|
+
...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),
|
|
214
|
+
'$unknownFields': {}
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
validate(scope, properties) {
|
|
218
|
+
let propList = [];
|
|
219
|
+
if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes.default) {
|
|
220
|
+
//cases validate() and validate(scope)
|
|
221
|
+
propList = [];
|
|
222
|
+
} else if (arguments.length === 1) {
|
|
223
|
+
//case validate(properties)
|
|
224
|
+
propList = arguments[0];
|
|
225
|
+
scope = null;
|
|
226
|
+
} else {
|
|
227
|
+
//case validate(scope, properties)
|
|
228
|
+
propList = arguments[1];
|
|
229
|
+
}
|
|
230
|
+
let res = [];
|
|
231
|
+
let err = null;
|
|
232
|
+
propList.forEach(property => {
|
|
233
|
+
err = this.validateProperty(property, scope);
|
|
234
|
+
if (err) {
|
|
235
|
+
res.push(err);
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
return new Promise(function (resolve, reject) {
|
|
239
|
+
if (res.length !== 0) {
|
|
240
|
+
reject(err);
|
|
241
|
+
} else {
|
|
242
|
+
resolve();
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
validateProperty(scope, property) {
|
|
247
|
+
if (property === "metadata") {
|
|
248
|
+
if (typeof this.metadata === 'undefined' || this.metadata === null) {
|
|
249
|
+
return new _ValidationError.default("metadata", "undefined or null");
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
if (property === "data") {
|
|
253
|
+
if (typeof this.data === 'undefined' || this.data === null) {
|
|
254
|
+
return new _ValidationError.default("data", "undefined or null");
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
if (property === "$reserved") {
|
|
258
|
+
if (typeof this.$reserved === 'undefined' || this.$reserved === null) {
|
|
259
|
+
return new _ValidationError.default("$reserved", "undefined or null");
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
if (property === "$objectType") {
|
|
263
|
+
if (typeof this.$objectType === 'undefined' || this.$objectType === null) {
|
|
264
|
+
return new _ValidationError.default("$objectType", "undefined or null");
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
if (property === "$unknownFields") {
|
|
268
|
+
if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {
|
|
269
|
+
return new _ValidationError.default("$unknownFields", "undefined or null");
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return new _ValidationError.default(property, "no such property exists");
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @memberof ListExternalRepositoriesApiResponse
|
|
278
|
+
*/
|
|
279
|
+
exports.default = ListExternalRepositoriesApiResponse;
|
|
280
|
+
function _toJsonMapType(obj, forMutation) {
|
|
281
|
+
if (obj instanceof Map) {
|
|
282
|
+
return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v]));
|
|
283
|
+
} else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {
|
|
284
|
+
return Object.fromEntries(Array.from(Object.entries(obj), entry => {
|
|
285
|
+
return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
|
|
286
|
+
}));
|
|
287
|
+
}
|
|
288
|
+
return obj;
|
|
289
|
+
}
|
|
290
|
+
/*
|
|
291
|
+
* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting
|
|
292
|
+
* @param {Object} obj Object to serialize
|
|
293
|
+
* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization
|
|
294
|
+
* @returns {Object|string} Returns serialized date object or original input object
|
|
295
|
+
*/
|
|
296
|
+
function _handleDateType(obj, isDateOnly) {
|
|
297
|
+
if (obj instanceof Date && isDateOnly !== undefined) {
|
|
298
|
+
return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();
|
|
299
|
+
}
|
|
300
|
+
return obj;
|
|
301
|
+
}
|
|
302
|
+
ListExternalRepositoriesApiResponse.prototype.metadata = undefined;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* @memberof ListExternalRepositoriesApiResponse
|
|
306
|
+
*/
|
|
307
|
+
ListExternalRepositoriesApiResponse.prototype.data = undefined;
|
|
308
|
+
ListExternalRepositoriesApiResponse.prototype.$reserved = undefined;
|
|
309
|
+
ListExternalRepositoriesApiResponse.prototype.$objectType = undefined;
|
|
310
|
+
ListExternalRepositoriesApiResponse.prototype.$unknownFields = undefined;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The NFSServerAddress model module.
|
|
3
|
+
* @module Ntnx/NFSServerAddress
|
|
4
|
+
* @version 4.2.1
|
|
5
|
+
* @class NFSServerAddress
|
|
6
|
+
*
|
|
7
|
+
* @param { IPAddressOrFQDN } address
|
|
8
|
+
*
|
|
9
|
+
* @param { Number } port Server port number.
|
|
10
|
+
*/
|
|
11
|
+
export default class NFSServerAddress {
|
|
12
|
+
/**
|
|
13
|
+
* Constructs a <code>NFSServerAddress</code> from a plain JavaScript object, optionally creating a new instance.
|
|
14
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
15
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
16
|
+
* @param {module:Ntnx/NFSServerAddress} obj Optional instance to populate.
|
|
17
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
18
|
+
* @return {module:Ntnx/NFSServerAddress} The populated <code>NFSServerAddress</code> instance.
|
|
19
|
+
*/
|
|
20
|
+
static constructFromObject(data: any, obj?: any, callFromChild?: boolean): any;
|
|
21
|
+
/**
|
|
22
|
+
* Converts a given snake_case string to camelCase.
|
|
23
|
+
* @param {string} snakeStr - The input string in snake_case format.
|
|
24
|
+
* @returns {string} - The converted string in camelCase format.
|
|
25
|
+
*/
|
|
26
|
+
static snakeToCamel(snakeStr: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* Constructs a new <code>NFSServerAddress</code>.
|
|
29
|
+
* NFS server address details in FQDN:Port Number format.
|
|
30
|
+
* @alias module:Ntnx/NFSServerAddress
|
|
31
|
+
*
|
|
32
|
+
* @param { IPAddressOrFQDN } address
|
|
33
|
+
*
|
|
34
|
+
* @param { Number } port Server port number.
|
|
35
|
+
*/
|
|
36
|
+
constructor(address: IPAddressOrFQDN, port: number);
|
|
37
|
+
address: IPAddressOrFQDN;
|
|
38
|
+
port: number;
|
|
39
|
+
$objectType: string;
|
|
40
|
+
/** @type {object<string, any>} */
|
|
41
|
+
$reserved: object;
|
|
42
|
+
/** @type {object<string, any>} */
|
|
43
|
+
$unknownFields: object;
|
|
44
|
+
/**
|
|
45
|
+
* @return {IPAddressOrFQDN}
|
|
46
|
+
*/
|
|
47
|
+
getAddress(): IPAddressOrFQDN;
|
|
48
|
+
/**
|
|
49
|
+
* @param {IPAddressOrFQDN} address
|
|
50
|
+
*/
|
|
51
|
+
setAddress(address: IPAddressOrFQDN): void;
|
|
52
|
+
/**
|
|
53
|
+
* Returns Server port number.
|
|
54
|
+
* @return {Number}
|
|
55
|
+
*/
|
|
56
|
+
getPort(): number;
|
|
57
|
+
/**
|
|
58
|
+
* Sets Server port number.
|
|
59
|
+
* @param {Number} port Server port number.
|
|
60
|
+
*/
|
|
61
|
+
setPort(port: number): void;
|
|
62
|
+
get$Reserved(): any;
|
|
63
|
+
get$ObjectType(): string;
|
|
64
|
+
get$UnknownFields(): any;
|
|
65
|
+
toJson(forMutation: any): any;
|
|
66
|
+
validate(scope: any, properties: any, ...args: any[]): Promise<any>;
|
|
67
|
+
validateProperty(scope: any, property: any): ValidationError;
|
|
68
|
+
#private;
|
|
69
|
+
}
|
|
70
|
+
import IPAddressOrFQDN from "../../../common/v1/config/IPAddressOrFQDN";
|
|
71
|
+
import ValidationError from "../../../validation/ValidationError";
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _IPAddressOrFQDN = _interopRequireDefault(require("../../../common/v1/config/IPAddressOrFQDN"));
|
|
8
|
+
var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
|
|
9
|
+
var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
|
|
10
|
+
var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
|
13
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } /*
|
|
14
|
+
* Nutanix Multidomain Versioned APIs
|
|
15
|
+
*
|
|
16
|
+
* OpenAPI spec version: 4.2.1
|
|
17
|
+
*
|
|
18
|
+
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
19
|
+
*
|
|
20
|
+
* Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE
|
|
21
|
+
*
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* The NFSServerAddress model module.
|
|
27
|
+
* @module Ntnx/NFSServerAddress
|
|
28
|
+
* @version 4.2.1
|
|
29
|
+
* @class NFSServerAddress
|
|
30
|
+
*
|
|
31
|
+
* @param { IPAddressOrFQDN } address
|
|
32
|
+
*
|
|
33
|
+
* @param { Number } port Server port number.
|
|
34
|
+
*/
|
|
35
|
+
var _NFSServerAddress_brand = /*#__PURE__*/new WeakSet();
|
|
36
|
+
class NFSServerAddress {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>NFSServerAddress</code>.
|
|
39
|
+
* NFS server address details in FQDN:Port Number format.
|
|
40
|
+
* @alias module:Ntnx/NFSServerAddress
|
|
41
|
+
*
|
|
42
|
+
* @param { IPAddressOrFQDN } address
|
|
43
|
+
*
|
|
44
|
+
* @param { Number } port Server port number.
|
|
45
|
+
*/
|
|
46
|
+
constructor(address, port) {
|
|
47
|
+
/*
|
|
48
|
+
* toJson method for a map type which supports map with primitive keys and values of object types
|
|
49
|
+
* @param {Object} obj
|
|
50
|
+
* @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
|
|
51
|
+
* Otherwise, just returns the input object.
|
|
52
|
+
*/
|
|
53
|
+
_classPrivateMethodInitSpec(this, _NFSServerAddress_brand);
|
|
54
|
+
this.address = address;
|
|
55
|
+
this.port = port;
|
|
56
|
+
this.$objectType = "multidomain.v4.config.NFSServerAddress";
|
|
57
|
+
/** @type {object<string, any>} */
|
|
58
|
+
this.$reserved = {
|
|
59
|
+
'$fv': "v4.r2"
|
|
60
|
+
};
|
|
61
|
+
/** @type {object<string, any>} */
|
|
62
|
+
this.$unknownFields = {};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Constructs a <code>NFSServerAddress</code> from a plain JavaScript object, optionally creating a new instance.
|
|
67
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
68
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
69
|
+
* @param {module:Ntnx/NFSServerAddress} obj Optional instance to populate.
|
|
70
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
71
|
+
* @return {module:Ntnx/NFSServerAddress} The populated <code>NFSServerAddress</code> instance.
|
|
72
|
+
*/
|
|
73
|
+
static constructFromObject(data, obj = null, callFromChild = false) {
|
|
74
|
+
let items, item, i, itemArr, discriminator;
|
|
75
|
+
if (data) {
|
|
76
|
+
obj = obj || new NFSServerAddress();
|
|
77
|
+
if (data.hasOwnProperty('address') && data.address !== null && data.address !== undefined) {
|
|
78
|
+
obj.setAddress(_IPAddressOrFQDN.default.constructFromObject(data['address']));
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('port') && data.port !== null && data.port !== undefined) {
|
|
81
|
+
obj.setPort(data['port']);
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('$reserved')) {
|
|
84
|
+
obj.$reserved = data['$reserved'];
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('$objectType')) {
|
|
87
|
+
obj.$objectType = data['$objectType'];
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('$unknownFields')) {
|
|
90
|
+
obj.$unknownFields = data['$unknownFields'];
|
|
91
|
+
}
|
|
92
|
+
if (!callFromChild) {
|
|
93
|
+
obj.$unknownFields = {
|
|
94
|
+
...data.$unknownFields
|
|
95
|
+
};
|
|
96
|
+
for (const property in data) {
|
|
97
|
+
// Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,
|
|
98
|
+
// as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).
|
|
99
|
+
// Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.
|
|
100
|
+
// If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.
|
|
101
|
+
if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
|
|
102
|
+
obj.$unknownFields[property] = data[property];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return obj;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Converts a given snake_case string to camelCase.
|
|
112
|
+
* @param {string} snakeStr - The input string in snake_case format.
|
|
113
|
+
* @returns {string} - The converted string in camelCase format.
|
|
114
|
+
*/
|
|
115
|
+
static snakeToCamel(snakeStr) {
|
|
116
|
+
return snakeStr.replace(/(_\w)/g, match => match[1].toUpperCase());
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @return {IPAddressOrFQDN}
|
|
121
|
+
*/
|
|
122
|
+
getAddress() {
|
|
123
|
+
return this.address;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @param {IPAddressOrFQDN} address
|
|
128
|
+
*/
|
|
129
|
+
setAddress(address) {
|
|
130
|
+
this.address = address;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Returns Server port number.
|
|
135
|
+
* @return {Number}
|
|
136
|
+
*/
|
|
137
|
+
getPort() {
|
|
138
|
+
return this.port;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Sets Server port number.
|
|
143
|
+
* @param {Number} port Server port number.
|
|
144
|
+
*/
|
|
145
|
+
setPort(port) {
|
|
146
|
+
this.port = port;
|
|
147
|
+
}
|
|
148
|
+
get$Reserved() {
|
|
149
|
+
return this.$reserved;
|
|
150
|
+
}
|
|
151
|
+
get$ObjectType() {
|
|
152
|
+
return this.$objectType;
|
|
153
|
+
}
|
|
154
|
+
get$UnknownFields() {
|
|
155
|
+
return this.$unknownFields;
|
|
156
|
+
}
|
|
157
|
+
toJson(forMutation) {
|
|
158
|
+
if (forMutation === false) {
|
|
159
|
+
return {
|
|
160
|
+
...(typeof this.getAddress() !== 'undefined' && this.getAddress() !== null ? {
|
|
161
|
+
'address': this.getAddress().toJson(false)
|
|
162
|
+
} : {}),
|
|
163
|
+
...(typeof this.getPort() !== 'undefined' && this.getPort() !== null ? {
|
|
164
|
+
'port': this.getPort()
|
|
165
|
+
} : {}),
|
|
166
|
+
'$reserved': this.get$Reserved(),
|
|
167
|
+
'$objectType': this.get$ObjectType(),
|
|
168
|
+
...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),
|
|
169
|
+
'$unknownFields': {}
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
return {
|
|
173
|
+
...(typeof this.getAddress() !== 'undefined' && this.getAddress() !== null ? {
|
|
174
|
+
'address': this.getAddress().toJson(false)
|
|
175
|
+
} : {}),
|
|
176
|
+
...(typeof this.getPort() !== 'undefined' && this.getPort() !== null ? {
|
|
177
|
+
'port': this.getPort()
|
|
178
|
+
} : {}),
|
|
179
|
+
'$reserved': this.get$Reserved(),
|
|
180
|
+
'$objectType': this.get$ObjectType(),
|
|
181
|
+
...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),
|
|
182
|
+
'$unknownFields': {}
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
validate(scope, properties) {
|
|
186
|
+
let propList = [];
|
|
187
|
+
if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes.default) {
|
|
188
|
+
//cases validate() and validate(scope)
|
|
189
|
+
propList = ["address", "port"];
|
|
190
|
+
} else if (arguments.length === 1) {
|
|
191
|
+
//case validate(properties)
|
|
192
|
+
propList = arguments[0];
|
|
193
|
+
scope = null;
|
|
194
|
+
} else {
|
|
195
|
+
//case validate(scope, properties)
|
|
196
|
+
propList = arguments[1];
|
|
197
|
+
}
|
|
198
|
+
let res = [];
|
|
199
|
+
let err = null;
|
|
200
|
+
propList.forEach(property => {
|
|
201
|
+
err = this.validateProperty(property, scope);
|
|
202
|
+
if (err) {
|
|
203
|
+
res.push(err);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
return new Promise(function (resolve, reject) {
|
|
207
|
+
if (res.length !== 0) {
|
|
208
|
+
reject(err);
|
|
209
|
+
} else {
|
|
210
|
+
resolve();
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
validateProperty(scope, property) {
|
|
215
|
+
if (property === "address") {
|
|
216
|
+
if (typeof this.address === 'undefined' || this.address === null) {
|
|
217
|
+
return new _ValidationError.default("address", "undefined or null");
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
if (property === "port") {
|
|
221
|
+
if (typeof this.port === 'undefined' || this.port === null) {
|
|
222
|
+
return new _ValidationError.default("port", "undefined or null");
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
if (property === "$reserved") {
|
|
226
|
+
if (typeof this.$reserved === 'undefined' || this.$reserved === null) {
|
|
227
|
+
return new _ValidationError.default("$reserved", "undefined or null");
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
if (property === "$objectType") {
|
|
231
|
+
if (typeof this.$objectType === 'undefined' || this.$objectType === null) {
|
|
232
|
+
return new _ValidationError.default("$objectType", "undefined or null");
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
if (property === "$unknownFields") {
|
|
236
|
+
if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {
|
|
237
|
+
return new _ValidationError.default("$unknownFields", "undefined or null");
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return new _ValidationError.default(property, "no such property exists");
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* @memberof NFSServerAddress
|
|
246
|
+
*/
|
|
247
|
+
exports.default = NFSServerAddress;
|
|
248
|
+
function _toJsonMapType(obj, forMutation) {
|
|
249
|
+
if (obj instanceof Map) {
|
|
250
|
+
return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v]));
|
|
251
|
+
} else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {
|
|
252
|
+
return Object.fromEntries(Array.from(Object.entries(obj), entry => {
|
|
253
|
+
return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
|
|
254
|
+
}));
|
|
255
|
+
}
|
|
256
|
+
return obj;
|
|
257
|
+
}
|
|
258
|
+
/*
|
|
259
|
+
* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting
|
|
260
|
+
* @param {Object} obj Object to serialize
|
|
261
|
+
* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization
|
|
262
|
+
* @returns {Object|string} Returns serialized date object or original input object
|
|
263
|
+
*/
|
|
264
|
+
function _handleDateType(obj, isDateOnly) {
|
|
265
|
+
if (obj instanceof Date && isDateOnly !== undefined) {
|
|
266
|
+
return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();
|
|
267
|
+
}
|
|
268
|
+
return obj;
|
|
269
|
+
}
|
|
270
|
+
NFSServerAddress.prototype.address = undefined;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Server port number.
|
|
274
|
+
* @memberof NFSServerAddress
|
|
275
|
+
*/
|
|
276
|
+
NFSServerAddress.prototype.port = undefined;
|
|
277
|
+
NFSServerAddress.prototype.$reserved = undefined;
|
|
278
|
+
NFSServerAddress.prototype.$objectType = undefined;
|
|
279
|
+
NFSServerAddress.prototype.$unknownFields = undefined;
|