@nutanix-scratch/objects-js-client 4.0.1-beta.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -20
- package/dist/Ntnx-Objects-js-client-prod.js +1 -1
- package/dist/Ntnx-Objects-js-client.js +331 -259
- package/dist/es/ApiClient.d.ts +35 -7
- package/dist/es/ApiClient.js +862 -684
- package/dist/es/Paginable.d.ts +1 -1
- package/dist/es/Paginable.js +144 -183
- package/dist/es/apis/objectstores-endpoints.d.ts +9 -70
- package/dist/es/apis/objectstores-endpoints.js +407 -477
- package/dist/es/apis/stats-endpoints.d.ts +46 -0
- package/dist/es/apis/stats-endpoints.js +122 -0
- package/dist/es/index.d.ts +13 -1
- package/dist/es/index.js +152 -104
- package/dist/es/models/common/v1/config/FQDN.d.ts +2 -7
- package/dist/es/models/common/v1/config/FQDN.js +141 -180
- package/dist/es/models/common/v1/config/Flag.d.ts +2 -8
- package/dist/es/models/common/v1/config/Flag.js +170 -211
- package/dist/es/models/common/v1/config/IPAddress.d.ts +2 -20
- package/dist/es/models/common/v1/config/IPAddress.js +170 -217
- package/dist/es/models/common/v1/config/IPv4Address.d.ts +2 -8
- package/dist/es/models/common/v1/config/IPv4Address.js +174 -215
- package/dist/es/models/common/v1/config/IPv6Address.d.ts +2 -8
- package/dist/es/models/common/v1/config/IPv6Address.js +174 -215
- package/dist/es/models/common/v1/config/KVPair.d.ts +2 -8
- package/dist/es/models/common/v1/config/KVPair.js +225 -270
- package/dist/es/models/common/v1/config/MapOfStringWrapper.d.ts +2 -7
- package/dist/es/models/common/v1/config/MapOfStringWrapper.js +139 -178
- package/dist/es/models/common/v1/config/Message.d.ts +2 -10
- package/dist/es/models/common/v1/config/Message.js +213 -258
- package/dist/es/models/common/v1/config/MessageSeverity.js +7 -9
- package/dist/es/models/common/v1/config/Metadata.d.ts +2 -11
- package/dist/es/models/common/v1/config/Metadata.js +261 -308
- package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +5 -10
- package/dist/es/models/common/v1/config/TenantAwareModel.js +138 -178
- package/dist/es/models/common/v1/response/ApiLink.d.ts +2 -8
- package/dist/es/models/common/v1/response/ApiLink.js +165 -206
- package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +2 -40
- package/dist/es/models/common/v1/response/ApiResponseMetadata.js +281 -344
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -15
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +155 -203
- package/dist/es/models/common/v1/stats/DownSamplingOperator.d.ts +19 -0
- package/dist/es/models/common/v1/stats/DownSamplingOperator.js +107 -0
- package/dist/es/models/common/v1/stats/TimeIntValuePair.d.ts +58 -0
- package/dist/es/models/common/v1/stats/TimeIntValuePair.js +272 -0
- package/dist/es/models/objects/v4/config/Certificate.d.ts +24 -34
- package/dist/es/models/objects/v4/config/Certificate.js +342 -310
- package/dist/es/models/objects/v4/config/CertificateProjection.d.ts +1 -1
- package/dist/es/models/objects/v4/config/CertificateProjection.js +75 -103
- package/dist/es/models/objects/v4/config/CreateCertificateApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/CreateCertificateApiResponse.js +187 -242
- package/dist/es/models/objects/v4/config/CreateObjectstoreApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/CreateObjectstoreApiResponse.js +187 -242
- package/dist/es/models/objects/v4/config/DeleteObjectstoreApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/DeleteObjectstoreApiResponse.js +187 -242
- package/dist/es/models/objects/v4/config/GetCaApiResponse.d.ts +2 -45
- package/dist/es/models/objects/v4/config/GetCaApiResponse.js +187 -242
- package/dist/es/models/objects/v4/config/GetCertificateApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/GetCertificateApiResponse.js +187 -242
- package/dist/es/models/objects/v4/config/GetObjectstoreApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/GetObjectstoreApiResponse.js +187 -242
- package/dist/es/models/objects/v4/config/ListCertificatesApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/ListCertificatesApiResponse.js +213 -268
- package/dist/es/models/objects/v4/config/ListObjectstoresApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/ListObjectstoresApiResponse.js +213 -268
- package/dist/es/models/objects/v4/config/ObjectStore.d.ts +1 -96
- package/dist/es/models/objects/v4/config/ObjectStore.js +629 -712
- package/dist/es/models/objects/v4/config/ObjectStoreProjection.d.ts +1 -129
- package/dist/es/models/objects/v4/config/ObjectStoreProjection.js +222 -239
- package/dist/es/models/objects/v4/config/State.js +7 -9
- package/dist/es/models/objects/v4/config/UpdateObjectstoreApiResponse.d.ts +2 -43
- package/dist/es/models/objects/v4/config/UpdateObjectstoreApiResponse.js +187 -242
- package/dist/es/models/objects/v4/error/AppMessage.d.ts +5 -15
- package/dist/es/models/objects/v4/error/AppMessage.js +265 -314
- package/dist/es/models/objects/v4/error/ErrorResponse.d.ts +2 -7
- package/dist/es/models/objects/v4/error/ErrorResponse.js +177 -219
- package/dist/es/models/objects/v4/error/SchemaValidationError.d.ts +2 -18
- package/dist/es/models/objects/v4/error/SchemaValidationError.js +249 -300
- package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +2 -9
- package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.js +191 -234
- package/dist/es/models/objects/v4/stats/GetObjectstoreStatsApiResponse.d.ts +58 -0
- package/dist/es/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js +288 -0
- package/dist/es/models/objects/v4/stats/ObjectstoreStats.d.ts +255 -0
- package/dist/es/models/objects/v4/stats/ObjectstoreStats.js +1253 -0
- package/dist/es/models/objects/v4/stats/TimeFloatValuePair.d.ts +58 -0
- package/dist/es/models/objects/v4/stats/TimeFloatValuePair.js +272 -0
- package/dist/es/models/prism/v4/config/TaskReference.d.ts +2 -7
- package/dist/es/models/prism/v4/config/TaskReference.js +142 -181
- package/dist/es/models/validation/ValidationError.js +26 -42
- package/dist/es/models/validation/ValidationScopes.js +3 -3
- package/dist/es/utils/ValidationUtils.js +39 -69
- package/dist/lib/ApiClient.d.ts +35 -7
- package/dist/lib/ApiClient.js +862 -684
- package/dist/lib/Paginable.d.ts +1 -1
- package/dist/lib/Paginable.js +144 -183
- package/dist/lib/apis/objectstores-endpoints.d.ts +9 -70
- package/dist/lib/apis/objectstores-endpoints.js +407 -477
- package/dist/lib/apis/stats-endpoints.d.ts +46 -0
- package/dist/lib/apis/stats-endpoints.js +122 -0
- package/dist/lib/index.d.ts +13 -1
- package/dist/lib/index.js +152 -104
- package/dist/lib/models/common/v1/config/FQDN.d.ts +2 -7
- package/dist/lib/models/common/v1/config/FQDN.js +141 -180
- package/dist/lib/models/common/v1/config/Flag.d.ts +2 -8
- package/dist/lib/models/common/v1/config/Flag.js +170 -211
- package/dist/lib/models/common/v1/config/IPAddress.d.ts +2 -20
- package/dist/lib/models/common/v1/config/IPAddress.js +170 -217
- package/dist/lib/models/common/v1/config/IPv4Address.d.ts +2 -8
- package/dist/lib/models/common/v1/config/IPv4Address.js +174 -215
- package/dist/lib/models/common/v1/config/IPv6Address.d.ts +2 -8
- package/dist/lib/models/common/v1/config/IPv6Address.js +174 -215
- package/dist/lib/models/common/v1/config/KVPair.d.ts +2 -8
- package/dist/lib/models/common/v1/config/KVPair.js +225 -270
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.d.ts +2 -7
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.js +139 -178
- package/dist/lib/models/common/v1/config/Message.d.ts +2 -10
- package/dist/lib/models/common/v1/config/Message.js +213 -258
- package/dist/lib/models/common/v1/config/MessageSeverity.js +7 -9
- package/dist/lib/models/common/v1/config/Metadata.d.ts +2 -11
- package/dist/lib/models/common/v1/config/Metadata.js +261 -308
- package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +5 -10
- package/dist/lib/models/common/v1/config/TenantAwareModel.js +138 -178
- package/dist/lib/models/common/v1/response/ApiLink.d.ts +2 -8
- package/dist/lib/models/common/v1/response/ApiLink.js +165 -206
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +2 -40
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +281 -344
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -15
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +155 -203
- package/dist/lib/models/common/v1/stats/DownSamplingOperator.d.ts +19 -0
- package/dist/lib/models/common/v1/stats/DownSamplingOperator.js +107 -0
- package/dist/lib/models/common/v1/stats/TimeIntValuePair.d.ts +58 -0
- package/dist/lib/models/common/v1/stats/TimeIntValuePair.js +272 -0
- package/dist/lib/models/objects/v4/config/Certificate.d.ts +24 -34
- package/dist/lib/models/objects/v4/config/Certificate.js +342 -310
- package/dist/lib/models/objects/v4/config/CertificateProjection.d.ts +1 -1
- package/dist/lib/models/objects/v4/config/CertificateProjection.js +75 -103
- package/dist/lib/models/objects/v4/config/CreateCertificateApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/CreateCertificateApiResponse.js +187 -242
- package/dist/lib/models/objects/v4/config/CreateObjectstoreApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/CreateObjectstoreApiResponse.js +187 -242
- package/dist/lib/models/objects/v4/config/DeleteObjectstoreApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/DeleteObjectstoreApiResponse.js +187 -242
- package/dist/lib/models/objects/v4/config/GetCaApiResponse.d.ts +2 -45
- package/dist/lib/models/objects/v4/config/GetCaApiResponse.js +187 -242
- package/dist/lib/models/objects/v4/config/GetCertificateApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/GetCertificateApiResponse.js +187 -242
- package/dist/lib/models/objects/v4/config/GetObjectstoreApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/GetObjectstoreApiResponse.js +187 -242
- package/dist/lib/models/objects/v4/config/ListCertificatesApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/ListCertificatesApiResponse.js +213 -268
- package/dist/lib/models/objects/v4/config/ListObjectstoresApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/ListObjectstoresApiResponse.js +213 -268
- package/dist/lib/models/objects/v4/config/ObjectStore.d.ts +1 -96
- package/dist/lib/models/objects/v4/config/ObjectStore.js +629 -712
- package/dist/lib/models/objects/v4/config/ObjectStoreProjection.d.ts +1 -129
- package/dist/lib/models/objects/v4/config/ObjectStoreProjection.js +222 -239
- package/dist/lib/models/objects/v4/config/State.js +7 -9
- package/dist/lib/models/objects/v4/config/UpdateObjectstoreApiResponse.d.ts +2 -43
- package/dist/lib/models/objects/v4/config/UpdateObjectstoreApiResponse.js +187 -242
- package/dist/lib/models/objects/v4/error/AppMessage.d.ts +5 -15
- package/dist/lib/models/objects/v4/error/AppMessage.js +265 -314
- package/dist/lib/models/objects/v4/error/ErrorResponse.d.ts +2 -7
- package/dist/lib/models/objects/v4/error/ErrorResponse.js +177 -219
- package/dist/lib/models/objects/v4/error/SchemaValidationError.d.ts +2 -18
- package/dist/lib/models/objects/v4/error/SchemaValidationError.js +249 -300
- package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +2 -9
- package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.js +191 -234
- package/dist/lib/models/objects/v4/stats/GetObjectstoreStatsApiResponse.d.ts +58 -0
- package/dist/lib/models/objects/v4/stats/GetObjectstoreStatsApiResponse.js +288 -0
- package/dist/lib/models/objects/v4/stats/ObjectstoreStats.d.ts +255 -0
- package/dist/lib/models/objects/v4/stats/ObjectstoreStats.js +1253 -0
- package/dist/lib/models/objects/v4/stats/TimeFloatValuePair.d.ts +58 -0
- package/dist/lib/models/objects/v4/stats/TimeFloatValuePair.js +272 -0
- package/dist/lib/models/prism/v4/config/TaskReference.d.ts +2 -7
- package/dist/lib/models/prism/v4/config/TaskReference.js +142 -181
- package/dist/lib/models/validation/ValidationError.js +26 -42
- package/dist/lib/models/validation/ValidationScopes.js +3 -3
- package/dist/lib/utils/ValidationUtils.js +39 -69
- package/package.json +2 -2
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The TimeFloatValuePair model module.
|
|
3
|
+
* @module Ntnx/TimeFloatValuePair
|
|
4
|
+
* @version 4.0.2
|
|
5
|
+
* @class TimeFloatValuePair
|
|
6
|
+
*/
|
|
7
|
+
export default class TimeFloatValuePair {
|
|
8
|
+
/**
|
|
9
|
+
* Constructs a <code>TimeFloatValuePair</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/TimeFloatValuePair} obj Optional instance to populate.
|
|
13
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
14
|
+
* @return {module:Ntnx/TimeFloatValuePair} The populated <code>TimeFloatValuePair</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 Value of the stat at the recorded date and time in extended ISO-8601 format.
|
|
30
|
+
* @return {Number}
|
|
31
|
+
*/
|
|
32
|
+
getValue(): number;
|
|
33
|
+
/**
|
|
34
|
+
* Sets Value of the stat at the recorded date and time in extended ISO-8601 format.
|
|
35
|
+
* @param {Number} value Value of the stat at the recorded date and time in extended ISO-8601 format.
|
|
36
|
+
*/
|
|
37
|
+
setValue(value: number): void;
|
|
38
|
+
value: number;
|
|
39
|
+
/**
|
|
40
|
+
* Returns The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html
|
|
41
|
+
* @return {Date}
|
|
42
|
+
*/
|
|
43
|
+
getTimestamp(): Date;
|
|
44
|
+
/**
|
|
45
|
+
* Sets The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html
|
|
46
|
+
* @param {Date} timestamp The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html
|
|
47
|
+
*/
|
|
48
|
+
setTimestamp(timestamp: Date): void;
|
|
49
|
+
timestamp: Date;
|
|
50
|
+
get$Reserved(): any;
|
|
51
|
+
get$ObjectType(): string;
|
|
52
|
+
get$UnknownFields(): any;
|
|
53
|
+
toJson(forMutation: any): any;
|
|
54
|
+
validate(scope: any, properties: any, ...args: any[]): Promise<any>;
|
|
55
|
+
validateProperty(scope: any, property: any): ValidationError;
|
|
56
|
+
#private;
|
|
57
|
+
}
|
|
58
|
+
import ValidationError from "../../../validation/ValidationError";
|
|
@@ -0,0 +1,272 @@
|
|
|
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
|
+
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"); } /*
|
|
14
|
+
* Nutanix Objects Storage Management APIs
|
|
15
|
+
*
|
|
16
|
+
* OpenAPI spec version: 4.0.2
|
|
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 TimeFloatValuePair model module.
|
|
27
|
+
* @module Ntnx/TimeFloatValuePair
|
|
28
|
+
* @version 4.0.2
|
|
29
|
+
* @class TimeFloatValuePair
|
|
30
|
+
*/
|
|
31
|
+
var _TimeFloatValuePair_brand = /*#__PURE__*/new WeakSet();
|
|
32
|
+
class TimeFloatValuePair {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>TimeFloatValuePair</code>.
|
|
35
|
+
* A time value pair representing a stat associated with a given entity at a given point of date and time represented in extended ISO-8601 format.
|
|
36
|
+
* @alias module:Ntnx/TimeFloatValuePair
|
|
37
|
+
*/
|
|
38
|
+
constructor() {
|
|
39
|
+
/*
|
|
40
|
+
* toJson method for a map type which supports map with primitive keys and values of object types
|
|
41
|
+
* @param {Object} obj
|
|
42
|
+
* @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
|
|
43
|
+
* Otherwise, just returns the input object.
|
|
44
|
+
*/
|
|
45
|
+
_classPrivateMethodInitSpec(this, _TimeFloatValuePair_brand);
|
|
46
|
+
this.$objectType = "objects.v4.stats.TimeFloatValuePair";
|
|
47
|
+
/** @type {object<string, any>} */
|
|
48
|
+
this.$reserved = {
|
|
49
|
+
'$fv': "v4.r0"
|
|
50
|
+
};
|
|
51
|
+
/** @type {object<string, any>} */
|
|
52
|
+
this.$unknownFields = {};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Constructs a <code>TimeFloatValuePair</code> from a plain JavaScript object, optionally creating a new instance.
|
|
57
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
58
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
59
|
+
* @param {module:Ntnx/TimeFloatValuePair} obj Optional instance to populate.
|
|
60
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
61
|
+
* @return {module:Ntnx/TimeFloatValuePair} The populated <code>TimeFloatValuePair</code> instance.
|
|
62
|
+
*/
|
|
63
|
+
static constructFromObject(data, obj = null, callFromChild = false) {
|
|
64
|
+
let items, item, i, itemArr, discriminator;
|
|
65
|
+
if (data) {
|
|
66
|
+
obj = obj || new TimeFloatValuePair();
|
|
67
|
+
if (data.hasOwnProperty('value') && data.value !== null && data.value !== undefined) {
|
|
68
|
+
obj.setValue(data['value']);
|
|
69
|
+
}
|
|
70
|
+
if (data.hasOwnProperty('timestamp') && data.timestamp !== null && data.timestamp !== undefined) {
|
|
71
|
+
obj.setTimestamp(data['timestamp']);
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('$reserved')) {
|
|
74
|
+
obj.$reserved = data['$reserved'];
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('$objectType')) {
|
|
77
|
+
obj.$objectType = data['$objectType'];
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('$unknownFields')) {
|
|
80
|
+
obj.$unknownFields = data['$unknownFields'];
|
|
81
|
+
}
|
|
82
|
+
if (!callFromChild) {
|
|
83
|
+
obj.$unknownFields = {
|
|
84
|
+
...data.$unknownFields
|
|
85
|
+
};
|
|
86
|
+
for (const property in data) {
|
|
87
|
+
// Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,
|
|
88
|
+
// as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).
|
|
89
|
+
// Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.
|
|
90
|
+
// If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.
|
|
91
|
+
if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
|
|
92
|
+
obj.$unknownFields[property] = data[property];
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return obj;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Converts a given snake_case string to camelCase.
|
|
102
|
+
* @param {string} snakeStr - The input string in snake_case format.
|
|
103
|
+
* @returns {string} - The converted string in camelCase format.
|
|
104
|
+
*/
|
|
105
|
+
static snakeToCamel(snakeStr) {
|
|
106
|
+
return snakeStr.replace(/(_\w)/g, match => match[1].toUpperCase());
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Returns Value of the stat at the recorded date and time in extended ISO-8601 format.
|
|
111
|
+
* @return {Number}
|
|
112
|
+
*/
|
|
113
|
+
getValue() {
|
|
114
|
+
return this.value;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Sets Value of the stat at the recorded date and time in extended ISO-8601 format.
|
|
119
|
+
* @param {Number} value Value of the stat at the recorded date and time in extended ISO-8601 format.
|
|
120
|
+
*/
|
|
121
|
+
setValue(value) {
|
|
122
|
+
this.value = value;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Returns The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html
|
|
127
|
+
* @return {Date}
|
|
128
|
+
*/
|
|
129
|
+
getTimestamp() {
|
|
130
|
+
return this.timestamp;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Sets The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html
|
|
135
|
+
* @param {Date} timestamp The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html
|
|
136
|
+
*/
|
|
137
|
+
setTimestamp(timestamp) {
|
|
138
|
+
this.timestamp = timestamp;
|
|
139
|
+
}
|
|
140
|
+
get$Reserved() {
|
|
141
|
+
return this.$reserved;
|
|
142
|
+
}
|
|
143
|
+
get$ObjectType() {
|
|
144
|
+
return this.$objectType;
|
|
145
|
+
}
|
|
146
|
+
get$UnknownFields() {
|
|
147
|
+
return this.$unknownFields;
|
|
148
|
+
}
|
|
149
|
+
toJson(forMutation) {
|
|
150
|
+
if (forMutation === false) {
|
|
151
|
+
return {
|
|
152
|
+
...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {
|
|
153
|
+
'value': this.getValue()
|
|
154
|
+
} : {}),
|
|
155
|
+
...(typeof this.getTimestamp() !== 'undefined' && this.getTimestamp() !== null ? {
|
|
156
|
+
'timestamp': _assertClassBrand(_TimeFloatValuePair_brand, this, _handleDateType).call(this, this.getTimestamp(), false)
|
|
157
|
+
} : {}),
|
|
158
|
+
'$reserved': this.get$Reserved(),
|
|
159
|
+
'$objectType': this.get$ObjectType(),
|
|
160
|
+
...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),
|
|
161
|
+
'$unknownFields': {}
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
return {
|
|
165
|
+
...(typeof this.getValue() !== 'undefined' && this.getValue() !== null ? {
|
|
166
|
+
'value': this.getValue()
|
|
167
|
+
} : {}),
|
|
168
|
+
...(typeof this.getTimestamp() !== 'undefined' && this.getTimestamp() !== null ? {
|
|
169
|
+
'timestamp': _assertClassBrand(_TimeFloatValuePair_brand, this, _handleDateType).call(this, this.getTimestamp(), false)
|
|
170
|
+
} : {}),
|
|
171
|
+
'$reserved': this.get$Reserved(),
|
|
172
|
+
'$objectType': this.get$ObjectType(),
|
|
173
|
+
...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),
|
|
174
|
+
'$unknownFields': {}
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
validate(scope, properties) {
|
|
178
|
+
let propList = [];
|
|
179
|
+
if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes.default) {
|
|
180
|
+
//cases validate() and validate(scope)
|
|
181
|
+
propList = [];
|
|
182
|
+
} else if (arguments.length === 1) {
|
|
183
|
+
//case validate(properties)
|
|
184
|
+
propList = arguments[0];
|
|
185
|
+
scope = null;
|
|
186
|
+
} else {
|
|
187
|
+
//case validate(scope, properties)
|
|
188
|
+
propList = arguments[1];
|
|
189
|
+
}
|
|
190
|
+
let res = [];
|
|
191
|
+
let err = null;
|
|
192
|
+
propList.forEach(property => {
|
|
193
|
+
err = this.validateProperty(property, scope);
|
|
194
|
+
if (err) {
|
|
195
|
+
res.push(err);
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
return new Promise(function (resolve, reject) {
|
|
199
|
+
if (res.length !== 0) {
|
|
200
|
+
reject(err);
|
|
201
|
+
} else {
|
|
202
|
+
resolve();
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
validateProperty(scope, property) {
|
|
207
|
+
if (property === "value") {
|
|
208
|
+
if (typeof this.value === 'undefined' || this.value === null) {
|
|
209
|
+
return new _ValidationError.default("value", "undefined or null");
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
if (property === "timestamp") {
|
|
213
|
+
if (typeof this.timestamp === 'undefined' || this.timestamp === null) {
|
|
214
|
+
return new _ValidationError.default("timestamp", "undefined or null");
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
if (property === "$reserved") {
|
|
218
|
+
if (typeof this.$reserved === 'undefined' || this.$reserved === null) {
|
|
219
|
+
return new _ValidationError.default("$reserved", "undefined or null");
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
if (property === "$objectType") {
|
|
223
|
+
if (typeof this.$objectType === 'undefined' || this.$objectType === null) {
|
|
224
|
+
return new _ValidationError.default("$objectType", "undefined or null");
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
if (property === "$unknownFields") {
|
|
228
|
+
if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {
|
|
229
|
+
return new _ValidationError.default("$unknownFields", "undefined or null");
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return new _ValidationError.default(property, "no such property exists");
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Value of the stat at the recorded date and time in extended ISO-8601 format.
|
|
238
|
+
* @memberof TimeFloatValuePair
|
|
239
|
+
*/
|
|
240
|
+
exports.default = TimeFloatValuePair;
|
|
241
|
+
function _toJsonMapType(obj, forMutation) {
|
|
242
|
+
if (obj instanceof Map) {
|
|
243
|
+
return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v]));
|
|
244
|
+
} else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {
|
|
245
|
+
return Object.fromEntries(Array.from(Object.entries(obj), entry => {
|
|
246
|
+
return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
|
|
247
|
+
}));
|
|
248
|
+
}
|
|
249
|
+
return obj;
|
|
250
|
+
}
|
|
251
|
+
/*
|
|
252
|
+
* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting
|
|
253
|
+
* @param {Object} obj Object to serialize
|
|
254
|
+
* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization
|
|
255
|
+
* @returns {Object|string} Returns serialized date object or original input object
|
|
256
|
+
*/
|
|
257
|
+
function _handleDateType(obj, isDateOnly) {
|
|
258
|
+
if (obj instanceof Date && isDateOnly !== undefined) {
|
|
259
|
+
return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();
|
|
260
|
+
}
|
|
261
|
+
return obj;
|
|
262
|
+
}
|
|
263
|
+
TimeFloatValuePair.prototype.value = undefined;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* The date and time at which the stat was recorded.The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at https://www.iso.org/standard/70907.html
|
|
267
|
+
* @memberof TimeFloatValuePair
|
|
268
|
+
*/
|
|
269
|
+
TimeFloatValuePair.prototype.timestamp = undefined;
|
|
270
|
+
TimeFloatValuePair.prototype.$reserved = undefined;
|
|
271
|
+
TimeFloatValuePair.prototype.$objectType = undefined;
|
|
272
|
+
TimeFloatValuePair.prototype.$unknownFields = undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The TaskReference model module.
|
|
3
3
|
* @module Ntnx/TaskReference
|
|
4
|
-
* @version 4.0.
|
|
4
|
+
* @version 4.0.2
|
|
5
5
|
* @class TaskReference
|
|
6
6
|
*/
|
|
7
7
|
export default class TaskReference {
|
|
@@ -39,12 +39,7 @@ export default class TaskReference {
|
|
|
39
39
|
get$Reserved(): any;
|
|
40
40
|
get$ObjectType(): string;
|
|
41
41
|
get$UnknownFields(): any;
|
|
42
|
-
toJson(forMutation: any):
|
|
43
|
-
$reserved: any;
|
|
44
|
-
$objectType: string;
|
|
45
|
-
$unknownFields: any;
|
|
46
|
-
extId?: string;
|
|
47
|
-
};
|
|
42
|
+
toJson(forMutation: any): any;
|
|
48
43
|
validate(scope: any, properties: any, ...args: any[]): Promise<any>;
|
|
49
44
|
validateProperty(scope: any, property: any): ValidationError;
|
|
50
45
|
#private;
|