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